From 2f58745e37feaf144709a9f1cf0dcb2c7998ea83 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Tue, 14 Jan 2014 11:18:31 +0100 Subject: [PATCH] Delete: libpng, LibRaw, OpenEXR, zlib, openjpeg --- Source/LibOpenJPEG/AUTHORS | 13 - Source/LibOpenJPEG/CHANGES | 425 - Source/LibOpenJPEG/INSTALL | 114 - Source/LibOpenJPEG/LICENSE | 31 - Source/LibOpenJPEG/LibOpenJPEG.2003.vcproj | 558 - Source/LibOpenJPEG/LibOpenJPEG.2005.vcproj | 1227 -- Source/LibOpenJPEG/LibOpenJPEG.2008.vcproj | 1224 -- Source/LibOpenJPEG/NEWS | 24 - Source/LibOpenJPEG/README | 25 - Source/LibOpenJPEG/THANKS | 33 - Source/LibOpenJPEG/bio.c | 187 - Source/LibOpenJPEG/bio.h | 125 - Source/LibOpenJPEG/cidx_manager.c | 211 - Source/LibOpenJPEG/cidx_manager.h | 56 - Source/LibOpenJPEG/cio.c | 191 - Source/LibOpenJPEG/cio.h | 93 - Source/LibOpenJPEG/dwt.c | 858 - Source/LibOpenJPEG/dwt.h | 113 - Source/LibOpenJPEG/event.c | 130 - Source/LibOpenJPEG/event.h | 58 - Source/LibOpenJPEG/fix.h | 64 - Source/LibOpenJPEG/image.c | 89 - Source/LibOpenJPEG/image.h | 48 - Source/LibOpenJPEG/indexbox_manager.h | 118 - Source/LibOpenJPEG/int.h | 119 - Source/LibOpenJPEG/j2k.c | 2616 --- Source/LibOpenJPEG/j2k.h | 446 - Source/LibOpenJPEG/j2k_lib.c | 59 - Source/LibOpenJPEG/j2k_lib.h | 54 - Source/LibOpenJPEG/jp2.c | 1223 -- Source/LibOpenJPEG/jp2.h | 234 - Source/LibOpenJPEG/jpt.c | 155 - Source/LibOpenJPEG/jpt.h | 75 - Source/LibOpenJPEG/mct.c | 190 - Source/LibOpenJPEG/mct.h | 98 - Source/LibOpenJPEG/mqc.c | 592 - Source/LibOpenJPEG/mqc.h | 200 - Source/LibOpenJPEG/openjpeg.c | 343 - Source/LibOpenJPEG/openjpeg.h | 914 -- Source/LibOpenJPEG/opj_config.h | 41 - Source/LibOpenJPEG/opj_includes.h | 140 - Source/LibOpenJPEG/opj_malloc.h | 165 - Source/LibOpenJPEG/phix_manager.c | 170 - Source/LibOpenJPEG/pi.c | 963 -- Source/LibOpenJPEG/pi.h | 156 - Source/LibOpenJPEG/ppix_manager.c | 173 - Source/LibOpenJPEG/raw.c | 87 - Source/LibOpenJPEG/raw.h | 100 - Source/LibOpenJPEG/t1.c | 1585 -- Source/LibOpenJPEG/t1.h | 147 - Source/LibOpenJPEG/t1_generate_luts.c | 275 - Source/LibOpenJPEG/t1_luts.h | 143 - Source/LibOpenJPEG/t2.c | 822 - Source/LibOpenJPEG/t2.h | 105 - Source/LibOpenJPEG/tcd.c | 1574 -- Source/LibOpenJPEG/tcd.h | 286 - Source/LibOpenJPEG/tgt.c | 213 - Source/LibOpenJPEG/tgt.h | 114 - Source/LibOpenJPEG/thix_manager.c | 120 - Source/LibOpenJPEG/tpix_manager.c | 153 - Source/LibPNG/ANNOUNCE | 47 - Source/LibPNG/CHANGES | 3929 ----- Source/LibPNG/INSTALL | 135 - Source/LibPNG/LICENSE | 111 - Source/LibPNG/LibPNG.2003.vcproj | 203 - Source/LibPNG/LibPNG.2005.vcproj | 433 - Source/LibPNG/LibPNG.2008.vcproj | 434 - Source/LibPNG/README | 202 - Source/LibPNG/TODO | 27 - Source/LibPNG/configure | 19 - Source/LibPNG/example.c | 879 - Source/LibPNG/libpng-manual.txt | 4667 ------ Source/LibPNG/libpng.3 | 5996 ------- Source/LibPNG/libpngpf.3 | 28 - Source/LibPNG/png.5 | 74 - Source/LibPNG/png.c | 2874 ---- Source/LibPNG/png.h | 2674 --- Source/LibPNG/pngconf.h | 598 - Source/LibPNG/pngdebug.h | 157 - Source/LibPNG/pngerror.c | 685 - Source/LibPNG/pngget.c | 1124 -- Source/LibPNG/pnginfo.h | 269 - Source/LibPNG/pnglibconf.h | 187 - Source/LibPNG/pngmem.c | 667 - Source/LibPNG/pngpread.c | 1315 -- Source/LibPNG/pngpriv.h | 1675 -- Source/LibPNG/pngread.c | 1305 -- Source/LibPNG/pngrio.c | 176 - Source/LibPNG/pngrtran.c | 5054 ------ Source/LibPNG/pngrutil.c | 4159 ----- Source/LibPNG/pngset.c | 1311 -- Source/LibPNG/pngstruct.h | 358 - Source/LibPNG/pngtest.c | 1820 -- Source/LibPNG/pngtrans.c | 781 - Source/LibPNG/pngwio.c | 254 - Source/LibPNG/pngwrite.c | 1668 -- Source/LibPNG/pngwtran.c | 645 - Source/LibPNG/pngwutil.c | 3180 ---- Source/LibRawLite/COPYRIGHT | 23 - Source/LibRawLite/Changelog.txt | 1295 -- Source/LibRawLite/LICENSE.CDDL | 340 - Source/LibRawLite/LICENSE.LGPL | 458 - Source/LibRawLite/LibRawLite.2003.vcproj | 196 - Source/LibRawLite/LibRawLite.2005.vcproj | 404 - Source/LibRawLite/LibRawLite.2008.vcproj | 409 - Source/LibRawLite/README | 28 - Source/LibRawLite/README.demosaic-packs | 46 - Source/LibRawLite/dcraw/dcraw.c | 9464 ----------- Source/LibRawLite/internal/dcb_demosaicing.c | 710 - Source/LibRawLite/internal/dcraw_common.cpp | 9445 ----------- Source/LibRawLite/internal/dcraw_fileio.cpp | 240 - Source/LibRawLite/internal/defines.h | 153 - Source/LibRawLite/internal/demosaic_packs.cpp | 97 - Source/LibRawLite/internal/libraw_bytebuffer.h | 140 - Source/LibRawLite/internal/libraw_internal_funcs.h | 241 - Source/LibRawLite/internal/var_defines.h | 206 - Source/LibRawLite/libraw/libraw.h | 269 - Source/LibRawLite/libraw/libraw_alloc.h | 99 - Source/LibRawLite/libraw/libraw_const.h | 162 - Source/LibRawLite/libraw/libraw_datastream.h | 205 - Source/LibRawLite/libraw/libraw_internal.h | 218 - Source/LibRawLite/libraw/libraw_types.h | 352 - Source/LibRawLite/libraw/libraw_version.h | 62 - Source/LibRawLite/src/libraw_c_api.cpp | 201 - Source/LibRawLite/src/libraw_cxx.cpp | 2814 ---- Source/LibRawLite/src/libraw_datastream.cpp | 526 - Source/OpenEXR/Copyrights/ilmbase/AUTHORS | 21 - Source/OpenEXR/Copyrights/ilmbase/COPYING | 34 - Source/OpenEXR/Copyrights/ilmbase/ChangeLog | 109 - Source/OpenEXR/Copyrights/ilmbase/INSTALL | 2 - Source/OpenEXR/Copyrights/ilmbase/LICENSE | 34 - Source/OpenEXR/Copyrights/ilmbase/NEWS | 3 - Source/OpenEXR/Copyrights/ilmbase/README | 60 - Source/OpenEXR/Copyrights/ilmbase/README.CVS | 16 - Source/OpenEXR/Copyrights/ilmbase/README.OSX | 68 - Source/OpenEXR/Copyrights/ilmbase/README.win32 | 196 - Source/OpenEXR/Copyrights/openexr/AUTHORS | 41 - Source/OpenEXR/Copyrights/openexr/COPYING | 34 - Source/OpenEXR/Copyrights/openexr/ChangeLog | 666 - Source/OpenEXR/Copyrights/openexr/INSTALL | 2 - Source/OpenEXR/Copyrights/openexr/LICENSE | 34 - Source/OpenEXR/Copyrights/openexr/NEWS | 184 - Source/OpenEXR/Copyrights/openexr/README | 68 - Source/OpenEXR/Copyrights/openexr/README.CVS | 16 - Source/OpenEXR/Copyrights/openexr/README.OSX | 21 - Source/OpenEXR/Copyrights/openexr/README.win32 | 197 - Source/OpenEXR/Half/Makefile.am | 32 - Source/OpenEXR/Half/Makefile.in | 558 - Source/OpenEXR/Half/eLut.cpp | 114 - Source/OpenEXR/Half/eLut.h | 71 - Source/OpenEXR/Half/half.cpp | 311 - Source/OpenEXR/Half/half.h | 766 - Source/OpenEXR/Half/halfFunction.h | 178 - Source/OpenEXR/Half/halfLimits.h | 102 - Source/OpenEXR/Half/toFloat.cpp | 164 - Source/OpenEXR/Half/toFloat.h | 16391 ------------------ Source/OpenEXR/Iex/Iex.h | 60 - Source/OpenEXR/Iex/IexBaseExc.cpp | 129 - Source/OpenEXR/Iex/IexBaseExc.h | 266 - Source/OpenEXR/Iex/IexErrnoExc.h | 210 - Source/OpenEXR/Iex/IexMacros.h | 148 - Source/OpenEXR/Iex/IexMathExc.h | 58 - Source/OpenEXR/Iex/IexThrowErrnoExc.cpp | 859 - Source/OpenEXR/Iex/IexThrowErrnoExc.h | 96 - Source/OpenEXR/Iex/Makefile.am | 16 - Source/OpenEXR/Iex/Makefile.in | 521 - Source/OpenEXR/IlmBaseConfig.h | 46 - Source/OpenEXR/IlmImf/ImfAcesFile.cpp | 631 - Source/OpenEXR/IlmImf/ImfAcesFile.h | 322 - Source/OpenEXR/IlmImf/ImfArray.h | 261 - Source/OpenEXR/IlmImf/ImfAttribute.cpp | 156 - Source/OpenEXR/IlmImf/ImfAttribute.h | 427 - Source/OpenEXR/IlmImf/ImfAutoArray.h | 93 - Source/OpenEXR/IlmImf/ImfB44Compressor.cpp | 1069 -- Source/OpenEXR/IlmImf/ImfB44Compressor.h | 117 - Source/OpenEXR/IlmImf/ImfBoxAttribute.cpp | 110 - Source/OpenEXR/IlmImf/ImfBoxAttribute.h | 73 - Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp | 1434 -- Source/OpenEXR/IlmImf/ImfCRgbaFile.h | 467 - Source/OpenEXR/IlmImf/ImfChannelList.cpp | 321 - Source/OpenEXR/IlmImf/ImfChannelList.h | 433 - Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp | 145 - Source/OpenEXR/IlmImf/ImfChannelListAttribute.h | 67 - Source/OpenEXR/IlmImf/ImfCheckedArithmetic.h | 161 - Source/OpenEXR/IlmImf/ImfChromaticities.cpp | 135 - Source/OpenEXR/IlmImf/ImfChromaticities.h | 120 - .../OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp | 86 - Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.h | 72 - Source/OpenEXR/IlmImf/ImfCompression.h | 75 - Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp | 76 - Source/OpenEXR/IlmImf/ImfCompressionAttribute.h | 66 - Source/OpenEXR/IlmImf/ImfCompressor.cpp | 192 - Source/OpenEXR/IlmImf/ImfCompressor.h | 252 - Source/OpenEXR/IlmImf/ImfConvert.cpp | 139 - Source/OpenEXR/IlmImf/ImfConvert.h | 104 - Source/OpenEXR/IlmImf/ImfDoubleAttribute.cpp | 57 - Source/OpenEXR/IlmImf/ImfDoubleAttribute.h | 63 - Source/OpenEXR/IlmImf/ImfEnvmap.cpp | 328 - Source/OpenEXR/IlmImf/ImfEnvmap.h | 322 - Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp | 75 - Source/OpenEXR/IlmImf/ImfEnvmapAttribute.h | 65 - Source/OpenEXR/IlmImf/ImfFloatAttribute.cpp | 57 - Source/OpenEXR/IlmImf/ImfFloatAttribute.h | 63 - Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp | 226 - Source/OpenEXR/IlmImf/ImfFrameBuffer.h | 383 - Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp | 75 - Source/OpenEXR/IlmImf/ImfFramesPerSecond.h | 88 - Source/OpenEXR/IlmImf/ImfHeader.cpp | 1106 -- Source/OpenEXR/IlmImf/ImfHeader.h | 627 - Source/OpenEXR/IlmImf/ImfHuf.cpp | 1086 -- Source/OpenEXR/IlmImf/ImfHuf.h | 79 - Source/OpenEXR/IlmImf/ImfIO.cpp | 109 - Source/OpenEXR/IlmImf/ImfIO.h | 252 - Source/OpenEXR/IlmImf/ImfInputFile.cpp | 648 - Source/OpenEXR/IlmImf/ImfInputFile.h | 209 - Source/OpenEXR/IlmImf/ImfInt64.h | 52 - Source/OpenEXR/IlmImf/ImfIntAttribute.cpp | 57 - Source/OpenEXR/IlmImf/ImfIntAttribute.h | 63 - Source/OpenEXR/IlmImf/ImfKeyCode.cpp | 216 - Source/OpenEXR/IlmImf/ImfKeyCode.h | 161 - Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp | 98 - Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.h | 72 - Source/OpenEXR/IlmImf/ImfLineOrder.h | 64 - Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp | 77 - Source/OpenEXR/IlmImf/ImfLineOrderAttribute.h | 66 - Source/OpenEXR/IlmImf/ImfLut.cpp | 176 - Source/OpenEXR/IlmImf/ImfLut.h | 185 - Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp | 260 - Source/OpenEXR/IlmImf/ImfMatrixAttribute.h | 87 - Source/OpenEXR/IlmImf/ImfMisc.cpp | 787 - Source/OpenEXR/IlmImf/ImfMisc.h | 255 - Source/OpenEXR/IlmImf/ImfMultiView.cpp | 396 - Source/OpenEXR/IlmImf/ImfMultiView.h | 164 - Source/OpenEXR/IlmImf/ImfName.h | 146 - Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp | 125 - Source/OpenEXR/IlmImf/ImfOpaqueAttribute.h | 114 - Source/OpenEXR/IlmImf/ImfOutputFile.cpp | 1287 -- Source/OpenEXR/IlmImf/ImfOutputFile.h | 241 - Source/OpenEXR/IlmImf/ImfPixelType.h | 61 - Source/OpenEXR/IlmImf/ImfPizCompressor.cpp | 666 - Source/OpenEXR/IlmImf/ImfPizCompressor.h | 115 - Source/OpenEXR/IlmImf/ImfPreviewImage.cpp | 103 - Source/OpenEXR/IlmImf/ImfPreviewImage.h | 131 - Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp | 102 - Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.h | 71 - Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp | 550 - Source/OpenEXR/IlmImf/ImfPxr24Compressor.h | 108 - Source/OpenEXR/IlmImf/ImfRational.cpp | 125 - Source/OpenEXR/IlmImf/ImfRational.h | 93 - Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp | 73 - Source/OpenEXR/IlmImf/ImfRationalAttribute.h | 70 - Source/OpenEXR/IlmImf/ImfRgba.h | 104 - Source/OpenEXR/IlmImf/ImfRgbaFile.cpp | 1404 -- Source/OpenEXR/IlmImf/ImfRgbaFile.h | 344 - Source/OpenEXR/IlmImf/ImfRgbaYca.cpp | 495 - Source/OpenEXR/IlmImf/ImfRgbaYca.h | 248 - Source/OpenEXR/IlmImf/ImfRleCompressor.cpp | 331 - Source/OpenEXR/IlmImf/ImfRleCompressor.h | 79 - Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp | 1021 -- Source/OpenEXR/IlmImf/ImfScanLineInputFile.h | 172 - Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp | 118 - Source/OpenEXR/IlmImf/ImfStandardAttributes.h | 343 - Source/OpenEXR/IlmImf/ImfStdIO.cpp | 240 - Source/OpenEXR/IlmImf/ImfStdIO.h | 156 - Source/OpenEXR/IlmImf/ImfStringAttribute.cpp | 79 - Source/OpenEXR/IlmImf/ImfStringAttribute.h | 66 - Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp | 94 - Source/OpenEXR/IlmImf/ImfStringVectorAttribute.h | 66 - Source/OpenEXR/IlmImf/ImfTestFile.cpp | 135 - Source/OpenEXR/IlmImf/ImfTestFile.h | 63 - Source/OpenEXR/IlmImf/ImfThreading.cpp | 60 - Source/OpenEXR/IlmImf/ImfThreading.h | 92 - Source/OpenEXR/IlmImf/ImfTileDescription.h | 102 - .../OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp | 85 - .../OpenEXR/IlmImf/ImfTileDescriptionAttribute.h | 73 - Source/OpenEXR/IlmImf/ImfTileOffsets.cpp | 385 - Source/OpenEXR/IlmImf/ImfTileOffsets.h | 107 - Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp | 1302 -- Source/OpenEXR/IlmImf/ImfTiledInputFile.h | 381 - Source/OpenEXR/IlmImf/ImfTiledMisc.cpp | 301 - Source/OpenEXR/IlmImf/ImfTiledMisc.h | 75 - Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp | 1692 -- Source/OpenEXR/IlmImf/ImfTiledOutputFile.h | 475 - Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp | 1162 -- Source/OpenEXR/IlmImf/ImfTiledRgbaFile.h | 479 - Source/OpenEXR/IlmImf/ImfTimeCode.cpp | 415 - Source/OpenEXR/IlmImf/ImfTimeCode.h | 226 - Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp | 78 - Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.h | 72 - Source/OpenEXR/IlmImf/ImfVecAttribute.cpp | 216 - Source/OpenEXR/IlmImf/ImfVecAttribute.h | 101 - Source/OpenEXR/IlmImf/ImfVersion.cpp | 59 - Source/OpenEXR/IlmImf/ImfVersion.h | 120 - Source/OpenEXR/IlmImf/ImfWav.cpp | 390 - Source/OpenEXR/IlmImf/ImfWav.h | 70 - Source/OpenEXR/IlmImf/ImfXdr.h | 916 -- Source/OpenEXR/IlmImf/ImfZipCompressor.cpp | 240 - Source/OpenEXR/IlmImf/ImfZipCompressor.h | 83 - Source/OpenEXR/IlmImf/Makefile.am | 128 - Source/OpenEXR/IlmImf/Makefile.in | 736 - Source/OpenEXR/IlmImf/b44ExpLogTable.cpp | 136 - Source/OpenEXR/IlmImf/b44ExpLogTable.h | 16396 ------------------- Source/OpenEXR/IlmThread/IlmThread.cpp | 80 - Source/OpenEXR/IlmThread/IlmThread.h | 151 - Source/OpenEXR/IlmThread/IlmThreadMutex.cpp | 59 - Source/OpenEXR/IlmThread/IlmThreadMutex.h | 158 - Source/OpenEXR/IlmThread/IlmThreadMutexPosix.cpp | 85 - Source/OpenEXR/IlmThread/IlmThreadMutexWin32.cpp | 73 - Source/OpenEXR/IlmThread/IlmThreadPool.cpp | 456 - Source/OpenEXR/IlmThread/IlmThreadPool.h | 156 - Source/OpenEXR/IlmThread/IlmThreadPosix.cpp | 98 - Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp | 60 - Source/OpenEXR/IlmThread/IlmThreadSemaphore.h | 110 - .../OpenEXR/IlmThread/IlmThreadSemaphorePosix.cpp | 103 - .../IlmThread/IlmThreadSemaphorePosixCompat.cpp | 155 - .../OpenEXR/IlmThread/IlmThreadSemaphoreWin32.cpp | 146 - Source/OpenEXR/IlmThread/IlmThreadWin32.cpp | 95 - Source/OpenEXR/IlmThread/Makefile.am | 26 - Source/OpenEXR/IlmThread/Makefile.in | 539 - Source/OpenEXR/Imath/ImathBox.cpp | 37 - Source/OpenEXR/Imath/ImathBox.h | 850 - Source/OpenEXR/Imath/ImathBoxAlgo.h | 1015 -- Source/OpenEXR/Imath/ImathColor.h | 734 - Source/OpenEXR/Imath/ImathColorAlgo.cpp | 178 - Source/OpenEXR/Imath/ImathColorAlgo.h | 256 - Source/OpenEXR/Imath/ImathEuler.h | 924 -- Source/OpenEXR/Imath/ImathExc.h | 73 - Source/OpenEXR/Imath/ImathFrame.h | 190 - Source/OpenEXR/Imath/ImathFrustum.h | 739 - Source/OpenEXR/Imath/ImathFrustumTest.h | 410 - Source/OpenEXR/Imath/ImathFun.cpp | 181 - Source/OpenEXR/Imath/ImathFun.h | 267 - Source/OpenEXR/Imath/ImathGL.h | 159 - Source/OpenEXR/Imath/ImathGLU.h | 54 - Source/OpenEXR/Imath/ImathHalfLimits.h | 66 - Source/OpenEXR/Imath/ImathInt64.h | 61 - Source/OpenEXR/Imath/ImathInterval.h | 224 - Source/OpenEXR/Imath/ImathLimits.h | 267 - Source/OpenEXR/Imath/ImathLine.h | 184 - Source/OpenEXR/Imath/ImathLineAlgo.h | 287 - Source/OpenEXR/Imath/ImathMath.h | 208 - Source/OpenEXR/Imath/ImathMatrix.h | 3442 ---- Source/OpenEXR/Imath/ImathMatrixAlgo.cpp | 1251 -- Source/OpenEXR/Imath/ImathMatrixAlgo.h | 1435 -- Source/OpenEXR/Imath/ImathPlane.h | 256 - Source/OpenEXR/Imath/ImathPlatform.h | 112 - Source/OpenEXR/Imath/ImathQuat.h | 963 -- Source/OpenEXR/Imath/ImathRandom.cpp | 195 - Source/OpenEXR/Imath/ImathRandom.h | 398 - Source/OpenEXR/Imath/ImathRoots.h | 219 - Source/OpenEXR/Imath/ImathShear.cpp | 54 - Source/OpenEXR/Imath/ImathShear.h | 659 - Source/OpenEXR/Imath/ImathSphere.h | 177 - Source/OpenEXR/Imath/ImathVec.cpp | 540 - Source/OpenEXR/Imath/ImathVec.h | 2226 --- Source/OpenEXR/Imath/ImathVecAlgo.h | 146 - Source/OpenEXR/Imath/Makefile.am | 35 - Source/OpenEXR/Imath/Makefile.in | 547 - Source/OpenEXR/OpenEXR.2003.vcproj | 746 - Source/OpenEXR/OpenEXR.2005.vcproj | 1155 -- Source/OpenEXR/OpenEXR.2008.vcproj | 1156 -- Source/OpenEXR/OpenEXRConfig.h | 46 - Source/ZLib/ChangeLog | 1409 -- Source/ZLib/FAQ | 368 - Source/ZLib/INDEX | 68 - Source/ZLib/Makefile | 5 - Source/ZLib/Makefile.in | 288 - Source/ZLib/README | 115 - Source/ZLib/ZLib.2003.vcproj | 213 - Source/ZLib/ZLib.2005.vcproj | 445 - Source/ZLib/ZLib.2008.vcproj | 446 - Source/ZLib/adler32.c | 179 - Source/ZLib/compress.c | 80 - Source/ZLib/configure | 818 - Source/ZLib/crc32.c | 425 - Source/ZLib/crc32.h | 441 - Source/ZLib/deflate.c | 1965 --- Source/ZLib/deflate.h | 346 - Source/ZLib/gzclose.c | 25 - Source/ZLib/gzguts.h | 193 - Source/ZLib/gzlib.c | 620 - Source/ZLib/gzread.c | 589 - Source/ZLib/gzwrite.c | 565 - Source/ZLib/infback.c | 640 - Source/ZLib/inffast.c | 340 - Source/ZLib/inffast.h | 11 - Source/ZLib/inffixed.h | 94 - Source/ZLib/inflate.c | 1496 -- Source/ZLib/inflate.h | 122 - Source/ZLib/inftrees.c | 306 - Source/ZLib/inftrees.h | 62 - Source/ZLib/trees.c | 1224 -- Source/ZLib/trees.h | 128 - Source/ZLib/uncompr.c | 59 - Source/ZLib/zconf.h | 506 - Source/ZLib/zconf.h.in | 506 - Source/ZLib/zlib.3 | 151 - Source/ZLib/zlib.h | 1744 -- Source/ZLib/zutil.c | 324 - Source/ZLib/zutil.h | 252 - 400 files changed, 219580 deletions(-) delete mode 100644 Source/LibOpenJPEG/AUTHORS delete mode 100644 Source/LibOpenJPEG/CHANGES delete mode 100644 Source/LibOpenJPEG/INSTALL delete mode 100644 Source/LibOpenJPEG/LICENSE delete mode 100644 Source/LibOpenJPEG/LibOpenJPEG.2003.vcproj delete mode 100644 Source/LibOpenJPEG/LibOpenJPEG.2005.vcproj delete mode 100644 Source/LibOpenJPEG/LibOpenJPEG.2008.vcproj delete mode 100644 Source/LibOpenJPEG/NEWS delete mode 100644 Source/LibOpenJPEG/README delete mode 100644 Source/LibOpenJPEG/THANKS delete mode 100644 Source/LibOpenJPEG/bio.c delete mode 100644 Source/LibOpenJPEG/bio.h delete mode 100644 Source/LibOpenJPEG/cidx_manager.c delete mode 100644 Source/LibOpenJPEG/cidx_manager.h delete mode 100644 Source/LibOpenJPEG/cio.c delete mode 100644 Source/LibOpenJPEG/cio.h delete mode 100644 Source/LibOpenJPEG/dwt.c delete mode 100644 Source/LibOpenJPEG/dwt.h delete mode 100644 Source/LibOpenJPEG/event.c delete mode 100644 Source/LibOpenJPEG/event.h delete mode 100644 Source/LibOpenJPEG/fix.h delete mode 100644 Source/LibOpenJPEG/image.c delete mode 100644 Source/LibOpenJPEG/image.h delete mode 100644 Source/LibOpenJPEG/indexbox_manager.h delete mode 100644 Source/LibOpenJPEG/int.h delete mode 100644 Source/LibOpenJPEG/j2k.c delete mode 100644 Source/LibOpenJPEG/j2k.h delete mode 100644 Source/LibOpenJPEG/j2k_lib.c delete mode 100644 Source/LibOpenJPEG/j2k_lib.h delete mode 100644 Source/LibOpenJPEG/jp2.c delete mode 100644 Source/LibOpenJPEG/jp2.h delete mode 100644 Source/LibOpenJPEG/jpt.c delete mode 100644 Source/LibOpenJPEG/jpt.h delete mode 100644 Source/LibOpenJPEG/mct.c delete mode 100644 Source/LibOpenJPEG/mct.h delete mode 100644 Source/LibOpenJPEG/mqc.c delete mode 100644 Source/LibOpenJPEG/mqc.h delete mode 100644 Source/LibOpenJPEG/openjpeg.c delete mode 100644 Source/LibOpenJPEG/openjpeg.h delete mode 100644 Source/LibOpenJPEG/opj_config.h delete mode 100644 Source/LibOpenJPEG/opj_includes.h delete mode 100644 Source/LibOpenJPEG/opj_malloc.h delete mode 100644 Source/LibOpenJPEG/phix_manager.c delete mode 100644 Source/LibOpenJPEG/pi.c delete mode 100644 Source/LibOpenJPEG/pi.h delete mode 100644 Source/LibOpenJPEG/ppix_manager.c delete mode 100644 Source/LibOpenJPEG/raw.c delete mode 100644 Source/LibOpenJPEG/raw.h delete mode 100644 Source/LibOpenJPEG/t1.c delete mode 100644 Source/LibOpenJPEG/t1.h delete mode 100644 Source/LibOpenJPEG/t1_generate_luts.c delete mode 100644 Source/LibOpenJPEG/t1_luts.h delete mode 100644 Source/LibOpenJPEG/t2.c delete mode 100644 Source/LibOpenJPEG/t2.h delete mode 100644 Source/LibOpenJPEG/tcd.c delete mode 100644 Source/LibOpenJPEG/tcd.h delete mode 100644 Source/LibOpenJPEG/tgt.c delete mode 100644 Source/LibOpenJPEG/tgt.h delete mode 100644 Source/LibOpenJPEG/thix_manager.c delete mode 100644 Source/LibOpenJPEG/tpix_manager.c delete mode 100644 Source/LibPNG/ANNOUNCE delete mode 100644 Source/LibPNG/CHANGES delete mode 100644 Source/LibPNG/INSTALL delete mode 100644 Source/LibPNG/LICENSE delete mode 100644 Source/LibPNG/LibPNG.2003.vcproj delete mode 100644 Source/LibPNG/LibPNG.2005.vcproj delete mode 100644 Source/LibPNG/LibPNG.2008.vcproj delete mode 100644 Source/LibPNG/README delete mode 100644 Source/LibPNG/TODO delete mode 100644 Source/LibPNG/configure delete mode 100644 Source/LibPNG/example.c delete mode 100644 Source/LibPNG/libpng-manual.txt delete mode 100644 Source/LibPNG/libpng.3 delete mode 100644 Source/LibPNG/libpngpf.3 delete mode 100644 Source/LibPNG/png.5 delete mode 100644 Source/LibPNG/png.c delete mode 100644 Source/LibPNG/png.h delete mode 100644 Source/LibPNG/pngconf.h delete mode 100644 Source/LibPNG/pngdebug.h delete mode 100644 Source/LibPNG/pngerror.c delete mode 100644 Source/LibPNG/pngget.c delete mode 100644 Source/LibPNG/pnginfo.h delete mode 100644 Source/LibPNG/pnglibconf.h delete mode 100644 Source/LibPNG/pngmem.c delete mode 100644 Source/LibPNG/pngpread.c delete mode 100644 Source/LibPNG/pngpriv.h delete mode 100644 Source/LibPNG/pngread.c delete mode 100644 Source/LibPNG/pngrio.c delete mode 100644 Source/LibPNG/pngrtran.c delete mode 100644 Source/LibPNG/pngrutil.c delete mode 100644 Source/LibPNG/pngset.c delete mode 100644 Source/LibPNG/pngstruct.h delete mode 100644 Source/LibPNG/pngtest.c delete mode 100644 Source/LibPNG/pngtrans.c delete mode 100644 Source/LibPNG/pngwio.c delete mode 100644 Source/LibPNG/pngwrite.c delete mode 100644 Source/LibPNG/pngwtran.c delete mode 100644 Source/LibPNG/pngwutil.c delete mode 100644 Source/LibRawLite/COPYRIGHT delete mode 100644 Source/LibRawLite/Changelog.txt delete mode 100644 Source/LibRawLite/LICENSE.CDDL delete mode 100644 Source/LibRawLite/LICENSE.LGPL delete mode 100644 Source/LibRawLite/LibRawLite.2003.vcproj delete mode 100644 Source/LibRawLite/LibRawLite.2005.vcproj delete mode 100644 Source/LibRawLite/LibRawLite.2008.vcproj delete mode 100644 Source/LibRawLite/README delete mode 100644 Source/LibRawLite/README.demosaic-packs delete mode 100644 Source/LibRawLite/dcraw/dcraw.c delete mode 100644 Source/LibRawLite/internal/dcb_demosaicing.c delete mode 100644 Source/LibRawLite/internal/dcraw_common.cpp delete mode 100644 Source/LibRawLite/internal/dcraw_fileio.cpp delete mode 100644 Source/LibRawLite/internal/defines.h delete mode 100644 Source/LibRawLite/internal/demosaic_packs.cpp delete mode 100644 Source/LibRawLite/internal/libraw_bytebuffer.h delete mode 100644 Source/LibRawLite/internal/libraw_internal_funcs.h delete mode 100644 Source/LibRawLite/internal/var_defines.h delete mode 100644 Source/LibRawLite/libraw/libraw.h delete mode 100644 Source/LibRawLite/libraw/libraw_alloc.h delete mode 100644 Source/LibRawLite/libraw/libraw_const.h delete mode 100644 Source/LibRawLite/libraw/libraw_datastream.h delete mode 100644 Source/LibRawLite/libraw/libraw_internal.h delete mode 100644 Source/LibRawLite/libraw/libraw_types.h delete mode 100644 Source/LibRawLite/libraw/libraw_version.h delete mode 100644 Source/LibRawLite/src/libraw_c_api.cpp delete mode 100644 Source/LibRawLite/src/libraw_cxx.cpp delete mode 100644 Source/LibRawLite/src/libraw_datastream.cpp delete mode 100644 Source/OpenEXR/Copyrights/ilmbase/AUTHORS delete mode 100644 Source/OpenEXR/Copyrights/ilmbase/COPYING delete mode 100644 Source/OpenEXR/Copyrights/ilmbase/ChangeLog delete mode 100644 Source/OpenEXR/Copyrights/ilmbase/INSTALL delete mode 100644 Source/OpenEXR/Copyrights/ilmbase/LICENSE delete mode 100644 Source/OpenEXR/Copyrights/ilmbase/NEWS delete mode 100644 Source/OpenEXR/Copyrights/ilmbase/README delete mode 100644 Source/OpenEXR/Copyrights/ilmbase/README.CVS delete mode 100644 Source/OpenEXR/Copyrights/ilmbase/README.OSX delete mode 100644 Source/OpenEXR/Copyrights/ilmbase/README.win32 delete mode 100644 Source/OpenEXR/Copyrights/openexr/AUTHORS delete mode 100644 Source/OpenEXR/Copyrights/openexr/COPYING delete mode 100644 Source/OpenEXR/Copyrights/openexr/ChangeLog delete mode 100644 Source/OpenEXR/Copyrights/openexr/INSTALL delete mode 100644 Source/OpenEXR/Copyrights/openexr/LICENSE delete mode 100644 Source/OpenEXR/Copyrights/openexr/NEWS delete mode 100644 Source/OpenEXR/Copyrights/openexr/README delete mode 100644 Source/OpenEXR/Copyrights/openexr/README.CVS delete mode 100644 Source/OpenEXR/Copyrights/openexr/README.OSX delete mode 100644 Source/OpenEXR/Copyrights/openexr/README.win32 delete mode 100644 Source/OpenEXR/Half/Makefile.am delete mode 100644 Source/OpenEXR/Half/Makefile.in delete mode 100644 Source/OpenEXR/Half/eLut.cpp delete mode 100644 Source/OpenEXR/Half/eLut.h delete mode 100644 Source/OpenEXR/Half/half.cpp delete mode 100644 Source/OpenEXR/Half/half.h delete mode 100644 Source/OpenEXR/Half/halfFunction.h delete mode 100644 Source/OpenEXR/Half/halfLimits.h delete mode 100644 Source/OpenEXR/Half/toFloat.cpp delete mode 100644 Source/OpenEXR/Half/toFloat.h delete mode 100644 Source/OpenEXR/Iex/Iex.h delete mode 100644 Source/OpenEXR/Iex/IexBaseExc.cpp delete mode 100644 Source/OpenEXR/Iex/IexBaseExc.h delete mode 100644 Source/OpenEXR/Iex/IexErrnoExc.h delete mode 100644 Source/OpenEXR/Iex/IexMacros.h delete mode 100644 Source/OpenEXR/Iex/IexMathExc.h delete mode 100644 Source/OpenEXR/Iex/IexThrowErrnoExc.cpp delete mode 100644 Source/OpenEXR/Iex/IexThrowErrnoExc.h delete mode 100644 Source/OpenEXR/Iex/Makefile.am delete mode 100644 Source/OpenEXR/Iex/Makefile.in delete mode 100644 Source/OpenEXR/IlmBaseConfig.h delete mode 100644 Source/OpenEXR/IlmImf/ImfAcesFile.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfAcesFile.h delete mode 100644 Source/OpenEXR/IlmImf/ImfArray.h delete mode 100644 Source/OpenEXR/IlmImf/ImfAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfAutoArray.h delete mode 100644 Source/OpenEXR/IlmImf/ImfB44Compressor.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfB44Compressor.h delete mode 100644 Source/OpenEXR/IlmImf/ImfBoxAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfBoxAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfCRgbaFile.h delete mode 100644 Source/OpenEXR/IlmImf/ImfChannelList.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfChannelList.h delete mode 100644 Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfChannelListAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfCheckedArithmetic.h delete mode 100644 Source/OpenEXR/IlmImf/ImfChromaticities.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfChromaticities.h delete mode 100644 Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfCompression.h delete mode 100644 Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfCompressionAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfCompressor.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfCompressor.h delete mode 100644 Source/OpenEXR/IlmImf/ImfConvert.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfConvert.h delete mode 100644 Source/OpenEXR/IlmImf/ImfDoubleAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfDoubleAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfEnvmap.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfEnvmap.h delete mode 100644 Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfEnvmapAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfFloatAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfFloatAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfFrameBuffer.h delete mode 100644 Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfFramesPerSecond.h delete mode 100644 Source/OpenEXR/IlmImf/ImfHeader.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfHeader.h delete mode 100644 Source/OpenEXR/IlmImf/ImfHuf.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfHuf.h delete mode 100644 Source/OpenEXR/IlmImf/ImfIO.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfIO.h delete mode 100644 Source/OpenEXR/IlmImf/ImfInputFile.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfInputFile.h delete mode 100644 Source/OpenEXR/IlmImf/ImfInt64.h delete mode 100644 Source/OpenEXR/IlmImf/ImfIntAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfIntAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfKeyCode.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfKeyCode.h delete mode 100644 Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfLineOrder.h delete mode 100644 Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfLineOrderAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfLut.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfLut.h delete mode 100644 Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfMatrixAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfMisc.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfMisc.h delete mode 100644 Source/OpenEXR/IlmImf/ImfMultiView.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfMultiView.h delete mode 100644 Source/OpenEXR/IlmImf/ImfName.h delete mode 100644 Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfOpaqueAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfOutputFile.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfOutputFile.h delete mode 100644 Source/OpenEXR/IlmImf/ImfPixelType.h delete mode 100644 Source/OpenEXR/IlmImf/ImfPizCompressor.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfPizCompressor.h delete mode 100644 Source/OpenEXR/IlmImf/ImfPreviewImage.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfPreviewImage.h delete mode 100644 Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfPxr24Compressor.h delete mode 100644 Source/OpenEXR/IlmImf/ImfRational.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfRational.h delete mode 100644 Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfRationalAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfRgba.h delete mode 100644 Source/OpenEXR/IlmImf/ImfRgbaFile.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfRgbaFile.h delete mode 100644 Source/OpenEXR/IlmImf/ImfRgbaYca.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfRgbaYca.h delete mode 100644 Source/OpenEXR/IlmImf/ImfRleCompressor.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfRleCompressor.h delete mode 100644 Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfScanLineInputFile.h delete mode 100644 Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfStandardAttributes.h delete mode 100644 Source/OpenEXR/IlmImf/ImfStdIO.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfStdIO.h delete mode 100644 Source/OpenEXR/IlmImf/ImfStringAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfStringAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfStringVectorAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfTestFile.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfTestFile.h delete mode 100644 Source/OpenEXR/IlmImf/ImfThreading.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfThreading.h delete mode 100644 Source/OpenEXR/IlmImf/ImfTileDescription.h delete mode 100644 Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfTileOffsets.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfTileOffsets.h delete mode 100644 Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfTiledInputFile.h delete mode 100644 Source/OpenEXR/IlmImf/ImfTiledMisc.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfTiledMisc.h delete mode 100644 Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfTiledOutputFile.h delete mode 100644 Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfTiledRgbaFile.h delete mode 100644 Source/OpenEXR/IlmImf/ImfTimeCode.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfTimeCode.h delete mode 100644 Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfVecAttribute.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfVecAttribute.h delete mode 100644 Source/OpenEXR/IlmImf/ImfVersion.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfVersion.h delete mode 100644 Source/OpenEXR/IlmImf/ImfWav.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfWav.h delete mode 100644 Source/OpenEXR/IlmImf/ImfXdr.h delete mode 100644 Source/OpenEXR/IlmImf/ImfZipCompressor.cpp delete mode 100644 Source/OpenEXR/IlmImf/ImfZipCompressor.h delete mode 100644 Source/OpenEXR/IlmImf/Makefile.am delete mode 100644 Source/OpenEXR/IlmImf/Makefile.in delete mode 100644 Source/OpenEXR/IlmImf/b44ExpLogTable.cpp delete mode 100644 Source/OpenEXR/IlmImf/b44ExpLogTable.h delete mode 100644 Source/OpenEXR/IlmThread/IlmThread.cpp delete mode 100644 Source/OpenEXR/IlmThread/IlmThread.h delete mode 100644 Source/OpenEXR/IlmThread/IlmThreadMutex.cpp delete mode 100644 Source/OpenEXR/IlmThread/IlmThreadMutex.h delete mode 100644 Source/OpenEXR/IlmThread/IlmThreadMutexPosix.cpp delete mode 100644 Source/OpenEXR/IlmThread/IlmThreadMutexWin32.cpp delete mode 100644 Source/OpenEXR/IlmThread/IlmThreadPool.cpp delete mode 100644 Source/OpenEXR/IlmThread/IlmThreadPool.h delete mode 100644 Source/OpenEXR/IlmThread/IlmThreadPosix.cpp delete mode 100644 Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp delete mode 100644 Source/OpenEXR/IlmThread/IlmThreadSemaphore.h delete mode 100644 Source/OpenEXR/IlmThread/IlmThreadSemaphorePosix.cpp delete mode 100644 Source/OpenEXR/IlmThread/IlmThreadSemaphorePosixCompat.cpp delete mode 100644 Source/OpenEXR/IlmThread/IlmThreadSemaphoreWin32.cpp delete mode 100644 Source/OpenEXR/IlmThread/IlmThreadWin32.cpp delete mode 100644 Source/OpenEXR/IlmThread/Makefile.am delete mode 100644 Source/OpenEXR/IlmThread/Makefile.in delete mode 100644 Source/OpenEXR/Imath/ImathBox.cpp delete mode 100644 Source/OpenEXR/Imath/ImathBox.h delete mode 100644 Source/OpenEXR/Imath/ImathBoxAlgo.h delete mode 100644 Source/OpenEXR/Imath/ImathColor.h delete mode 100644 Source/OpenEXR/Imath/ImathColorAlgo.cpp delete mode 100644 Source/OpenEXR/Imath/ImathColorAlgo.h delete mode 100644 Source/OpenEXR/Imath/ImathEuler.h delete mode 100644 Source/OpenEXR/Imath/ImathExc.h delete mode 100644 Source/OpenEXR/Imath/ImathFrame.h delete mode 100644 Source/OpenEXR/Imath/ImathFrustum.h delete mode 100644 Source/OpenEXR/Imath/ImathFrustumTest.h delete mode 100644 Source/OpenEXR/Imath/ImathFun.cpp delete mode 100644 Source/OpenEXR/Imath/ImathFun.h delete mode 100644 Source/OpenEXR/Imath/ImathGL.h delete mode 100644 Source/OpenEXR/Imath/ImathGLU.h delete mode 100644 Source/OpenEXR/Imath/ImathHalfLimits.h delete mode 100644 Source/OpenEXR/Imath/ImathInt64.h delete mode 100644 Source/OpenEXR/Imath/ImathInterval.h delete mode 100644 Source/OpenEXR/Imath/ImathLimits.h delete mode 100644 Source/OpenEXR/Imath/ImathLine.h delete mode 100644 Source/OpenEXR/Imath/ImathLineAlgo.h delete mode 100644 Source/OpenEXR/Imath/ImathMath.h delete mode 100644 Source/OpenEXR/Imath/ImathMatrix.h delete mode 100644 Source/OpenEXR/Imath/ImathMatrixAlgo.cpp delete mode 100644 Source/OpenEXR/Imath/ImathMatrixAlgo.h delete mode 100644 Source/OpenEXR/Imath/ImathPlane.h delete mode 100644 Source/OpenEXR/Imath/ImathPlatform.h delete mode 100644 Source/OpenEXR/Imath/ImathQuat.h delete mode 100644 Source/OpenEXR/Imath/ImathRandom.cpp delete mode 100644 Source/OpenEXR/Imath/ImathRandom.h delete mode 100644 Source/OpenEXR/Imath/ImathRoots.h delete mode 100644 Source/OpenEXR/Imath/ImathShear.cpp delete mode 100644 Source/OpenEXR/Imath/ImathShear.h delete mode 100644 Source/OpenEXR/Imath/ImathSphere.h delete mode 100644 Source/OpenEXR/Imath/ImathVec.cpp delete mode 100644 Source/OpenEXR/Imath/ImathVec.h delete mode 100644 Source/OpenEXR/Imath/ImathVecAlgo.h delete mode 100644 Source/OpenEXR/Imath/Makefile.am delete mode 100644 Source/OpenEXR/Imath/Makefile.in delete mode 100644 Source/OpenEXR/OpenEXR.2003.vcproj delete mode 100644 Source/OpenEXR/OpenEXR.2005.vcproj delete mode 100644 Source/OpenEXR/OpenEXR.2008.vcproj delete mode 100644 Source/OpenEXR/OpenEXRConfig.h delete mode 100644 Source/ZLib/ChangeLog delete mode 100644 Source/ZLib/FAQ delete mode 100644 Source/ZLib/INDEX delete mode 100644 Source/ZLib/Makefile delete mode 100644 Source/ZLib/Makefile.in delete mode 100644 Source/ZLib/README delete mode 100644 Source/ZLib/ZLib.2003.vcproj delete mode 100644 Source/ZLib/ZLib.2005.vcproj delete mode 100644 Source/ZLib/ZLib.2008.vcproj delete mode 100644 Source/ZLib/adler32.c delete mode 100644 Source/ZLib/compress.c delete mode 100644 Source/ZLib/configure delete mode 100644 Source/ZLib/crc32.c delete mode 100644 Source/ZLib/crc32.h delete mode 100644 Source/ZLib/deflate.c delete mode 100644 Source/ZLib/deflate.h delete mode 100644 Source/ZLib/gzclose.c delete mode 100644 Source/ZLib/gzguts.h delete mode 100644 Source/ZLib/gzlib.c delete mode 100644 Source/ZLib/gzread.c delete mode 100644 Source/ZLib/gzwrite.c delete mode 100644 Source/ZLib/infback.c delete mode 100644 Source/ZLib/inffast.c delete mode 100644 Source/ZLib/inffast.h delete mode 100644 Source/ZLib/inffixed.h delete mode 100644 Source/ZLib/inflate.c delete mode 100644 Source/ZLib/inflate.h delete mode 100644 Source/ZLib/inftrees.c delete mode 100644 Source/ZLib/inftrees.h delete mode 100644 Source/ZLib/trees.c delete mode 100644 Source/ZLib/trees.h delete mode 100644 Source/ZLib/uncompr.c delete mode 100644 Source/ZLib/zconf.h delete mode 100644 Source/ZLib/zconf.h.in delete mode 100644 Source/ZLib/zlib.3 delete mode 100644 Source/ZLib/zlib.h delete mode 100644 Source/ZLib/zutil.c delete mode 100644 Source/ZLib/zutil.h diff --git a/Source/LibOpenJPEG/AUTHORS b/Source/LibOpenJPEG/AUTHORS deleted file mode 100644 index dd765ac..0000000 --- a/Source/LibOpenJPEG/AUTHORS +++ /dev/null @@ -1,13 +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. -Yannick Verschueren, -Herve Drolon, -Francois-Olivier Devaux, -Antonin Descampe - improved the libraries and utilities. - diff --git a/Source/LibOpenJPEG/CHANGES b/Source/LibOpenJPEG/CHANGES deleted file mode 100644 index ab21f8a..0000000 --- a/Source/LibOpenJPEG/CHANGES +++ /dev/null @@ -1,425 +0,0 @@ -2012-09-10 Mathieu Malaterre - - * [r1920] NEWS: [1.5] update NEWS file - * [r1919] libopenjpeg/j2k.c: [1.5] Fix Heap-based buffer-overflow - when decoding openjpeg image - - Thanks to Huzaifa Sidhpurwala of Red Hat Security Response Team - for dataset to reproduce the issue. - Fixes issue 170 - * [r1917] libopenjpeg/event.c: [1.5] Fix issue with str_length not - being used. Rewrite code to prefer use of vsnprintf to prevent - potential buffer overflow. - * [r1914] libopenjpeg/jpwl/crc.c, libopenjpeg/jpwl/jpwl_lib.c: - [1.5] remove extra trailing semicolon - -2012-08-24 Mathieu Malaterre - - * [r1899] applications/codec/j2k_dump.c, - applications/jpip/libopenjpip/byte_manager.c, - libopenjpeg/jpwl/jpwl_lib.c, libopenjpeg/tcd.c: [1.5] COMP: Fix - warnings identified by clang31 - - openjpeg/libopenjpeg/tcd.c:1884 col 48: warning: comparison of - unsigned expressi - on < 0 is always false - - openjpeg/applications/codec/j2k_dump.c:362 col 29: warning: - equality comparison - with extraneous parentheses - - openjpeg/libopenjpeg/jpwl/jpwl_lib.c:680:19: warning: format - specifies type 'int - ' but the argument has type 'long long' [-Wformat] - printf("Marker@%d: %X\n", cio_tell(cio) - 2, id); - ~^ ~~~~~~~~~~~~~~~~~ - %lld - - openjpeg/applications/jpip/libopenjpip/byte_manager.c:58:63: - warning: format spe - cifies type 'long' but the argument has type 'OPJ_OFF_T' (aka - 'long long') [-Wfo - rmat] - fprintf( FCGI_stderr, "Error: error in fetch_bytes( %d, %ld, - %lu)\n", fd, offset - , size); - - Author: Hans Johnson - -2012-07-29 Mathieu Malaterre - - * [r1736] applications/jpip/libopenjpip/sock_manager.c: [1.5] - Import portion of patch from Alex Zimnitsky to fix compilation on - FreeBSD - -2012-07-11 Mathieu Malaterre - - * [r1733] libopenjpeg/cio.c, libopenjpeg/cio.h: [1.5] Fix - compilation issue with Compiler Borland C++ v. 5.5 - - Fixes issue 154 - * [r1732] libopenjpeg/j2k.c: [1.5] Fix r1727 (Issue 156) to compile - on compilers where false is not defined. - * [r1729] libopenjpeg/j2k.c, libopenjpeg/tcd.c: [1.5] This fixes - issues seen on PDF files - - Fixes issue 156 - -2012-07-10 Mathieu Malaterre - - * [r1727] libopenjpeg/j2k.c: [1.5] Fix heap buffer overflow - - Enforce sanity checks on tile number and tile length, even when - the (rather - broken) USE_JPWL code isn't enabled. - -2012-05-29 Mathieu Malaterre - - * [r1705] libopenjpeg/jp2.c: [1.5] jp2_read_boxhdr() call ignores - return value - Fixes issue 91 - * [r1704] applications/mj2/frames_to_mj2.c, applications/mj2/mj2.c, - applications/mj2/mj2_convert.c: [1.5] Make sure openjpeg/mj2 can - be compiled with gcc -std=c89 - * [r1703] libopenjpeg/tcd.c: [1.5] This commit hides symptoms of - CVE-2009-5030 - - As explained in issue 5, comment 1. This is an easy fix to avoid - memory overrun. - Update issue 5 - Update issue 62 - * [r1702] libopenjpeg/j2k.c, - tests/nonregression/test_suite.ctest.in: [1.5] Applying old patch - from r1642, with further modification from winfried. Also enable - failing test. Everything seems to be working well now. - Fixes issue 150 - * [r1701] libopenjpeg/tcd.c: [1.5] Import r1669 from trunk over to - 1.5 branch - * [r1700] libopenjpeg/j2k.c, libopenjpeg/t1.c, libopenjpeg/t2.c, - libopenjpeg/tcd.c: [1.5] Apply private patch from Alex Macfarlane - Smith - This gets rids of a lot memory leaks when used on device with low - memory - * [r1696] applications/codec/convert.c, libopenjpeg/jp2.c: [1.5] - The two files in Issue145 have a precision < 8-bit: - therefore 'jp2_read_pclr' must be changed. - - j2k_to_image fails to create RGB/RGBA images with a - precision < 8-bit: therefore 'imagetopng' must be - changed. - Update issue 145 - * [r1694] libopenjpeg-jpwl.pc.in, libopenjpeg/Makefile.am: [1.5] - Fix autotools installation. Thanks to winfried for patch. - Update issue 149 - * [r1693] libopenjpeg/opj_malloc.h: [1.5] Fix compilation on - FreeBSD. Thanks to rafael carre (funman@videolan.org) for patch. - - Fixes issue 111 - -2012-05-21 Mathieu Malaterre - - * [r1686] libopenjpeg/opj_malloc.h: [1.5] Build fails on AIX - - Fixes issue 139 - * [r1683] doc/man/man1/image_to_j2k.1, doc/man/man1/j2k_to_image.1, - doc/man/man3/libopenjpeg.3: [1.5] Man page syntax fixes. Thanks - to vskytta for patch. - - Fixes issue 147 - * [r1682] libopenjpeg/tcd.c: [1.5] fix compilation warning about - lrintf being implicit. - - Fixes issue 144 - -2012-04-23 Mathieu Malaterre - - * [r1649] libopenjpeg/j2k.c: [1.5] Revert r1642, as explained on - https://groups.google.com/group/openjpeg/msg/77a67fef94a0309b - * [r1648] tests/nonregression/test_suite.ctest.in: [1.5] Adding - test suite for file409752.jp2 - * [r1647] CMakeLists.txt: [1.5] Make it easier to find /data from - within 1.5 sub-branch - * [r1643] applications/JavaOpenJPEG/JavaOpenJPEG.c, - applications/JavaOpenJPEG/JavaOpenJPEGDecoder.c, - applications/codec/convert.c: [1.5] Integrate patch from winfried - posted on the mailing list. See here for more info: - https://groups.google.com/group/openjpeg/msg/6488859a0dce77 - * [r1642] libopenjpeg/j2k.c: [1.5] Integrate patch from winfried - posted on the mailing list. See here for more info: - https://groups.google.com/group/openjpeg/msg/1bbf7ae7ddee3a51 - * [r1640] applications/mj2/extract_j2k_from_mj2.c, - applications/mj2/frames_to_mj2.c, applications/mj2/mj2.h, - applications/mj2/mj2_to_frames.c, - applications/mj2/wrap_j2k_in_mj2.c, libopenjpeg/openjpeg.h: [1.5] - Integrate patch from winfried posted on the mailing list. See - here for more info: - https://groups.google.com/group/openjpeg/msg/7e30b6e288ad5908 - -2012-04-20 Mathieu Malaterre - - * [r1637] applications/jpip/util/CMakeLists.txt, - applications/jpip/util/addXMLinJP2.c: [1.5] Need to - compile/install tool to embed XML file in JP2 for jpip server - -2012-04-19 Mathieu Malaterre - - * [r1636] applications/JavaOpenJPEG/CMakeLists.txt, - applications/jpip/util/CMakeLists.txt: [1.5] jar files are arch - independant. We can install them safely in share - * [r1635] applications/jpip/util/CMakeLists.txt: [1.5] Add install - rules for openjpip client - * [r1634] applications/JavaOpenJPEG/CMakeLists.txt: [1.5] Add - missing symbols from getopt into the java glue lib - * [r1633] applications/JavaOpenJPEG/CMakeLists.txt: [1.5] resolve - missing symbols from convert.c/index.c - * [r1632] applications/JavaOpenJPEG/CMakeLists.txt: [1.5] Add - explicit linking from glue java lib to real openjpeg lib - * [r1631] applications/JavaOpenJPEG/CMakeLists.txt: [1.5] install - java module - * [r1630] CMake/OpenJPEGConfig.cmake.in, CMakeLists.txt: [1.5] Fix - computation of relative path from include/ to lib/ - -2012-04-18 Mathieu Malaterre - - * [r1629] CMakeLists.txt, libopenjpeg/jpwl/CMakeLists.txt, - tests/unit/testempty1.c, tests/unit/testempty2.c: [1.5] fix - compilation warnings on windows box - -2012-04-16 Mathieu Malaterre - - * [r1628] libopenjpeg/jpwl/CMakeLists.txt: [1.5] debian tools - detected a missing link to math lib - -2012-04-06 Mathieu Malaterre - - * [r1626] tests/CMakeLists.txt, tests/unit, - tests/unit/CMakeLists.txt, tests/unit/testempty1.c, - tests/unit/testempty2.c: [1.5] Adding some simple unit tests - -2012-04-05 Mathieu Malaterre - - * [r1625] CMakeLists.txt: [1.5] introduce fix for the SOVERSION - regression introduced in 1.5.0 - -2012-03-16 Mathieu Malaterre - - * [r1571] applications/jpip/libopenjpip/j2kheader_manager.c, - applications/jpip/libopenjpip/query_parser.c: [1.5] Remove a - simple warning report - * [r1570] applications/jpip/libopenjpip/query_parser.c: [1.5] I - think == was meant here. - -2012-03-02 Mathieu Malaterre - - * [r1534] applications/jpip/libopenjpip/channel_manager.c: [1.5] - Remove a warning about undefined snprintf on windows compiler. - * [r1533] applications/jpip/libopenjpip/auxtrans_manager.c, - applications/jpip/libopenjpip/byte_manager.h, - applications/jpip/libopenjpip/channel_manager.c, - applications/jpip/libopenjpip/channel_manager.h, - applications/jpip/libopenjpip/codestream_manager.c, - applications/jpip/libopenjpip/j2kheader_manager.c, - applications/jpip/libopenjpip/jp2k_decoder.c, - applications/jpip/libopenjpip/manfbox_manager.c, - applications/jpip/libopenjpip/marker_manager.c, - applications/jpip/libopenjpip/mhixbox_manager.c, - applications/jpip/libopenjpip/session_manager.c, - applications/jpip/libopenjpip/session_manager.h: [1.5] Change the - logic in byte_manager.h. Prefer the use of stdint.h when - available. Default to compiler specific mecanism otherwise. - Remove some c++ comments. Fix signed vs unsigned comparison - * [r1527] doc/CMakeLists.txt, doc/Doxyfile.dox.cmake.in: [1.5] - Finish import of r963 - * [r1526] ., doc/Doxyfile.dox, doc/Doxyfile.dox.cmake.in, - doc/mainpage.dox.cmake[CPY]: [1.5] merge r963 from trunk over to - branch 1.5 - * [r1524] tests/nonregression/test_suite.ctest.in: [1.5] Convert - from DOS eol to UNIX eol - * [r1517] libopenjpeg/jpwl/README.txt, libopenjpeg/jpwl/crc.c, - libopenjpeg/jpwl/jpwl.c: [1.5] Set from DOS eol to UNIX eol - * [r1510] libopenjpeg/cidx_manager.c: [1.5] Sync with trunk and - remove uneeded include headers - * [r1506] applications/mj2/extract_j2k_from_mj2.c, - applications/mj2/frames_to_mj2.c, applications/mj2/mj2.c: [1.5] - Import rev 1053 from trunk over to 1.5 - * [r1504] applications/codec/j2k_dump.c: [1.5] Fix typo in date. - * [r1496] applications/jpip/libopenjpip/comMakefile.mk[DEL]: [1.5] - Sync with trunk. Remove remainings bits of old Makefile based - build system - * [r1492] applications/codec/index.c, applications/codec/index.h, - applications/codec/windirent.h: [1.5] Convert from DOS eol to - UNIX eol - * [r1488] applications/OPJViewer/CMakeLists.txt, - applications/OPJViewer/OPJViewer.iss, - applications/OPJViewer/Readme.txt, - applications/OPJViewer/about/about.htm, - applications/OPJViewer/source/OPJAbout.cpp, - applications/OPJViewer/source/OPJChild16.xpm, - applications/OPJViewer/source/OPJDialogs.cpp, - applications/OPJViewer/source/OPJThreads.cpp, - applications/OPJViewer/source/OPJViewer.cpp, - applications/OPJViewer/source/OPJViewer.h, - applications/OPJViewer/source/OPJViewer.rc, - applications/OPJViewer/source/OPJViewer16.xpm, - applications/OPJViewer/source/about_htm.h, - applications/OPJViewer/source/build.h, - applications/OPJViewer/source/imagjpeg2000.cpp, - applications/OPJViewer/source/imagjpeg2000.h, - applications/OPJViewer/source/imagmxf.cpp, - applications/OPJViewer/source/imagmxf.h, - applications/OPJViewer/source/license.txt, - applications/OPJViewer/source/readmeafter.txt, - applications/OPJViewer/source/readmebefore.txt, - applications/OPJViewer/source/wxj2kparser.cpp, - applications/OPJViewer/source/wxjp2parser.cpp: [1.5] Use UNIX eol - for source code - * [r1486] INSTALL: [1.5] Sync with trunk. - * [r1482] CMakeLists.txt: [1.5] As discussed on the mailing list. - OpenJPEG should be compatible with Multi-Arch distros. Thanks to - Rex for report - * [r1481] applications/jpip/libopenjpip/box_manager.c, - applications/jpip/libopenjpip/box_manager.h, - applications/jpip/libopenjpip/boxheader_manager.c, - applications/jpip/libopenjpip/byte_manager.h, - applications/jpip/libopenjpip/cachemodel_manager.c, - applications/jpip/libopenjpip/cachemodel_manager.h, - applications/jpip/libopenjpip/imgreg_manager.c, - applications/jpip/libopenjpip/imgreg_manager.h, - applications/jpip/libopenjpip/jp2k_encoder.c, - applications/jpip/libopenjpip/jpip_parser.c, - applications/jpip/libopenjpip/manfbox_manager.c, - applications/jpip/libopenjpip/manfbox_manager.h, - applications/jpip/libopenjpip/metadata_manager.c, - applications/jpip/libopenjpip/metadata_manager.h, - applications/jpip/libopenjpip/placeholder_manager.c, - applications/jpip/libopenjpip/placeholder_manager.h, - applications/jpip/libopenjpip/target_manager.c, - applications/jpip/libopenjpip/target_manager.h, - applications/jpip/util/jpip_to_j2k.c, - applications/jpip/util/opj_server.c: [1.5] Fix a bunch of - comparison between signed and unsigned integer expressions. Some - are still left to decide. - -2012-03-01 Mathieu Malaterre - - * [r1480] applications/jpip/libopenjpip/openjpip.c: [1.5] Fix rev - 1474, typo in the spelling. - * [r1479] libopenjpeg/jpwl/jpwl.c: [1.5] Fix a warning about - comparison of ulong >= 0. Thanks to winfried for report. - * [r1475] applications/codec/convert.c: [1.5] Apply big-endian - patch from winfried: libopenjpeg and WORDS_BIGENDIAN, 2012/02/14 - * [r1474] applications/jpip/libopenjpip/openjpip.c: Fix a warning - reported on the continuous dashboard for linux. - * [r1473] applications/codec/convert.c: [1.5] j2k_to_image does not - support writing image with precision less than 8bits. Simply give - up for now. Thanks to winfried for report. Also add static - keyword for undeclared function in convert.h - * [r1472] applications/jpip/libopenjpip/jpipstream_manager.c, - applications/jpip/libopenjpip/jpipstream_manager.h: [1.5] Fix a - warning about conversion from const char* to char* - * [r1471] CMakeLists.txt: [1.5] cmake recommends the use of - fullpath. Thanks to winfried for report. - * [r1468] libopenjpeg/jpwl/CMakeLists.txt: [1.5] Fix JPWL's DLL - installation. Thanks to winfried for report. - -2012-02-29 Kaori Hagihara - - * [r1467] applications/jpip/README: [1.5][JPIP] README modification - regarding the JP2 encoding - -2012-02-28 Rex Dieter - - * [r1464] CMakeLists.txt, libopenjpeg/CMakeLists.txt, - libopenjpeg1.pc.cmake: allow finer-grain control of header - location via OPENJPEG_INSTALL_INCLUDE_DIR - * [r1463] CMakeLists.txt, libopenjpeg1.pc.cmake: fix assumptions - that OPENJPEG_INSTALL_*_DIR aren't relative paths - -2012-02-28 Kaori Hagihara - - * [r1462] applications/jpip/CHANGES, - applications/jpip/libopenjpip/comMakefile.mk, - applications/jpip/libopenjpip/jpip_parser.c, - applications/jpip/libopenjpip/metadata_manager.c, - applications/jpip/libopenjpip/openjpip.c, - applications/jpip/libopenjpip/query_parser.c, - applications/jpip/util/opj_server.c: [1.5][JPIP] enabled the - opj_server to reply the first query consisting with len request - from kakadu client - -2012-02-23 Rex Dieter - - * [r1460] libopenjpeg1.pc.cmake, libopenjpeg1.pc.in: fix pkgconfig - to include -I/usr/include/openjpeg-1.5 in cflags (issue #118) - -2012-02-17 Mathieu Malaterre - - * [r1444] applications/jpip/util/CMakeLists.txt: [1.5] allow - mecanism to provide JFLAGS - -2012-02-16 Mathieu Malaterre - - * [r1437] CMakeLists.txt: only install CHANGES when present - * [r1436] applications/jpip/util/opj_dec_server.c: remove a warning - about unused variable - -2012-02-14 Mathieu Malaterre - - * [r1435] CMake/CTestCustom.cmake.in: Hide some warnings generated - by 3rd party libs - * [r1434] applications/jpip/util/opj_dec_server.c: Make the code - C90 compliant for VS2010 - * [r1433] applications/jpip/util/CMakeLists.txt: Work around issue - with FindJava module - -2012-02-13 Mathieu Malaterre - - * [r1429] applications/jpip/libopenjpip/sock_manager.c: Use C style - comment. - * [r1424] applications/jpip/libopenjpip/sock_manager.c: [1.5] Need - to include unistd for close() declaration - * [r1423] applications/jpip/util/CMakeLists.txt: By default, - openjpip client can still built even without java compiler. Print - a message to the user as warning. - * [r1422] applications/jpip/CMakeLists.txt: [1.5] Fix typo in - CMAKE_USE_PTHREADS vs CMAKE_USE_PTHREADS_INIT - * [r1420] CMake/FindFCGI.cmake: [1.5] Backport diff from trunk - * [r1419] CMake/FindPTHREAD.cmake[DEL], - applications/jpip/CMakeLists.txt, - applications/jpip/libopenjpip/CMakeLists.txt: [1.5] Remove use of - custom PTHREAD module. Prefer cmake's one. - -2012-02-10 Kaori Hagihara - - * [r1405] applications/jpip/CHANGES, applications/jpip/README, - applications/jpip/util/opj_dec_server.c, - applications/jpip/util/opj_viewer/src/ImageManager.java, - applications/jpip/util/opj_viewer/src/ImageWindow.java, - applications/jpip/util/opj_viewer/src/ImgdecClient.java, - applications/jpip/util/opj_viewer_xerces/src/ImageWindow.java: - [1.5][JPIP] added execution argument to set port number for - opj_dec_server, opj_viewer* - * [r1404] applications/jpip/CHANGES, - applications/jpip/doc/Doxyfile: [1.5][JPIP] fixed Doxygen - configuration file to document the utilities - -2012-02-10 Antonin Descampe - - * [r1403] CMakeLists.txt, libopenjpeg/CMakeLists.txt: [1.5] revert - r1399 and r1400 - * [r1402] doc/Makefile.am: [1.5] fixed an error in autotools that - prevented the build because no CHANGES file anymore - -2012-02-10 Rex Dieter - - * [r1401] CMake/OpenJPEGConfig.cmake.in: make OpenJPEGConfig.cmake - provide useful (non-empty) values - * [r1400] libopenjpeg/CMakeLists.txt: make openjpeg.h header - symlink to match autotools - * [r1399] CMakeLists.txt: install cmake/pkgconfig bits in LIB_DIR - -2012-02-07 Antonin Descampe - - * [r1391] CMake/OpenJPEGCPack.cmake: update OpenJPEGCPack.cmake - with correct package names - diff --git a/Source/LibOpenJPEG/INSTALL b/Source/LibOpenJPEG/INSTALL deleted file mode 100644 index 144d0c7..0000000 --- a/Source/LibOpenJPEG/INSTALL +++ /dev/null @@ -1,114 +0,0 @@ - -How to build and install openjpeg binaries -========================================== - -UNIX/LINUX similar systems --------------------------- - -1) Using autotools - -It is highly recommended that pkg-config is installed. If needed, you have to -properly set the environment variable PKG_CONFIG_PATH so that the .pc files -are found. - -To build from top-level directory, you can simply type: - ./bootstrap.sh - ./configure - make - -To keep all build files in a separate directory, you can type instead: - ./bootstrap.sh - mkdir build - cd build - ../configure - make - -To install: - sudo make install - -To clean: - make clean - make distclean - -To build doc (requires 'doxygen' to be found on your system): -(this will create an html directory in TOP_LEVEL/doc) - make doc - -Main './configure' options (type './configure --help' for more details) - '--enable-mj2' - '--enable-jpwl' - '--enable-jpip' - '--prefix=/path/to/install/directory' (example : '--prefix=$PWD/installed') - '--enable-debug' (default : disabled) - -You can also specify your own CFLAGS and LDFLAGS with (for example): - CFLAGS="-O3 -pipe" LDFLAGS="-Wl,-s" ./configure - -The (optional) dependencies of some binaries are libpng, libtiff, libcms 1 or 2 -and FastCGI. Only libtiff and FastCGI have no .pc file. There should be some -automatic detection if they are installed in /usr, /usr/local or /opt/local. -Otherwise, you can tune their detection (as well as for libpng and libcms1 or 2 -too) with the environment variables: - -TIFF_CFLAGS -TIFF_LIBS -FCGI_CFLAGS -FCGI_LIBS - -See './configure --help' output for more details. - - -2) 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 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 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 (autotools and cmake) 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 -------- - -If you're using cygwin or MinGW+MSYS, the same procedures as for Unix can be used. - -Otherwise you can use cmake to generate project files for the IDE you are using (VC2010, etc). -Type 'cmake --help' for available generators on your platform. diff --git a/Source/LibOpenJPEG/LICENSE b/Source/LibOpenJPEG/LICENSE deleted file mode 100644 index f7b3b66..0000000 --- a/Source/LibOpenJPEG/LICENSE +++ /dev/null @@ -1,31 +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 - * 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/Source/LibOpenJPEG/LibOpenJPEG.2003.vcproj b/Source/LibOpenJPEG/LibOpenJPEG.2003.vcproj deleted file mode 100644 index 6907b93..0000000 --- a/Source/LibOpenJPEG/LibOpenJPEG.2003.vcproj +++ /dev/null @@ -1,558 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/LibOpenJPEG/LibOpenJPEG.2005.vcproj b/Source/LibOpenJPEG/LibOpenJPEG.2005.vcproj deleted file mode 100644 index 962c9fe..0000000 --- a/Source/LibOpenJPEG/LibOpenJPEG.2005.vcproj +++ /dev/null @@ -1,1227 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/LibOpenJPEG/LibOpenJPEG.2008.vcproj b/Source/LibOpenJPEG/LibOpenJPEG.2008.vcproj deleted file mode 100644 index fe5e8b8..0000000 --- a/Source/LibOpenJPEG/LibOpenJPEG.2008.vcproj +++ /dev/null @@ -1,1224 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/LibOpenJPEG/NEWS b/Source/LibOpenJPEG/NEWS deleted file mode 100644 index f4cb03a..0000000 --- a/Source/LibOpenJPEG/NEWS +++ /dev/null @@ -1,24 +0,0 @@ - -OpenJPEG NEWS - user visible changes -==================================== - -Changes from OpenJPEG 1.5.1 to OpenJPEG 1.5.0 ----------------------------------------------- - -Security: - - * Fixes: CVE-2012-3535 - * Fixes: CVE-2012-3358 - -New Features: - - * Use a new API scheme and solve the SOVERSIONing in OpenJPEG - * Allow better integration with multi-arch system - * Compile & Install Java bindings (CMake) - * Install required addXMLinJP2 (JPIP) - -Misc: - - * fix linker error by resolving all symbols (eg. missing -lm) - * fix some man page typos - * Huge amount of bug fixes. See CHANGES for details. diff --git a/Source/LibOpenJPEG/README b/Source/LibOpenJPEG/README deleted file mode 100644 index 018ba2d..0000000 --- a/Source/LibOpenJPEG/README +++ /dev/null @@ -1,25 +0,0 @@ - -OPENJPEG LIBRARY and APPLICATIONS ----------------------------------- - -Details on folders hierarchy: - -* libopenjpeg: contains the sources of the openjpeg library - * jpwl: contains the additional sources if you want to build a JPWL-flavoured library. -* applications: contains all applications that use the openjpeg library - * common: common files to all applications - * codec: a basic codec - * mj2: motion jpeg 2000 executables - * JavaOpenJPEG: java jni to use openjpeg in a java program - * jpip: complete client-server architecture for remote browsing of jpeg 2000 images. See corresponding README for more details. - * OPJViewer: gui for displaying j2k files (based on wxWidget) -* 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 -* m4: autotools 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. diff --git a/Source/LibOpenJPEG/THANKS b/Source/LibOpenJPEG/THANKS deleted file mode 100644 index c0d136a..0000000 --- a/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. - -Mathieu Malaterre -Winfried Szukalski -Vincent Torri -Bob Friesenhahn -Callum Lerwick -Dzonatas Sol -Mickaël Savinaud -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 diff --git a/Source/LibOpenJPEG/bio.c b/Source/LibOpenJPEG/bio.c deleted file mode 100644 index 4c02f46..0000000 --- a/Source/LibOpenJPEG/bio.c +++ /dev/null @@ -1,187 +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 bio_putbit(opj_bio_t *bio, int b); -/** -Read a bit -@param bio BIO handle -@return Returns the read bit -*/ -static int bio_getbit(opj_bio_t *bio); -/** -Write a byte -@param bio BIO handle -@return Returns 0 if successful, returns 1 otherwise -*/ -static int bio_byteout(opj_bio_t *bio); -/** -Read a byte -@param bio BIO handle -@return Returns 0 if successful, returns 1 otherwise -*/ -static int bio_bytein(opj_bio_t *bio); - -/*@}*/ - -/*@}*/ - -/* -========================================================== - local functions -========================================================== -*/ - -static int 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 1; - } - *bio->bp++ = bio->buf >> 8; - return 0; -} - -static int 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 1; - } - bio->buf |= *bio->bp++; - return 0; -} - -static void bio_putbit(opj_bio_t *bio, int b) { - if (bio->ct == 0) { - bio_byteout(bio); - } - bio->ct--; - bio->buf |= b << bio->ct; -} - -static int bio_getbit(opj_bio_t *bio) { - if (bio->ct == 0) { - bio_bytein(bio); - } - bio->ct--; - return (bio->buf >> bio->ct) & 1; -} - -/* -========================================================== - Bit Input/Output interface -========================================================== -*/ - -opj_bio_t* bio_create(void) { - opj_bio_t *bio = (opj_bio_t*)opj_malloc(sizeof(opj_bio_t)); - return bio; -} - -void bio_destroy(opj_bio_t *bio) { - if(bio) { - opj_free(bio); - } -} - -int bio_numbytes(opj_bio_t *bio) { - return (bio->bp - bio->start); -} - -void bio_init_enc(opj_bio_t *bio, unsigned char *bp, int len) { - bio->start = bp; - bio->end = bp + len; - bio->bp = bp; - bio->buf = 0; - bio->ct = 8; -} - -void bio_init_dec(opj_bio_t *bio, unsigned char *bp, int len) { - bio->start = bp; - bio->end = bp + len; - bio->bp = bp; - bio->buf = 0; - bio->ct = 0; -} - -void bio_write(opj_bio_t *bio, int v, int n) { - int i; - for (i = n - 1; i >= 0; i--) { - bio_putbit(bio, (v >> i) & 1); - } -} - -int bio_read(opj_bio_t *bio, int n) { - int i, v; - v = 0; - for (i = n - 1; i >= 0; i--) { - v += bio_getbit(bio) << i; - } - return v; -} - -int bio_flush(opj_bio_t *bio) { - bio->ct = 0; - if (bio_byteout(bio)) { - return 1; - } - if (bio->ct == 7) { - bio->ct = 0; - if (bio_byteout(bio)) { - return 1; - } - } - return 0; -} - -int bio_inalign(opj_bio_t *bio) { - bio->ct = 0; - if ((bio->buf & 0xff) == 0xff) { - if (bio_bytein(bio)) { - return 1; - } - bio->ct = 0; - } - return 0; -} diff --git a/Source/LibOpenJPEG/bio.h b/Source/LibOpenJPEG/bio.h deleted file mode 100644 index 764d7cb..0000000 --- a/Source/LibOpenJPEG/bio.h +++ /dev/null @@ -1,125 +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 -/** -@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 */ - unsigned char *start; - /** pointer to the end of the buffer */ - unsigned char *end; - /** pointer to the present position in the buffer */ - unsigned char *bp; - /** temporary place where each byte is read or written */ - unsigned int buf; - /** coder : number of bits free to write. decoder : number of bits read */ - int 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* bio_create(void); -/** -Destroy a previously created BIO handle -@param bio BIO handle to destroy -*/ -void bio_destroy(opj_bio_t *bio); -/** -Number of bytes written. -@param bio BIO handle -@return Returns the number of bytes written -*/ -int bio_numbytes(opj_bio_t *bio); -/** -Init encoder -@param bio BIO handle -@param bp Output buffer -@param len Output buffer length -*/ -void bio_init_enc(opj_bio_t *bio, unsigned char *bp, int len); -/** -Init decoder -@param bio BIO handle -@param bp Input buffer -@param len Input buffer length -*/ -void bio_init_dec(opj_bio_t *bio, unsigned char *bp, int len); -/** -Write bits -@param bio BIO handle -@param v Value of bits -@param n Number of bits to write -*/ -void bio_write(opj_bio_t *bio, int v, int n); -/** -Read bits -@param bio BIO handle -@param n Number of bits to read -@return Returns the corresponding read number -*/ -int bio_read(opj_bio_t *bio, int n); -/** -Flush bits -@param bio BIO handle -@return Returns 1 if successful, returns 0 otherwise -*/ -int bio_flush(opj_bio_t *bio); -/** -Passes the ending bits (coming from flushing) -@param bio BIO handle -@return Returns 1 if successful, returns 0 otherwise -*/ -int bio_inalign(opj_bio_t *bio); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __BIO_H */ - diff --git a/Source/LibOpenJPEG/cidx_manager.c b/Source/LibOpenJPEG/cidx_manager.c deleted file mode 100644 index b63142f..0000000 --- a/Source/LibOpenJPEG/cidx_manager.c +++ /dev/null @@ -1,211 +0,0 @@ -/* - * $Id: cidx_manager.c,v 1.2 2012/09/23 12:44:41 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 write_cptr(int coff, int clen, opj_cio_t *cio); - - -/* - * 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 write_mainmhix( int coff, opj_codestream_info_t cstr_info, opj_cio_t *cio); - - -/* - * 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 check_EPHuse( int coff, opj_marker_info_t *markers, int marknum, opj_cio_t *cio); - - -int write_cidx( int offset, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t cstr_info, int j2klen) -{ - int len, i, lenp; - opj_jp2_box_t *box; - int num_box = 0; - opj_bool EPHused; - (void)image; /* unused ? */ - - lenp = -1; - box = (opj_jp2_box_t *)opj_calloc( 32, sizeof(opj_jp2_box_t)); - - for (i=0;i<2;i++){ - - if(i) - cio_seek( cio, lenp); - - lenp = cio_tell( cio); - - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_CIDX, 4); /* CIDX */ - write_cptr( offset, cstr_info.codestream_size, cio); - - write_manf( i, num_box, box, cio); - - num_box = 0; - box[num_box].length = write_mainmhix( offset, cstr_info, cio); - box[num_box].type = JPIP_MHIX; - num_box++; - - box[num_box].length = write_tpix( offset, cstr_info, j2klen, cio); - box[num_box].type = JPIP_TPIX; - num_box++; - - box[num_box].length = write_thix( offset, cstr_info, cio); - box[num_box].type = JPIP_THIX; - num_box++; - - EPHused = check_EPHuse( offset, cstr_info.marker, cstr_info.marknum, cio); - - box[num_box].length = write_ppix( offset, cstr_info, EPHused, j2klen, cio); - box[num_box].type = JPIP_PPIX; - num_box++; - - box[num_box].length = write_phix( offset, cstr_info, EPHused, j2klen, cio); - box[num_box].type = JPIP_PHIX; - num_box++; - - len = cio_tell( cio)-lenp; - cio_seek( cio, lenp); - cio_write( cio, len, 4); /* L */ - cio_seek( cio, lenp+len); - } - - opj_free( box); - - return len; -} - -void write_cptr(int coff, int clen, opj_cio_t *cio) -{ - int len, lenp; - - lenp = cio_tell( cio); - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_CPTR, 4); /* T */ - cio_write( cio, 0, 2); /* DR A PRECISER !! */ - cio_write( cio, 0, 2); /* CONT */ - cio_write( cio, coff, 8); /* COFF A PRECISER !! */ - cio_write( cio, clen, 8); /* CLEN */ - len = cio_tell( cio) - lenp; - cio_seek( cio, lenp); - cio_write( cio, len, 4); /* L */ - cio_seek( cio, lenp+len); -} - -void write_manf(int second, int v, opj_jp2_box_t *box, opj_cio_t *cio) -{ - int len, lenp, i; - - lenp = cio_tell( cio); - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_MANF,4); /* T */ - - if (second){ /* Write only during the second pass */ - for( i=0; i> 2) & 1)) - EPHused = OPJ_TRUE; - cio_seek( cio, org_pos); - - break; - } - } - return EPHused; -} diff --git a/Source/LibOpenJPEG/cidx_manager.h b/Source/LibOpenJPEG/cidx_manager.h deleted file mode 100644 index c1a69d9..0000000 --- a/Source/LibOpenJPEG/cidx_manager.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * $Id: cidx_manager.h,v 1.2 2012/09/23 12:44:41 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 write_cidx( int offset, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t cstr_info, int j2klen); - - -#endif /* !CIDX_MANAGER_H_ */ diff --git a/Source/LibOpenJPEG/cio.c b/Source/LibOpenJPEG/cio.c deleted file mode 100644 index c0cb028..0000000 --- a/Source/LibOpenJPEG/cio.c +++ /dev/null @@ -1,191 +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" - -/* ----------------------------------------------------------------------- */ - -opj_cio_t* OPJ_CALLCONV opj_cio_open(opj_common_ptr cinfo, unsigned char *buffer, int length) { - opj_cp_t *cp = NULL; - opj_cio_t *cio = (opj_cio_t*)opj_malloc(sizeof(opj_cio_t)); - if(!cio) return NULL; - cio->cinfo = cinfo; - if(buffer && length) { - /* wrap a user buffer containing the encoded image */ - cio->openmode = OPJ_STREAM_READ; - cio->buffer = buffer; - cio->length = length; - } - else if(!buffer && !length && cinfo) { - /* allocate a buffer for the encoded image */ - cio->openmode = OPJ_STREAM_WRITE; - switch(cinfo->codec_format) { - case CODEC_J2K: - cp = ((opj_j2k_t*)cinfo->j2k_handle)->cp; - break; - case CODEC_JP2: - cp = ((opj_jp2_t*)cinfo->jp2_handle)->j2k->cp; - break; - default: - opj_free(cio); - return NULL; - } - cio->length = (unsigned int) (0.1625 * cp->img_size + 2000); /* 0.1625 = 1.3/8 and 2000 bytes as a minimum for headers */ - cio->buffer = (unsigned char *)opj_malloc(cio->length); - if(!cio->buffer) { - opj_event_msg(cio->cinfo, EVT_ERROR, "Error allocating memory for compressed bitstream\n"); - opj_free(cio); - return NULL; - } - } - else { - opj_free(cio); - return NULL; - } - - /* Initialize byte IO */ - cio->start = cio->buffer; - cio->end = cio->buffer + cio->length; - cio->bp = cio->buffer; - - return cio; -} - -void OPJ_CALLCONV opj_cio_close(opj_cio_t *cio) { - if(cio) { - if(cio->openmode == OPJ_STREAM_WRITE) { - /* destroy the allocated buffer */ - opj_free(cio->buffer); - } - /* destroy the cio */ - opj_free(cio); - } -} - - -/* ----------------------------------------------------------------------- */ - -/* - * Get position in byte stream. - */ -int OPJ_CALLCONV cio_tell(opj_cio_t *cio) { - return cio->bp - cio->start; -} - -/* - * Set position in byte stream. - * - * pos : position, in number of bytes, from the beginning of the stream - */ -void OPJ_CALLCONV cio_seek(opj_cio_t *cio, int pos) { - cio->bp = cio->start + pos; -} - -/* - * Number of bytes left before the end of the stream. - */ -int cio_numbytesleft(opj_cio_t *cio) { - return cio->end - cio->bp; -} - -/* - * Get pointer to the current position in the stream. - */ -unsigned char *cio_getbp(opj_cio_t *cio) { - return cio->bp; -} - -/* - * Write a byte. - */ -opj_bool cio_byteout(opj_cio_t *cio, unsigned char v) { - if (cio->bp >= cio->end) { - opj_event_msg(cio->cinfo, EVT_ERROR, "write error\n"); - return OPJ_FALSE; - } - *cio->bp++ = v; - return OPJ_TRUE; -} - -/* - * Read a byte. - */ -unsigned char cio_bytein(opj_cio_t *cio) { - if (cio->bp >= cio->end) { - opj_event_msg(cio->cinfo, EVT_ERROR, "read error: passed the end of the codestream (start = %d, current = %d, end = %d\n", cio->start, cio->bp, cio->end); - return 0; - } - return *cio->bp++; -} - -/* - * Write some bytes. - * - * v : value to write - * n : number of bytes to write - */ -unsigned int cio_write(opj_cio_t *cio, unsigned int64 v, int n) { - int i; - for (i = n - 1; i >= 0; i--) { - if( !cio_byteout(cio, (unsigned char) ((v >> (i << 3)) & 0xff)) ) - return 0; - } - return n; -} - -/* - * Read some bytes. - * - * n : number of bytes to read - * - * return : value of the n bytes read - */ -unsigned int cio_read(opj_cio_t *cio, int n) { - int i; - unsigned int v; - v = 0; - for (i = n - 1; i >= 0; i--) { - v += cio_bytein(cio) << (i << 3); - } - return v; -} - -/* - * Skip some bytes. - * - * n : number of bytes to skip - */ -void cio_skip(opj_cio_t *cio, int n) { - cio->bp += n; -} - - - diff --git a/Source/LibOpenJPEG/cio.h b/Source/LibOpenJPEG/cio.h deleted file mode 100644 index e627431..0000000 --- a/Source/LibOpenJPEG/cio.h +++ /dev/null @@ -1,93 +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 __CIO_H -#define __CIO_H - -#if defined(_MSC_VER) || defined(__BORLANDC__) -#define int64 __int64 -#else -#define int64 long long -#endif - -/** -@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 */ -/*@{*/ - -/** @name Exported functions (see also openjpeg.h) */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** -Number of bytes left before the end of the stream -@param cio CIO handle -@return Returns the number of bytes before the end of the stream -*/ -int cio_numbytesleft(opj_cio_t *cio); -/** -Get pointer to the current position in the stream -@param cio CIO handle -@return Returns a pointer to the current position -*/ -unsigned char *cio_getbp(opj_cio_t *cio); -/** -Write some bytes -@param cio CIO handle -@param v Value to write -@param n Number of bytes to write -@return Returns the number of bytes written or 0 if an error occured -*/ -unsigned int cio_write(opj_cio_t *cio, unsigned int64 v, int n); -/** -Read some bytes -@param cio CIO handle -@param n Number of bytes to read -@return Returns the value of the n bytes read -*/ -unsigned int cio_read(opj_cio_t *cio, int n); -/** -Skip some bytes -@param cio CIO handle -@param n Number of bytes to skip -*/ -void cio_skip(opj_cio_t *cio, int n); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __CIO_H */ - diff --git a/Source/LibOpenJPEG/dwt.c b/Source/LibOpenJPEG/dwt.c deleted file mode 100644 index 0fbfc20..0000000 --- a/Source/LibOpenJPEG/dwt.c +++ /dev/null @@ -1,858 +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 WS(i) v->mem[(i)*2] -#define WD(i) v->mem[(1+(i)*2)] - -/** @name Local data structures */ -/*@{*/ - -typedef struct dwt_local { - int* mem; - int dn; - int sn; - int cas; -} dwt_t; - -typedef union { - float f[4]; -} v4; - -typedef struct v4dwt_local { - v4* wavelet ; - int dn ; - int sn ; - int cas ; -} v4dwt_t ; - -static const float dwt_alpha = 1.586134342f; /* 12994 */ -static const float dwt_beta = 0.052980118f; /* 434 */ -static const float dwt_gamma = -0.882911075f; /* -7233 */ -static const float dwt_delta = -0.443506852f; /* -3633 */ - -static const float K = 1.230174105f; /* 10078 */ -/* FIXME: What is this constant? */ -static const float c13318 = 1.625732422f; - -/*@}*/ - -/** -Virtual function type for wavelet transform in 1-D -*/ -typedef void (*DWT1DFN)(dwt_t* v); - -/** @name Local static functions */ -/*@{*/ - -/** -Forward lazy transform (horizontal) -*/ -static void dwt_deinterleave_h(int *a, int *b, int dn, int sn, int cas); -/** -Forward lazy transform (vertical) -*/ -static void dwt_deinterleave_v(int *a, int *b, int dn, int sn, int x, int cas); -/** -Inverse lazy transform (horizontal) -*/ -static void dwt_interleave_h(dwt_t* h, int *a); -/** -Inverse lazy transform (vertical) -*/ -static void dwt_interleave_v(dwt_t* v, int *a, int x); -/** -Forward 5-3 wavelet transform in 1-D -*/ -static void dwt_encode_1(int *a, int dn, int sn, int cas); -/** -Inverse 5-3 wavelet transform in 1-D -*/ -static void dwt_decode_1(dwt_t *v); -/** -Forward 9-7 wavelet transform in 1-D -*/ -static void dwt_encode_1_real(int *a, int dn, int sn, int cas); -/** -Explicit calculation of the Quantization Stepsizes -*/ -static void dwt_encode_stepsize(int stepsize, int numbps, opj_stepsize_t *bandno_stepsize); -/** -Inverse wavelet transform in 2-D. -*/ -static void dwt_decode_tile(opj_tcd_tilecomp_t* tilec, int i, DWT1DFN fn); - -/*@}*/ - -/*@}*/ - -#define S(i) a[(i)*2] -#define D(i) a[(1+(i)*2)] -#define S_(i) ((i)<0?S(0):((i)>=sn?S(sn-1):S(i))) -#define D_(i) ((i)<0?D(0):((i)>=dn?D(dn-1):D(i))) -/* new */ -#define SS_(i) ((i)<0?S(0):((i)>=dn?S(dn-1):S(i))) -#define DD_(i) ((i)<0?D(0):((i)>=sn?D(sn-1):D(i))) - -/* */ -/* This table contains the norms of the 5-3 wavelets for different bands. */ -/* */ -static const double 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 double 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). */ -/* */ -static void dwt_deinterleave_h(int *a, int *b, int dn, int sn, int cas) { - int i; - for (i=0; i */ -/* Forward lazy transform (vertical). */ -/* */ -static void dwt_deinterleave_v(int *a, int *b, int dn, int sn, int x, int cas) { - int i; - for (i=0; i */ -/* Inverse lazy transform (horizontal). */ -/* */ -static void dwt_interleave_h(dwt_t* h, int *a) { - int *ai = a; - int *bi = h->mem + h->cas; - int 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). */ -/* */ -static void dwt_interleave_v(dwt_t* v, int *a, int x) { - int *ai = a; - int *bi = v->mem + v->cas; - int 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. */ -/* */ -static void dwt_encode_1(int *a, int dn, int sn, int cas) { - int i; - - if (!cas) { - if ((dn > 0) || (sn > 1)) { /* NEW : CASE ONE ELEMENT */ - for (i = 0; i < dn; i++) D(i) -= (S_(i) + S_(i + 1)) >> 1; - for (i = 0; i < sn; i++) S(i) += (D_(i - 1) + D_(i) + 2) >> 2; - } - } else { - if (!sn && dn == 1) /* NEW : CASE ONE ELEMENT */ - S(0) *= 2; - else { - for (i = 0; i < dn; i++) S(i) -= (DD_(i) + DD_(i - 1)) >> 1; - for (i = 0; i < sn; i++) D(i) += (SS_(i) + SS_(i + 1) + 2) >> 2; - } - } -} - -/* */ -/* Inverse 5-3 wavelet transform in 1-D. */ -/* */ -static void dwt_decode_1_(int *a, int dn, int sn, int cas) { - int i; - - if (!cas) { - if ((dn > 0) || (sn > 1)) { /* NEW : CASE ONE ELEMENT */ - for (i = 0; i < sn; i++) S(i) -= (D_(i - 1) + D_(i) + 2) >> 2; - for (i = 0; i < dn; i++) D(i) += (S_(i) + S_(i + 1)) >> 1; - } - } else { - if (!sn && dn == 1) /* NEW : CASE ONE ELEMENT */ - S(0) /= 2; - else { - for (i = 0; i < sn; i++) D(i) -= (SS_(i) + SS_(i + 1) + 2) >> 2; - for (i = 0; i < dn; i++) S(i) += (DD_(i) + DD_(i - 1)) >> 1; - } - } -} - -/* */ -/* Inverse 5-3 wavelet transform in 1-D. */ -/* */ -static void dwt_decode_1(dwt_t *v) { - dwt_decode_1_(v->mem, v->dn, v->sn, v->cas); -} - -/* */ -/* Forward 9-7 wavelet transform in 1-D. */ -/* */ -static void dwt_encode_1_real(int *a, int dn, int sn, int cas) { - int i; - if (!cas) { - if ((dn > 0) || (sn > 1)) { /* NEW : CASE ONE ELEMENT */ - for (i = 0; i < dn; i++) - D(i) -= fix_mul(S_(i) + S_(i + 1), 12993); - for (i = 0; i < sn; i++) - S(i) -= fix_mul(D_(i - 1) + D_(i), 434); - for (i = 0; i < dn; i++) - D(i) += fix_mul(S_(i) + S_(i + 1), 7233); - for (i = 0; i < sn; i++) - S(i) += fix_mul(D_(i - 1) + D_(i), 3633); - for (i = 0; i < dn; i++) - D(i) = fix_mul(D(i), 5038); /*5038 */ - for (i = 0; i < sn; i++) - S(i) = fix_mul(S(i), 6659); /*6660 */ - } - } else { - if ((sn > 0) || (dn > 1)) { /* NEW : CASE ONE ELEMENT */ - for (i = 0; i < dn; i++) - S(i) -= fix_mul(DD_(i) + DD_(i - 1), 12993); - for (i = 0; i < sn; i++) - D(i) -= fix_mul(SS_(i) + SS_(i + 1), 434); - for (i = 0; i < dn; i++) - S(i) += fix_mul(DD_(i) + DD_(i - 1), 7233); - for (i = 0; i < sn; i++) - D(i) += fix_mul(SS_(i) + SS_(i + 1), 3633); - for (i = 0; i < dn; i++) - S(i) = fix_mul(S(i), 5038); /*5038 */ - for (i = 0; i < sn; i++) - D(i) = fix_mul(D(i), 6659); /*6660 */ - } - } -} - -static void dwt_encode_stepsize(int stepsize, int numbps, opj_stepsize_t *bandno_stepsize) { - int p, n; - p = int_floorlog2(stepsize) - 13; - n = 11 - 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. */ -/* */ -void dwt_encode(opj_tcd_tilecomp_t * tilec) { - int i, j, k; - int *a = NULL; - int *aj = NULL; - int *bj = NULL; - int w, l; - - w = tilec->x1-tilec->x0; - l = tilec->numresolutions-1; - a = tilec->data; - - for (i = 0; i < l; i++) { - int rw; /* width of the resolution level computed */ - int rh; /* height of the resolution level computed */ - int rw1; /* width of the resolution level once lower than computed one */ - int rh1; /* height of the resolution level once lower than computed one */ - int cas_col; /* 0 = non inversion on horizontal filtering 1 = inversion between low-pass and high-pass filtering */ - int cas_row; /* 0 = non inversion on vertical filtering 1 = inversion between low-pass and high-pass filtering */ - int dn, sn; - - rw = tilec->resolutions[l - i].x1 - tilec->resolutions[l - i].x0; - rh = tilec->resolutions[l - i].y1 - tilec->resolutions[l - i].y0; - rw1= tilec->resolutions[l - i - 1].x1 - tilec->resolutions[l - i - 1].x0; - rh1= tilec->resolutions[l - i - 1].y1 - tilec->resolutions[l - i - 1].y0; - - cas_row = tilec->resolutions[l - i].x0 % 2; - cas_col = tilec->resolutions[l - i].y0 % 2; - - sn = rh1; - dn = rh - rh1; - bj = (int*)opj_malloc(rh * sizeof(int)); - for (j = 0; j < rw; j++) { - aj = a + j; - for (k = 0; k < rh; k++) bj[k] = aj[k*w]; - dwt_encode_1(bj, dn, sn, cas_col); - dwt_deinterleave_v(bj, aj, dn, sn, w, cas_col); - } - opj_free(bj); - - sn = rw1; - dn = rw - rw1; - bj = (int*)opj_malloc(rw * sizeof(int)); - for (j = 0; j < rh; j++) { - aj = a + j * w; - for (k = 0; k < rw; k++) bj[k] = aj[k]; - dwt_encode_1(bj, dn, sn, cas_row); - dwt_deinterleave_h(bj, aj, dn, sn, cas_row); - } - opj_free(bj); - } -} - - -/* */ -/* Inverse 5-3 wavelet transform in 2-D. */ -/* */ -void dwt_decode(opj_tcd_tilecomp_t* tilec, int numres) { - dwt_decode_tile(tilec, numres, &dwt_decode_1); -} - - -/* */ -/* Get gain of 5-3 wavelet transform. */ -/* */ -int dwt_getgain(int orient) { - if (orient == 0) - return 0; - if (orient == 1 || orient == 2) - return 1; - return 2; -} - -/* */ -/* Get norm of 5-3 wavelet. */ -/* */ -double dwt_getnorm(int level, int orient) { - return dwt_norms[orient][level]; -} - -/* */ -/* Forward 9-7 wavelet transform in 2-D. */ -/* */ - -void dwt_encode_real(opj_tcd_tilecomp_t * tilec) { - int i, j, k; - int *a = NULL; - int *aj = NULL; - int *bj = NULL; - int w, l; - - w = tilec->x1-tilec->x0; - l = tilec->numresolutions-1; - a = tilec->data; - - for (i = 0; i < l; i++) { - int rw; /* width of the resolution level computed */ - int rh; /* height of the resolution level computed */ - int rw1; /* width of the resolution level once lower than computed one */ - int rh1; /* height of the resolution level once lower than computed one */ - int cas_col; /* 0 = non inversion on horizontal filtering 1 = inversion between low-pass and high-pass filtering */ - int cas_row; /* 0 = non inversion on vertical filtering 1 = inversion between low-pass and high-pass filtering */ - int dn, sn; - - rw = tilec->resolutions[l - i].x1 - tilec->resolutions[l - i].x0; - rh = tilec->resolutions[l - i].y1 - tilec->resolutions[l - i].y0; - rw1= tilec->resolutions[l - i - 1].x1 - tilec->resolutions[l - i - 1].x0; - rh1= tilec->resolutions[l - i - 1].y1 - tilec->resolutions[l - i - 1].y0; - - cas_row = tilec->resolutions[l - i].x0 % 2; - cas_col = tilec->resolutions[l - i].y0 % 2; - - sn = rh1; - dn = rh - rh1; - bj = (int*)opj_malloc(rh * sizeof(int)); - for (j = 0; j < rw; j++) { - aj = a + j; - for (k = 0; k < rh; k++) bj[k] = aj[k*w]; - dwt_encode_1_real(bj, dn, sn, cas_col); - dwt_deinterleave_v(bj, aj, dn, sn, w, cas_col); - } - opj_free(bj); - - sn = rw1; - dn = rw - rw1; - bj = (int*)opj_malloc(rw * sizeof(int)); - for (j = 0; j < rh; j++) { - aj = a + j * w; - for (k = 0; k < rw; k++) bj[k] = aj[k]; - dwt_encode_1_real(bj, dn, sn, cas_row); - dwt_deinterleave_h(bj, aj, dn, sn, cas_row); - } - opj_free(bj); - } -} - - -/* */ -/* Get gain of 9-7 wavelet transform. */ -/* */ -int dwt_getgain_real(int orient) { - (void)orient; - return 0; -} - -/* */ -/* Get norm of 9-7 wavelet. */ -/* */ -double dwt_getnorm_real(int level, int orient) { - return dwt_norms_real[orient][level]; -} - -void dwt_calc_explicit_stepsizes(opj_tccp_t * tccp, int prec) { - int numbands, bandno; - numbands = 3 * tccp->numresolutions - 2; - for (bandno = 0; bandno < numbands; bandno++) { - double stepsize; - int 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 { - double norm = dwt_norms_real[orient][level]; - stepsize = (1 << (gain)) / norm; - } - dwt_encode_stepsize((int) floor(stepsize * 8192.0), prec + gain, &tccp->stepsizes[bandno]); - } -} - - -/* */ -/* Determine maximum computed resolution level for inverse wavelet transform */ -/* */ -static int dwt_decode_max_resolution(opj_tcd_resolution_t* restrict r, int i) { - int mr = 1; - int w; - while( --i ) { - r++; - if( mr < ( w = r->x1 - r->x0 ) ) - mr = w ; - if( mr < ( w = r->y1 - r->y0 ) ) - mr = w ; - } - return mr ; -} - - -/* */ -/* Inverse wavelet transform in 2-D. */ -/* */ -static void dwt_decode_tile(opj_tcd_tilecomp_t* tilec, int numres, DWT1DFN dwt_1D) { - dwt_t h; - dwt_t v; - - opj_tcd_resolution_t* tr = tilec->resolutions; - - int rw = tr->x1 - tr->x0; /* width of the resolution level computed */ - int rh = tr->y1 - tr->y0; /* height of the resolution level computed */ - - int w = tilec->x1 - tilec->x0; - - h.mem = (int*)opj_aligned_malloc(dwt_decode_max_resolution(tr, numres) * sizeof(int)); - v.mem = h.mem; - - while( --numres) { - int * restrict tiledp = tilec->data; - int j; - - ++tr; - h.sn = rw; - v.sn = rh; - - rw = tr->x1 - tr->x0; - rh = tr->y1 - tr->y0; - - h.dn = rw - h.sn; - h.cas = tr->x0 % 2; - - for(j = 0; j < rh; ++j) { - dwt_interleave_h(&h, &tiledp[j*w]); - (dwt_1D)(&h); - memcpy(&tiledp[j*w], h.mem, rw * sizeof(int)); - } - - v.dn = rh - v.sn; - v.cas = tr->y0 % 2; - - for(j = 0; j < rw; ++j){ - int k; - dwt_interleave_v(&v, &tiledp[j], w); - (dwt_1D)(&v); - for(k = 0; k < rh; ++k) { - tiledp[k * w + j] = v.mem[k]; - } - } - } - opj_aligned_free(h.mem); -} - -static void v4dwt_interleave_h(v4dwt_t* restrict w, float* restrict a, int x, int size){ - float* restrict bi = (float*) (w->wavelet + w->cas); - int count = w->sn; - int 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){ - int 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){ - int 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]; - } - } - bi = (float*) (w->wavelet + 1 - w->cas); - a += w->sn; - size -= w->sn; - count = w->dn; - } -} - -static void v4dwt_interleave_v(v4dwt_t* restrict v , float* restrict a , int x){ - v4* restrict bi = v->wavelet + v->cas; - int i; - for(i = 0; i < v->sn; ++i){ - memcpy(&bi[i*2], &a[i*x], 4 * sizeof(float)); - } - a += v->sn * x; - bi = v->wavelet + 1 - v->cas; - for(i = 0; i < v->dn; ++i){ - memcpy(&bi[i*2], &a[i*x], 4 * sizeof(float)); - } -} - -#ifdef __SSE__ - -static void v4dwt_decode_step1_sse(v4* w, int count, const __m128 c){ - __m128* restrict vw = (__m128*) w; - int 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; - } -} - -static void v4dwt_decode_step2_sse(v4* l, v4* w, int k, int m, __m128 c){ - __m128* restrict vl = (__m128*) l; - __m128* restrict vw = (__m128*) w; - int 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 - -static void v4dwt_decode_step1(v4* w, int count, const float c){ - float* restrict fw = (float*) w; - int i; - for(i = 0; i < count; ++i){ - float tmp1 = fw[i*8 ]; - float tmp2 = fw[i*8 + 1]; - float tmp3 = fw[i*8 + 2]; - float 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; - } -} - -static void v4dwt_decode_step2(v4* l, v4* w, int k, int m, float c){ - float* restrict fl = (float*) l; - float* restrict fw = (float*) w; - int i; - for(i = 0; i < m; ++i){ - float tmp1_1 = fl[0]; - float tmp1_2 = fl[1]; - float tmp1_3 = fl[2]; - float tmp1_4 = fl[3]; - float tmp2_1 = fw[-4]; - float tmp2_2 = fw[-3]; - float tmp2_3 = fw[-2]; - float tmp2_4 = fw[-1]; - float tmp3_1 = fw[0]; - float tmp3_2 = fw[1]; - float tmp3_3 = fw[2]; - float 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){ - float c1; - float c2; - float c3; - float c4; - c += c; - c1 = fl[0] * c; - c2 = fl[1] * c; - c3 = fl[2] * c; - c4 = fl[3] * c; - for(; m < k; ++m){ - float tmp1 = fw[-4]; - float tmp2 = fw[-3]; - float tmp3 = fw[-2]; - float 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. */ -/* */ -static void v4dwt_decode(v4dwt_t* restrict dwt){ - int 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__ - v4dwt_decode_step1_sse(dwt->wavelet+a, dwt->sn, _mm_set1_ps(K)); - v4dwt_decode_step1_sse(dwt->wavelet+b, dwt->dn, _mm_set1_ps(c13318)); - v4dwt_decode_step2_sse(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, int_min(dwt->sn, dwt->dn-a), _mm_set1_ps(dwt_delta)); - v4dwt_decode_step2_sse(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), _mm_set1_ps(dwt_gamma)); - v4dwt_decode_step2_sse(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, int_min(dwt->sn, dwt->dn-a), _mm_set1_ps(dwt_beta)); - v4dwt_decode_step2_sse(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), _mm_set1_ps(dwt_alpha)); -#else - v4dwt_decode_step1(dwt->wavelet+a, dwt->sn, K); - v4dwt_decode_step1(dwt->wavelet+b, dwt->dn, c13318); - v4dwt_decode_step2(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, int_min(dwt->sn, dwt->dn-a), dwt_delta); - v4dwt_decode_step2(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), dwt_gamma); - v4dwt_decode_step2(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, int_min(dwt->sn, dwt->dn-a), dwt_beta); - v4dwt_decode_step2(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), dwt_alpha); -#endif -} - -/* */ -/* Inverse 9-7 wavelet transform in 2-D. */ -/* */ -void dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, int numres){ - v4dwt_t h; - v4dwt_t v; - - opj_tcd_resolution_t* res = tilec->resolutions; - - int rw = res->x1 - res->x0; /* width of the resolution level computed */ - int rh = res->y1 - res->y0; /* height of the resolution level computed */ - - int w = tilec->x1 - tilec->x0; - - h.wavelet = (v4*) opj_aligned_malloc((dwt_decode_max_resolution(res, numres)+5) * sizeof(v4)); - v.wavelet = h.wavelet; - - while( --numres) { - float * restrict aj = (float*) tilec->data; - int bufsize = (tilec->x1 - tilec->x0) * (tilec->y1 - tilec->y0); - int j; - - h.sn = rw; - v.sn = rh; - - ++res; - - rw = res->x1 - res->x0; /* width of the resolution level computed */ - rh = res->y1 - res->y0; /* height of the resolution level computed */ - - h.dn = rw - h.sn; - h.cas = res->x0 % 2; - - for(j = rh; j > 3; j -= 4){ - int k; - v4dwt_interleave_h(&h, aj, w, bufsize); - v4dwt_decode(&h); - for(k = rw; --k >= 0;){ - aj[k ] = h.wavelet[k].f[0]; - aj[k+w ] = h.wavelet[k].f[1]; - aj[k+w*2] = h.wavelet[k].f[2]; - aj[k+w*3] = h.wavelet[k].f[3]; - } - aj += w*4; - bufsize -= w*4; - } - if (rh & 0x03) { - int k; - j = rh & 0x03; - v4dwt_interleave_h(&h, aj, w, bufsize); - v4dwt_decode(&h); - for(k = rw; --k >= 0;){ - switch(j) { - case 3: aj[k+w*2] = h.wavelet[k].f[2]; - case 2: aj[k+w ] = h.wavelet[k].f[1]; - case 1: aj[k ] = h.wavelet[k].f[0]; - } - } - } - - v.dn = rh - v.sn; - v.cas = res->y0 % 2; - - aj = (float*) tilec->data; - for(j = rw; j > 3; j -= 4){ - int k; - v4dwt_interleave_v(&v, aj, w); - v4dwt_decode(&v); - for(k = 0; k < rh; ++k){ - memcpy(&aj[k*w], &v.wavelet[k], 4 * sizeof(float)); - } - aj += 4; - } - if (rw & 0x03){ - int k; - j = rw & 0x03; - v4dwt_interleave_v(&v, aj, w); - v4dwt_decode(&v); - for(k = 0; k < rh; ++k){ - memcpy(&aj[k*w], &v.wavelet[k], j * sizeof(float)); - } - } - } - - opj_aligned_free(h.wavelet); -} - diff --git a/Source/LibOpenJPEG/dwt.h b/Source/LibOpenJPEG/dwt.h deleted file mode 100644 index adf73e5..0000000 --- a/Source/LibOpenJPEG/dwt.h +++ /dev/null @@ -1,113 +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) -*/ -void 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 -*/ -void dwt_decode(opj_tcd_tilecomp_t* tilec, int 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 -*/ -int dwt_getgain(int 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 -*/ -double dwt_getnorm(int level, int 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) -*/ -void 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 -*/ -void dwt_decode_real(opj_tcd_tilecomp_t* tilec, int 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 -*/ -int dwt_getgain_real(int 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 -*/ -double dwt_getnorm_real(int level, int orient); -/** -Explicit calculation of the Quantization Stepsizes -@param tccp Tile-component coding parameters -@param prec Precint analyzed -*/ -void dwt_calc_explicit_stepsizes(opj_tccp_t * tccp, int prec); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __DWT_H */ diff --git a/Source/LibOpenJPEG/event.c b/Source/LibOpenJPEG/event.c deleted file mode 100644 index 7d0607c..0000000 --- a/Source/LibOpenJPEG/event.c +++ /dev/null @@ -1,130 +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" - -#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 - -/* ========================================================== - 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 -/* ----------------------------------------------------------------------- */ - -opj_event_mgr_t* OPJ_CALLCONV opj_set_event_mgr(opj_common_ptr cinfo, opj_event_mgr_t *event_mgr, void *context) { - if(cinfo) { - opj_event_mgr_t *previous = cinfo->event_mgr; - cinfo->event_mgr = event_mgr; - cinfo->client_data = context; - return previous; - } - - return NULL; -} - -opj_bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) { -#define MSG_SIZE 512 /* 512 bytes should be more than enough for a short message */ - opj_msg_callback msg_handler = NULL; - - opj_event_mgr_t *event_mgr = cinfo->event_mgr; - if(event_mgr != NULL) { - switch(event_type) { - case EVT_ERROR: - msg_handler = event_mgr->error_handler; - break; - case EVT_WARNING: - msg_handler = event_mgr->warning_handler; - break; - case EVT_INFO: - msg_handler = event_mgr->info_handler; - break; - default: - break; - } - if(msg_handler == NULL) { - return OPJ_FALSE; - } - } else { - return OPJ_FALSE; - } - - if ((fmt != NULL) && (event_mgr != NULL)) { - va_list arg; - int str_length/*, i, j*/; /* UniPG */ - char message[MSG_SIZE]; - /* initialize the optional parameter list */ - va_start(arg, fmt); - /* parse the format string and put the result in 'message' */ - str_length = vsnprintf(message, MSG_SIZE, fmt, arg); /* UniPG */ - /* deinitialize the optional parameter list */ - va_end(arg); - - /* output the message to the user program */ - if( str_length > -1 && str_length < MSG_SIZE ) - msg_handler(message, cinfo->client_data); - else return OPJ_FALSE; - } - - return OPJ_TRUE; -} - diff --git a/Source/LibOpenJPEG/event.h b/Source/LibOpenJPEG/event.h deleted file mode 100644 index 9c59787..0000000 --- a/Source/LibOpenJPEG/event.h +++ /dev/null @@ -1,58 +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 __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. -*/ - -#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 cinfo Codec context info -@param event_type Event type or callback to use to send the message -@param fmt Format-control string (plus optionnal arguments) -@return Returns true if successful, returns false otherwise -*/ -opj_bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __EVENT_H */ diff --git a/Source/LibOpenJPEG/fix.h b/Source/LibOpenJPEG/fix.h deleted file mode 100644 index bcb2acb..0000000 --- a/Source/LibOpenJPEG/fix.h +++ /dev/null @@ -1,64 +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 __FIX_H -#define __FIX_H - -#if defined(_MSC_VER) || defined(__BORLANDC__) -#define int64 __int64 -#else -#define int64 long long -#endif - -/** -@file fix.h -@brief Implementation of operations of specific multiplication (FIX) - -The functions in FIX.H have for goal to realize specific multiplication. -*/ - -/** @defgroup FIX FIX - Implementation of operations of specific multiplication */ -/*@{*/ - -/** -Multiply two fixed-precision rational numbers. -@param a -@param b -@return Returns a * b -*/ -static INLINE int fix_mul(int a, int b) { - int64 temp = (int64) a * (int64) b ; - temp += temp & 4096; - return (int) (temp >> 13) ; -} - -/*@}*/ - -#endif /* __FIX_H */ diff --git a/Source/LibOpenJPEG/image.c b/Source/LibOpenJPEG/image.c deleted file mode 100644 index a4d2c01..0000000 --- a/Source/LibOpenJPEG/image.c +++ /dev/null @@ -1,89 +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(int numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc) { - int 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_malloc(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 = (int*) opj_calloc(comp->w * comp->h, sizeof(int)); - 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) { - int i; - if(image) { - if(image->comps) { - /* image components */ - for(i = 0; i < image->numcomps; i++) { - opj_image_comp_t *image_comp = &image->comps[i]; - if(image_comp->data) { - opj_free(image_comp->data); - } - } - opj_free(image->comps); - } - opj_free(image); - } -} - diff --git a/Source/LibOpenJPEG/image.h b/Source/LibOpenJPEG/image.h deleted file mode 100644 index f828b5b..0000000 --- a/Source/LibOpenJPEG/image.h +++ /dev/null @@ -1,48 +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. -*/ - -/** @defgroup IMAGE IMAGE - Implementation of operations on images */ -/*@{*/ - -/** -Create an empty image -@todo this function should be removed -@return returns an empty image if successful, returns NULL otherwise -*/ -opj_image_t* opj_image_create0(void); - -/*@}*/ - -#endif /* __IMAGE_H */ - diff --git a/Source/LibOpenJPEG/indexbox_manager.h b/Source/LibOpenJPEG/indexbox_manager.h deleted file mode 100644 index 6ba167c..0000000 --- a/Source/LibOpenJPEG/indexbox_manager.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * $Id: indexbox_manager.h,v 1.2 2012/09/23 12:44:41 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 write_tpix( int coff, opj_codestream_info_t cstr_info, int j2klen, opj_cio_t *cio); - - -/* - * 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 write_thix( int coff, opj_codestream_info_t cstr_info, opj_cio_t *cio); - - -/* - * 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 write_ppix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_cio_t *cio); - - -/* - * 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 write_phix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_cio_t *cio); - -/* - * 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 write_manf(int second, int v, opj_jp2_box_t *box, opj_cio_t *cio); - - -#endif /* !INDEXBOX_MANAGER_H_ */ diff --git a/Source/LibOpenJPEG/int.h b/Source/LibOpenJPEG/int.h deleted file mode 100644 index 4e5fe08..0000000 --- a/Source/LibOpenJPEG/int.h +++ /dev/null @@ -1,119 +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 __INT_H -#define __INT_H -/** -@file int.h -@brief Implementation of operations on integers (INT) - -The functions in INT.H have for goal to realize operations on integers. -*/ - -/** @defgroup INT INT - Implementation of operations on integers */ -/*@{*/ - -/** @name Exported functions (see also openjpeg.h) */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** -Get the minimum of two integers -@return Returns a if a < b else b -*/ -static INLINE int int_min(int a, int b) { - return a < b ? a : b; -} -/** -Get the maximum of two integers -@return Returns a if a > b else b -*/ -static INLINE int int_max(int a, int 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 int int_clamp(int a, int min, int max) { - if (a < min) - return min; - if (a > max) - return max; - return a; -} -/** -@return Get absolute value of integer -*/ -static INLINE int int_abs(int a) { - return a < 0 ? -a : a; -} -/** -Divide an integer and round upwards -@return Returns a divided by b -*/ -static INLINE int int_ceildiv(int a, int 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 int int_ceildivpow2(int a, int b) { - return (a + (1 << b) - 1) >> b; -} -/** -Divide an integer by a power of 2 and round downwards -@return Returns a divided by 2^b -*/ -static INLINE int int_floordivpow2(int a, int b) { - return a >> b; -} -/** -Get logarithm of an integer and round downwards -@return Returns log2(a) -*/ -static INLINE int int_floorlog2(int a) { - int l; - for (l = 0; a > 1; l++) { - a >>= 1; - } - return l; -} -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif diff --git a/Source/LibOpenJPEG/j2k.c b/Source/LibOpenJPEG/j2k.c deleted file mode 100644 index 3f8e279..0000000 --- a/Source/LibOpenJPEG/j2k.c +++ /dev/null @@ -1,2616 +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) 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" - -/** @defgroup J2K J2K - JPEG-2000 codestream reader/writer */ -/*@{*/ - -/** @name Local static functions */ -/*@{*/ - -/** -Write the SOC marker (Start Of Codestream) -@param j2k J2K handle -*/ -static void j2k_write_soc(opj_j2k_t *j2k); -/** -Read the SOC marker (Start of Codestream) -@param j2k J2K handle -*/ -static void j2k_read_soc(opj_j2k_t *j2k); -/** -Write the SIZ marker (image and tile size) -@param j2k J2K handle -*/ -static void j2k_write_siz(opj_j2k_t *j2k); -/** -Read the SIZ marker (image and tile size) -@param j2k J2K handle -*/ -static void j2k_read_siz(opj_j2k_t *j2k); -/** -Write the COM marker (comment) -@param j2k J2K handle -*/ -static void j2k_write_com(opj_j2k_t *j2k); -/** -Read the COM marker (comment) -@param j2k J2K handle -*/ -static void j2k_read_com(opj_j2k_t *j2k); -/** -Write the value concerning the specified component in the marker COD and COC -@param j2k J2K handle -@param compno Number of the component concerned by the information written -*/ -static void j2k_write_cox(opj_j2k_t *j2k, int compno); -/** -Read the value concerning the specified component in the marker COD and COC -@param j2k J2K handle -@param compno Number of the component concerned by the information read -*/ -static void j2k_read_cox(opj_j2k_t *j2k, int compno); -/** -Write the COD marker (coding style default) -@param j2k J2K handle -*/ -static void j2k_write_cod(opj_j2k_t *j2k); -/** -Read the COD marker (coding style default) -@param j2k J2K handle -*/ -static void j2k_read_cod(opj_j2k_t *j2k); -/** -Write the COC marker (coding style component) -@param j2k J2K handle -@param compno Number of the component concerned by the information written -*/ -static void j2k_write_coc(opj_j2k_t *j2k, int compno); -/** -Read the COC marker (coding style component) -@param j2k J2K handle -*/ -static void j2k_read_coc(opj_j2k_t *j2k); -/** -Write the value concerning the specified component in the marker QCD and QCC -@param j2k J2K handle -@param compno Number of the component concerned by the information written -*/ -static void j2k_write_qcx(opj_j2k_t *j2k, int compno); -/** -Read the value concerning the specified component in the marker QCD and QCC -@param j2k J2K handle -@param compno Number of the component concern by the information read -@param len Length of the information in the QCX part of the marker QCD/QCC -*/ -static void j2k_read_qcx(opj_j2k_t *j2k, int compno, int len); -/** -Write the QCD marker (quantization default) -@param j2k J2K handle -*/ -static void j2k_write_qcd(opj_j2k_t *j2k); -/** -Read the QCD marker (quantization default) -@param j2k J2K handle -*/ -static void j2k_read_qcd(opj_j2k_t *j2k); -/** -Write the QCC marker (quantization component) -@param j2k J2K handle -@param compno Number of the component concerned by the information written -*/ -static void j2k_write_qcc(opj_j2k_t *j2k, int compno); -/** -Read the QCC marker (quantization component) -@param j2k J2K handle -*/ -static void j2k_read_qcc(opj_j2k_t *j2k); -/** -Write the POC marker (progression order change) -@param j2k J2K handle -*/ -static void j2k_write_poc(opj_j2k_t *j2k); -/** -Read the POC marker (progression order change) -@param j2k J2K handle -*/ -static void j2k_read_poc(opj_j2k_t *j2k); -/** -Read the CRG marker (component registration) -@param j2k J2K handle -*/ -static void j2k_read_crg(opj_j2k_t *j2k); -/** -Read the TLM marker (tile-part lengths) -@param j2k J2K handle -*/ -static void j2k_read_tlm(opj_j2k_t *j2k); -/** -Read the PLM marker (packet length, main header) -@param j2k J2K handle -*/ -static void j2k_read_plm(opj_j2k_t *j2k); -/** -Read the PLT marker (packet length, tile-part header) -@param j2k J2K handle -*/ -static void j2k_read_plt(opj_j2k_t *j2k); -/** -Read the PPM marker (packet packet headers, main header) -@param j2k J2K handle -*/ -static void j2k_read_ppm(opj_j2k_t *j2k); -/** -Read the PPT marker (packet packet headers, tile-part header) -@param j2k J2K handle -*/ -static void j2k_read_ppt(opj_j2k_t *j2k); -/** -Write the TLM marker (Mainheader) -@param j2k J2K handle -*/ -static void j2k_write_tlm(opj_j2k_t *j2k); -/** -Write the SOT marker (start of tile-part) -@param j2k J2K handle -*/ -static void j2k_write_sot(opj_j2k_t *j2k); -/** -Read the SOT marker (start of tile-part) -@param j2k J2K handle -*/ -static void j2k_read_sot(opj_j2k_t *j2k); -/** -Write the SOD marker (start of data) -@param j2k J2K handle -@param tile_coder Pointer to a TCD handle -*/ -static void j2k_write_sod(opj_j2k_t *j2k, void *tile_coder); -/** -Read the SOD marker (start of data) -@param j2k J2K handle -*/ -static void j2k_read_sod(opj_j2k_t *j2k); -/** -Write the RGN marker (region-of-interest) -@param j2k J2K handle -@param compno Number of the component concerned by the information written -@param tileno Number of the tile concerned by the information written -*/ -static void j2k_write_rgn(opj_j2k_t *j2k, int compno, int tileno); -/** -Read the RGN marker (region-of-interest) -@param j2k J2K handle -*/ -static void j2k_read_rgn(opj_j2k_t *j2k); -/** -Write the EOC marker (end of codestream) -@param j2k J2K handle -*/ -static void j2k_write_eoc(opj_j2k_t *j2k); -/** -Read the EOC marker (end of codestream) -@param j2k J2K handle -*/ -static void j2k_read_eoc(opj_j2k_t *j2k); -/** -Read an unknown marker -@param j2k J2K handle -*/ -static void j2k_read_unk(opj_j2k_t *j2k); -/** -Add main header marker information -@param cstr_info Codestream information structure -@param type marker type -@param pos byte offset of marker segment -@param len length of marker segment - */ -static void j2k_add_mhmarker(opj_codestream_info_t *cstr_info, unsigned short int type, int pos, int len); -/** -Add tile header marker information -@param tileno tile index number -@param cstr_info Codestream information structure -@param type marker type -@param pos byte offset of marker segment -@param len length of marker segment - */ -static void j2k_add_tlmarker( int tileno, opj_codestream_info_t *cstr_info, unsigned short int type, int pos, int len); - -/*@}*/ - -/*@}*/ - -/* ----------------------------------------------------------------------- */ -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[] = { - {CPRL, "CPRL"}, - {LRCP, "LRCP"}, - {PCRL, "PCRL"}, - {RLCP, "RLCP"}, - {RPCL, "RPCL"}, - {(OPJ_PROG_ORDER)-1, ""} -}; - -char *j2k_convert_progression_order(OPJ_PROG_ORDER prg_order){ - j2k_prog_order_t *po; - for(po = j2k_prog_order_list; po->enum_prog != -1; po++ ){ - if(po->enum_prog == prg_order){ - break; - } - } - return po->str_prog; -} - -/* ----------------------------------------------------------------------- */ -static int j2k_get_num_tp(opj_cp_t *cp,int pino,int tileno){ - char *prog; - int i; - int tpnum=1,tpend=0; - opj_tcp_t *tcp = &cp->tcps[tileno]; - prog = j2k_convert_progression_order(tcp->prg); - - if(cp->tp_on == 1){ - for(i=0;i<4;i++){ - if(tpend!=1){ - if( cp->tp_flag == prog[i] ){ - tpend=1;cp->tp_pos=i; - } - switch(prog[i]){ - case 'C': - tpnum= tpnum * tcp->pocs[pino].compE; - break; - case 'R': - tpnum= tpnum * tcp->pocs[pino].resE; - break; - case 'P': - tpnum= tpnum * tcp->pocs[pino].prcE; - break; - case 'L': - tpnum= tpnum * tcp->pocs[pino].layE; - break; - } - } - } - }else{ - tpnum=1; - } - return tpnum; -} - -/** mem allocation for TLM marker*/ -int j2k_calculate_tp(opj_cp_t *cp,int img_numcomp,opj_image_t *image,opj_j2k_t *j2k ){ - int pino,tileno,totnum_tp=0; - - OPJ_ARG_NOT_USED(img_numcomp); - - j2k->cur_totnum_tp = (int *) opj_malloc(cp->tw * cp->th * sizeof(int)); - for (tileno = 0; tileno < cp->tw * cp->th; tileno++) { - int cur_totnum_tp = 0; - opj_tcp_t *tcp = &cp->tcps[tileno]; - for(pino = 0; pino <= tcp->numpocs; pino++) { - int tp_num=0; - opj_pi_iterator_t *pi = pi_initialise_encode(image, cp, tileno,FINAL_PASS); - if(!pi) { return -1;} - tp_num = j2k_get_num_tp(cp,pino,tileno); - totnum_tp = totnum_tp + tp_num; - cur_totnum_tp = cur_totnum_tp + tp_num; - pi_destroy(pi, cp, tileno); - } - j2k->cur_totnum_tp[tileno] = cur_totnum_tp; - /* INDEX >> */ - if (j2k->cstr_info) { - j2k->cstr_info->tile[tileno].num_tps = cur_totnum_tp; - j2k->cstr_info->tile[tileno].tp = (opj_tp_info_t *) opj_malloc(cur_totnum_tp * sizeof(opj_tp_info_t)); - } - /* << INDEX */ - } - return totnum_tp; -} - -static void j2k_write_soc(opj_j2k_t *j2k) { - opj_cio_t *cio = j2k->cio; - cio_write(cio, J2K_MS_SOC, 2); - - if(j2k->cstr_info) - j2k_add_mhmarker(j2k->cstr_info, J2K_MS_SOC, cio_tell(cio), 0); - -/* UniPG>> */ -#ifdef USE_JPWL - - /* update markers struct */ - j2k_add_marker(j2k->cstr_info, J2K_MS_SOC, cio_tell(cio) - 2, 2); -#endif /* USE_JPWL */ -/* <state = J2K_STATE_MHSIZ; - /* Index */ - if (j2k->cstr_info) { - j2k->cstr_info->main_head_start = cio_tell(j2k->cio) - 2; - j2k->cstr_info->codestream_size = cio_numbytesleft(j2k->cio) + 2 - j2k->cstr_info->main_head_start; - } -} - -static void j2k_write_siz(opj_j2k_t *j2k) { - int i; - int lenp, len; - - opj_cio_t *cio = j2k->cio; - opj_image_t *image = j2k->image; - opj_cp_t *cp = j2k->cp; - - cio_write(cio, J2K_MS_SIZ, 2); /* SIZ */ - lenp = cio_tell(cio); - cio_skip(cio, 2); - cio_write(cio, cp->rsiz, 2); /* Rsiz (capabilities) */ - cio_write(cio, image->x1, 4); /* Xsiz */ - cio_write(cio, image->y1, 4); /* Ysiz */ - cio_write(cio, image->x0, 4); /* X0siz */ - cio_write(cio, image->y0, 4); /* Y0siz */ - cio_write(cio, cp->tdx, 4); /* XTsiz */ - cio_write(cio, cp->tdy, 4); /* YTsiz */ - cio_write(cio, cp->tx0, 4); /* XT0siz */ - cio_write(cio, cp->ty0, 4); /* YT0siz */ - cio_write(cio, image->numcomps, 2); /* Csiz */ - for (i = 0; i < image->numcomps; i++) { - cio_write(cio, image->comps[i].prec - 1 + (image->comps[i].sgnd << 7), 1); /* Ssiz_i */ - cio_write(cio, image->comps[i].dx, 1); /* XRsiz_i */ - cio_write(cio, image->comps[i].dy, 1); /* YRsiz_i */ - } - len = cio_tell(cio) - lenp; - cio_seek(cio, lenp); - cio_write(cio, len, 2); /* Lsiz */ - cio_seek(cio, lenp + len); - - if(j2k->cstr_info) - j2k_add_mhmarker(j2k->cstr_info, J2K_MS_SIZ, lenp, len); -} - -static void j2k_read_siz(opj_j2k_t *j2k) { - int len, i; - - opj_cio_t *cio = j2k->cio; - opj_image_t *image = j2k->image; - opj_cp_t *cp = j2k->cp; - - len = cio_read(cio, 2); /* Lsiz */ - cio_read(cio, 2); /* Rsiz (capabilities) */ - image->x1 = cio_read(cio, 4); /* Xsiz */ - image->y1 = cio_read(cio, 4); /* Ysiz */ - image->x0 = cio_read(cio, 4); /* X0siz */ - image->y0 = cio_read(cio, 4); /* Y0siz */ - cp->tdx = cio_read(cio, 4); /* XTsiz */ - cp->tdy = cio_read(cio, 4); /* YTsiz */ - cp->tx0 = cio_read(cio, 4); /* XT0siz */ - cp->ty0 = cio_read(cio, 4); /* YT0siz */ - - if ((image->x0<0)||(image->x1<0)||(image->y0<0)||(image->y1<0)) { - opj_event_msg(j2k->cinfo, EVT_ERROR, - "%s: invalid image size (x0:%d, x1:%d, y0:%d, y1:%d)\n", - image->x0,image->x1,image->y0,image->y1); - return; - } - - image->numcomps = cio_read(cio, 2); /* Csiz */ - -#ifdef USE_JPWL - if (j2k->cp->correct) { - /* if JPWL is on, we check whether TX errors have damaged - too much the SIZ parameters */ - if (!(image->x1 * image->y1)) { - opj_event_msg(j2k->cinfo, EVT_ERROR, - "JPWL: bad image size (%d x %d)\n", - image->x1, image->y1); - if (!JPWL_ASSUME || JPWL_ASSUME) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return; - } - } - if (image->numcomps != ((len - 38) / 3)) { - opj_event_msg(j2k->cinfo, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, - "JPWL: Csiz is %d => space in SIZ only for %d comps.!!!\n", - image->numcomps, ((len - 38) / 3)); - if (!JPWL_ASSUME) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return; - } - /* we try to correct */ - opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust this\n"); - if (image->numcomps < ((len - 38) / 3)) { - len = 38 + 3 * image->numcomps; - opj_event_msg(j2k->cinfo, EVT_WARNING, "- setting Lsiz to %d => HYPOTHESIS!!!\n", - len); - } else { - image->numcomps = ((len - 38) / 3); - opj_event_msg(j2k->cinfo, EVT_WARNING, "- setting Csiz to %d => HYPOTHESIS!!!\n", - image->numcomps); - } - } - - /* update components number in the jpwl_exp_comps filed */ - cp->exp_comps = image->numcomps; - } -#endif /* USE_JPWL */ - - image->comps = (opj_image_comp_t*) opj_calloc(image->numcomps, sizeof(opj_image_comp_t)); - for (i = 0; i < image->numcomps; i++) { - int tmp, w, h; - tmp = cio_read(cio, 1); /* Ssiz_i */ - image->comps[i].prec = (tmp & 0x7f) + 1; - image->comps[i].sgnd = tmp >> 7; - image->comps[i].dx = cio_read(cio, 1); /* XRsiz_i */ - image->comps[i].dy = cio_read(cio, 1); /* YRsiz_i */ - -#ifdef USE_JPWL - if (j2k->cp->correct) { - /* if JPWL is on, we check whether TX errors have damaged - too much the SIZ parameters, again */ - if (!(image->comps[i].dx * image->comps[i].dy)) { - opj_event_msg(j2k->cinfo, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, - "JPWL: bad XRsiz_%d/YRsiz_%d (%d x %d)\n", - i, i, image->comps[i].dx, image->comps[i].dy); - if (!JPWL_ASSUME) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return; - } - /* we try to correct */ - opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust them\n"); - if (!image->comps[i].dx) { - image->comps[i].dx = 1; - opj_event_msg(j2k->cinfo, EVT_WARNING, "- setting XRsiz_%d to %d => HYPOTHESIS!!!\n", - i, image->comps[i].dx); - } - if (!image->comps[i].dy) { - image->comps[i].dy = 1; - opj_event_msg(j2k->cinfo, EVT_WARNING, "- setting YRsiz_%d to %d => HYPOTHESIS!!!\n", - i, image->comps[i].dy); - } - } - - } -#endif /* USE_JPWL */ - - /* TODO: unused ? */ - w = int_ceildiv(image->x1 - image->x0, image->comps[i].dx); - h = int_ceildiv(image->y1 - image->y0, image->comps[i].dy); - - image->comps[i].resno_decoded = 0; /* number of resolution decoded */ - image->comps[i].factor = cp->reduce; /* reducing factor per component */ - } - - cp->tw = int_ceildiv(image->x1 - cp->tx0, cp->tdx); - cp->th = int_ceildiv(image->y1 - cp->ty0, cp->tdy); - -#ifdef USE_JPWL - if (j2k->cp->correct) { - /* if JPWL is on, we check whether TX errors have damaged - too much the SIZ parameters */ - if ((cp->tw < 1) || (cp->th < 1) || (cp->tw > cp->max_tiles) || (cp->th > cp->max_tiles)) { - opj_event_msg(j2k->cinfo, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, - "JPWL: bad number of tiles (%d x %d)\n", - cp->tw, cp->th); - if (!JPWL_ASSUME) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return; - } - /* we try to correct */ - opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust them\n"); - if (cp->tw < 1) { - cp->tw= 1; - opj_event_msg(j2k->cinfo, EVT_WARNING, "- setting %d tiles in x => HYPOTHESIS!!!\n", - cp->tw); - } - if (cp->tw > cp->max_tiles) { - cp->tw= 1; - opj_event_msg(j2k->cinfo, EVT_WARNING, "- too large x, increase expectance of %d\n" - "- setting %d tiles in x => HYPOTHESIS!!!\n", - cp->max_tiles, cp->tw); - } - if (cp->th < 1) { - cp->th= 1; - opj_event_msg(j2k->cinfo, EVT_WARNING, "- setting %d tiles in y => HYPOTHESIS!!!\n", - cp->th); - } - if (cp->th > cp->max_tiles) { - cp->th= 1; - opj_event_msg(j2k->cinfo, EVT_WARNING, "- too large y, increase expectance of %d to continue\n", - "- setting %d tiles in y => HYPOTHESIS!!!\n", - cp->max_tiles, cp->th); - } - } - } -#endif /* USE_JPWL */ - - cp->tcps = (opj_tcp_t*) opj_calloc(cp->tw * cp->th, sizeof(opj_tcp_t)); - if (cp->tcps == NULL) - { - opj_event_msg(j2k->cinfo, EVT_ERROR, "Out of memory\n"); - return; - } - cp->tileno = (int*) opj_malloc(cp->tw * cp->th * sizeof(int)); - if (cp->tileno == NULL) - { - opj_event_msg(j2k->cinfo, EVT_ERROR, "Out of memory\n"); - return; - } - cp->tileno_size = 0; - -#ifdef USE_JPWL - if (j2k->cp->correct) { - if (!cp->tcps) { - opj_event_msg(j2k->cinfo, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, - "JPWL: could not alloc tcps field of cp\n"); - if (!JPWL_ASSUME || JPWL_ASSUME) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return; - } - } - } -#endif /* USE_JPWL */ - - for (i = 0; i < cp->tw * cp->th; i++) { - cp->tcps[i].POC = 0; - cp->tcps[i].numpocs = 0; - cp->tcps[i].first = 1; - } - - /* Initialization for PPM marker */ - cp->ppm = 0; - cp->ppm_data = NULL; - cp->ppm_data_first = NULL; - cp->ppm_previous = 0; - cp->ppm_store = 0; - - j2k->default_tcp->tccps = (opj_tccp_t*) opj_calloc(image->numcomps, sizeof(opj_tccp_t)); - for (i = 0; i < cp->tw * cp->th; i++) { - cp->tcps[i].tccps = (opj_tccp_t*) opj_malloc(image->numcomps * sizeof(opj_tccp_t)); - } - j2k->tile_data = (unsigned char**) opj_calloc(cp->tw * cp->th, sizeof(unsigned char*)); - j2k->tile_len = (int*) opj_calloc(cp->tw * cp->th, sizeof(int)); - j2k->state = J2K_STATE_MH; - - /* Index */ - if (j2k->cstr_info) { - opj_codestream_info_t *cstr_info = j2k->cstr_info; - cstr_info->image_w = image->x1 - image->x0; - cstr_info->image_h = image->y1 - image->y0; - cstr_info->numcomps = image->numcomps; - cstr_info->tw = cp->tw; - cstr_info->th = cp->th; - cstr_info->tile_x = cp->tdx; - cstr_info->tile_y = cp->tdy; - cstr_info->tile_Ox = cp->tx0; - cstr_info->tile_Oy = cp->ty0; - cstr_info->tile = (opj_tile_info_t*) opj_calloc(cp->tw * cp->th, sizeof(opj_tile_info_t)); - } -} - -static void j2k_write_com(opj_j2k_t *j2k) { - unsigned int i; - int lenp, len; - - if(j2k->cp->comment) { - opj_cio_t *cio = j2k->cio; - char *comment = j2k->cp->comment; - - cio_write(cio, J2K_MS_COM, 2); - lenp = cio_tell(cio); - cio_skip(cio, 2); - cio_write(cio, 1, 2); /* General use (IS 8859-15:1999 (Latin) values) */ - for (i = 0; i < strlen(comment); i++) { - cio_write(cio, comment[i], 1); - } - len = cio_tell(cio) - lenp; - cio_seek(cio, lenp); - cio_write(cio, len, 2); - cio_seek(cio, lenp + len); - - - if(j2k->cstr_info) - j2k_add_mhmarker(j2k->cstr_info, J2K_MS_COM, lenp, len); - - } -} - -static void j2k_read_com(opj_j2k_t *j2k) { - int len; - - opj_cio_t *cio = j2k->cio; - - len = cio_read(cio, 2); - cio_skip(cio, len - 2); -} - -static void j2k_write_cox(opj_j2k_t *j2k, int compno) { - int i; - - opj_cp_t *cp = j2k->cp; - opj_tcp_t *tcp = &cp->tcps[j2k->curtileno]; - opj_tccp_t *tccp = &tcp->tccps[compno]; - opj_cio_t *cio = j2k->cio; - - cio_write(cio, tccp->numresolutions - 1, 1); /* SPcox (D) */ - cio_write(cio, tccp->cblkw - 2, 1); /* SPcox (E) */ - cio_write(cio, tccp->cblkh - 2, 1); /* SPcox (F) */ - cio_write(cio, tccp->cblksty, 1); /* SPcox (G) */ - cio_write(cio, tccp->qmfbid, 1); /* SPcox (H) */ - - if (tccp->csty & J2K_CCP_CSTY_PRT) { - for (i = 0; i < tccp->numresolutions; i++) { - cio_write(cio, tccp->prcw[i] + (tccp->prch[i] << 4), 1); /* SPcox (I_i) */ - } - } -} - -static void j2k_read_cox(opj_j2k_t *j2k, int compno) { - int i; - - opj_cp_t *cp = j2k->cp; - opj_tcp_t *tcp = j2k->state == J2K_STATE_TPH ? &cp->tcps[j2k->curtileno] : j2k->default_tcp; - opj_tccp_t *tccp = &tcp->tccps[compno]; - opj_cio_t *cio = j2k->cio; - - tccp->numresolutions = cio_read(cio, 1) + 1; /* SPcox (D) */ - - /* If user wants to remove more resolutions than the codestream contains, return error*/ - if (cp->reduce >= tccp->numresolutions) { - opj_event_msg(j2k->cinfo, 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); - j2k->state |= J2K_STATE_ERR; - } - if( tccp->numresolutions > J2K_MAXRLVLS ) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "Error decoding component %d.\nThe number of resolutions is too big: %d vs max= %d. Truncating.\n\n", - compno, tccp->numresolutions, J2K_MAXRLVLS); - j2k->state |= J2K_STATE_ERR; - tccp->numresolutions = J2K_MAXRLVLS; - } - - tccp->cblkw = cio_read(cio, 1) + 2; /* SPcox (E) */ - tccp->cblkh = cio_read(cio, 1) + 2; /* SPcox (F) */ - tccp->cblksty = cio_read(cio, 1); /* SPcox (G) */ - tccp->qmfbid = cio_read(cio, 1); /* SPcox (H) */ - if (tccp->csty & J2K_CP_CSTY_PRT) { - for (i = 0; i < tccp->numresolutions; i++) { - int tmp = cio_read(cio, 1); /* SPcox (I_i) */ - tccp->prcw[i] = tmp & 0xf; - tccp->prch[i] = tmp >> 4; - } - } - - /* INDEX >> */ - if(j2k->cstr_info && compno == 0) { - for (i = 0; i < tccp->numresolutions; i++) { - if (tccp->csty & J2K_CP_CSTY_PRT) { - j2k->cstr_info->tile[j2k->curtileno].pdx[i] = tccp->prcw[i]; - j2k->cstr_info->tile[j2k->curtileno].pdy[i] = tccp->prch[i]; - } - else { - j2k->cstr_info->tile[j2k->curtileno].pdx[i] = 15; - j2k->cstr_info->tile[j2k->curtileno].pdx[i] = 15; - } - } - } - /* << INDEX */ -} - -static void j2k_write_cod(opj_j2k_t *j2k) { - opj_cp_t *cp = NULL; - opj_tcp_t *tcp = NULL; - int lenp, len; - - opj_cio_t *cio = j2k->cio; - - cio_write(cio, J2K_MS_COD, 2); /* COD */ - - lenp = cio_tell(cio); - cio_skip(cio, 2); - - cp = j2k->cp; - tcp = &cp->tcps[j2k->curtileno]; - - cio_write(cio, tcp->csty, 1); /* Scod */ - cio_write(cio, tcp->prg, 1); /* SGcod (A) */ - cio_write(cio, tcp->numlayers, 2); /* SGcod (B) */ - cio_write(cio, tcp->mct, 1); /* SGcod (C) */ - - j2k_write_cox(j2k, 0); - len = cio_tell(cio) - lenp; - cio_seek(cio, lenp); - cio_write(cio, len, 2); /* Lcod */ - cio_seek(cio, lenp + len); - - if(j2k->cstr_info) - j2k_add_mhmarker(j2k->cstr_info, J2K_MS_COD, lenp, len); - -} - -static void j2k_read_cod(opj_j2k_t *j2k) { - int len, i, pos; - - opj_cio_t *cio = j2k->cio; - opj_cp_t *cp = j2k->cp; - opj_tcp_t *tcp = j2k->state == J2K_STATE_TPH ? &cp->tcps[j2k->curtileno] : j2k->default_tcp; - opj_image_t *image = j2k->image; - - len = cio_read(cio, 2); /* Lcod */ - tcp->csty = cio_read(cio, 1); /* Scod */ - tcp->prg = (OPJ_PROG_ORDER)cio_read(cio, 1); /* SGcod (A) */ - tcp->numlayers = cio_read(cio, 2); /* SGcod (B) */ - tcp->mct = cio_read(cio, 1); /* SGcod (C) */ - - pos = cio_tell(cio); - for (i = 0; i < image->numcomps; i++) { - tcp->tccps[i].csty = tcp->csty & J2K_CP_CSTY_PRT; - cio_seek(cio, pos); - j2k_read_cox(j2k, i); - } - - /* Index */ - if (j2k->cstr_info) { - opj_codestream_info_t *cstr_info = j2k->cstr_info; - cstr_info->prog = tcp->prg; - cstr_info->numlayers = tcp->numlayers; - cstr_info->numdecompos = (int*) opj_malloc(image->numcomps * sizeof(int)); - for (i = 0; i < image->numcomps; i++) { - cstr_info->numdecompos[i] = tcp->tccps[i].numresolutions - 1; - } - } -} - -static void j2k_write_coc(opj_j2k_t *j2k, int compno) { - int lenp, len; - - opj_cp_t *cp = j2k->cp; - opj_tcp_t *tcp = &cp->tcps[j2k->curtileno]; - opj_image_t *image = j2k->image; - opj_cio_t *cio = j2k->cio; - - cio_write(cio, J2K_MS_COC, 2); /* COC */ - lenp = cio_tell(cio); - cio_skip(cio, 2); - cio_write(cio, compno, image->numcomps <= 256 ? 1 : 2); /* Ccoc */ - cio_write(cio, tcp->tccps[compno].csty, 1); /* Scoc */ - j2k_write_cox(j2k, compno); - len = cio_tell(cio) - lenp; - cio_seek(cio, lenp); - cio_write(cio, len, 2); /* Lcoc */ - cio_seek(cio, lenp + len); -} - -static void j2k_read_coc(opj_j2k_t *j2k) { - int len, compno; - - opj_cp_t *cp = j2k->cp; - opj_tcp_t *tcp = j2k->state == J2K_STATE_TPH ? &cp->tcps[j2k->curtileno] : j2k->default_tcp; - opj_image_t *image = j2k->image; - opj_cio_t *cio = j2k->cio; - - len = cio_read(cio, 2); /* Lcoc */ - compno = cio_read(cio, image->numcomps <= 256 ? 1 : 2); /* Ccoc */ - tcp->tccps[compno].csty = cio_read(cio, 1); /* Scoc */ - j2k_read_cox(j2k, compno); -} - -static void j2k_write_qcx(opj_j2k_t *j2k, int compno) { - int bandno, numbands; - int expn, mant; - - opj_cp_t *cp = j2k->cp; - opj_tcp_t *tcp = &cp->tcps[j2k->curtileno]; - opj_tccp_t *tccp = &tcp->tccps[compno]; - opj_cio_t *cio = j2k->cio; - - cio_write(cio, tccp->qntsty + (tccp->numgbits << 5), 1); /* Sqcx */ - numbands = tccp->qntsty == J2K_CCP_QNTSTY_SIQNT ? 1 : tccp->numresolutions * 3 - 2; - - for (bandno = 0; bandno < numbands; bandno++) { - expn = tccp->stepsizes[bandno].expn; - mant = tccp->stepsizes[bandno].mant; - - if (tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) { - cio_write(cio, expn << 3, 1); /* SPqcx_i */ - } else { - cio_write(cio, (expn << 11) + mant, 2); /* SPqcx_i */ - } - } -} - -static void j2k_read_qcx(opj_j2k_t *j2k, int compno, int len) { - int tmp; - int bandno, numbands; - - opj_cp_t *cp = j2k->cp; - opj_tcp_t *tcp = j2k->state == J2K_STATE_TPH ? &cp->tcps[j2k->curtileno] : j2k->default_tcp; - opj_tccp_t *tccp = &tcp->tccps[compno]; - opj_cio_t *cio = j2k->cio; - - tmp = cio_read(cio, 1); /* Sqcx */ - tccp->qntsty = tmp & 0x1f; - tccp->numgbits = tmp >> 5; - numbands = (tccp->qntsty == J2K_CCP_QNTSTY_SIQNT) ? - 1 : ((tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) ? len - 1 : (len - 1) / 2); - -#ifdef USE_JPWL - if (j2k->cp->correct) { - - /* if JPWL is on, we check whether there are too many subbands */ - if ((numbands < 0) || (numbands >= J2K_MAXBANDS)) { - opj_event_msg(j2k->cinfo, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, - "JPWL: bad number of subbands in Sqcx (%d)\n", - numbands); - if (!JPWL_ASSUME) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return; - } - /* we try to correct */ - numbands = 1; - opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust them\n" - "- setting number of bands to %d => HYPOTHESIS!!!\n", - numbands); - }; - - }; - -#else - /* We check whether there are too many subbands */ - if ((numbands < 0) || (numbands >= J2K_MAXBANDS)) { - opj_event_msg(j2k->cinfo, EVT_WARNING , - "bad number of subbands in Sqcx (%d) regarding to J2K_MAXBANDS (%d) \n" - "- limiting number of bands to J2K_MAXBANDS and try to move to the next markers\n", numbands, J2K_MAXBANDS); - } - -#endif /* USE_JPWL */ - - for (bandno = 0; bandno < numbands; bandno++) { - int expn, mant; - if (tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) { - expn = cio_read(cio, 1) >> 3; /* SPqcx_i */ - mant = 0; - } else { - tmp = cio_read(cio, 2); /* SPqcx_i */ - expn = tmp >> 11; - mant = tmp & 0x7ff; - } - if (bandno < J2K_MAXBANDS){ - tccp->stepsizes[bandno].expn = expn; - tccp->stepsizes[bandno].mant = mant; - } - } - - /* Add Antonin : if scalar_derived -> compute other stepsizes */ - if (tccp->qntsty == J2K_CCP_QNTSTY_SIQNT) { - for (bandno = 1; bandno < J2K_MAXBANDS; bandno++) { - tccp->stepsizes[bandno].expn = - ((tccp->stepsizes[0].expn) - ((bandno - 1) / 3) > 0) ? - (tccp->stepsizes[0].expn) - ((bandno - 1) / 3) : 0; - tccp->stepsizes[bandno].mant = tccp->stepsizes[0].mant; - } - } - /* ddA */ -} - -static void j2k_write_qcd(opj_j2k_t *j2k) { - int lenp, len; - - opj_cio_t *cio = j2k->cio; - - cio_write(cio, J2K_MS_QCD, 2); /* QCD */ - lenp = cio_tell(cio); - cio_skip(cio, 2); - j2k_write_qcx(j2k, 0); - len = cio_tell(cio) - lenp; - cio_seek(cio, lenp); - cio_write(cio, len, 2); /* Lqcd */ - cio_seek(cio, lenp + len); - - if(j2k->cstr_info) - j2k_add_mhmarker(j2k->cstr_info, J2K_MS_QCD, lenp, len); -} - -static void j2k_read_qcd(opj_j2k_t *j2k) { - int len, i, pos; - - opj_cio_t *cio = j2k->cio; - opj_image_t *image = j2k->image; - - len = cio_read(cio, 2); /* Lqcd */ - pos = cio_tell(cio); - for (i = 0; i < image->numcomps; i++) { - cio_seek(cio, pos); - j2k_read_qcx(j2k, i, len - 2); - } -} - -static void j2k_write_qcc(opj_j2k_t *j2k, int compno) { - int lenp, len; - - opj_cio_t *cio = j2k->cio; - - cio_write(cio, J2K_MS_QCC, 2); /* QCC */ - lenp = cio_tell(cio); - cio_skip(cio, 2); - cio_write(cio, compno, j2k->image->numcomps <= 256 ? 1 : 2); /* Cqcc */ - j2k_write_qcx(j2k, compno); - len = cio_tell(cio) - lenp; - cio_seek(cio, lenp); - cio_write(cio, len, 2); /* Lqcc */ - cio_seek(cio, lenp + len); -} - -static void j2k_read_qcc(opj_j2k_t *j2k) { - int len, compno; - int numcomp = j2k->image->numcomps; - opj_cio_t *cio = j2k->cio; - - len = cio_read(cio, 2); /* Lqcc */ - compno = cio_read(cio, numcomp <= 256 ? 1 : 2); /* Cqcc */ - -#ifdef USE_JPWL - if (j2k->cp->correct) { - - static int backup_compno = 0; - - /* compno is negative or larger than the number of components!!! */ - if ((compno < 0) || (compno >= numcomp)) { - opj_event_msg(j2k->cinfo, EVT_ERROR, - "JPWL: bad component number in QCC (%d out of a maximum of %d)\n", - compno, numcomp); - if (!JPWL_ASSUME) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return; - } - /* we try to correct */ - compno = backup_compno % numcomp; - opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust this\n" - "- setting component number to %d\n", - compno); - } - - /* keep your private count of tiles */ - backup_compno++; - }; -#endif /* USE_JPWL */ - - j2k_read_qcx(j2k, compno, len - 2 - (numcomp <= 256 ? 1 : 2)); -} - -static void j2k_write_poc(opj_j2k_t *j2k) { - int len, numpchgs, i; - - int numcomps = j2k->image->numcomps; - - opj_cp_t *cp = j2k->cp; - opj_tcp_t *tcp = &cp->tcps[j2k->curtileno]; - opj_tccp_t *tccp = &tcp->tccps[0]; - opj_cio_t *cio = j2k->cio; - - numpchgs = 1 + tcp->numpocs; - cio_write(cio, J2K_MS_POC, 2); /* POC */ - len = 2 + (5 + 2 * (numcomps <= 256 ? 1 : 2)) * numpchgs; - cio_write(cio, len, 2); /* Lpoc */ - for (i = 0; i < numpchgs; i++) { - opj_poc_t *poc = &tcp->pocs[i]; - cio_write(cio, poc->resno0, 1); /* RSpoc_i */ - cio_write(cio, poc->compno0, (numcomps <= 256 ? 1 : 2)); /* CSpoc_i */ - cio_write(cio, poc->layno1, 2); /* LYEpoc_i */ - poc->layno1 = int_min(poc->layno1, tcp->numlayers); - cio_write(cio, poc->resno1, 1); /* REpoc_i */ - poc->resno1 = int_min(poc->resno1, tccp->numresolutions); - cio_write(cio, poc->compno1, (numcomps <= 256 ? 1 : 2)); /* CEpoc_i */ - poc->compno1 = int_min(poc->compno1, numcomps); - cio_write(cio, poc->prg, 1); /* Ppoc_i */ - } -} - -static void j2k_read_poc(opj_j2k_t *j2k) { - int len, numpchgs, i, old_poc; - - int numcomps = j2k->image->numcomps; - - opj_cp_t *cp = j2k->cp; - opj_tcp_t *tcp = j2k->state == J2K_STATE_TPH ? &cp->tcps[j2k->curtileno] : j2k->default_tcp; - opj_cio_t *cio = j2k->cio; - - old_poc = tcp->POC ? tcp->numpocs + 1 : 0; - tcp->POC = 1; - len = cio_read(cio, 2); /* Lpoc */ - numpchgs = (len - 2) / (5 + 2 * (numcomps <= 256 ? 1 : 2)); - - for (i = old_poc; i < numpchgs + old_poc; i++) { - opj_poc_t *poc; - poc = &tcp->pocs[i]; - poc->resno0 = cio_read(cio, 1); /* RSpoc_i */ - poc->compno0 = cio_read(cio, numcomps <= 256 ? 1 : 2); /* CSpoc_i */ - poc->layno1 = cio_read(cio, 2); /* LYEpoc_i */ - poc->resno1 = cio_read(cio, 1); /* REpoc_i */ - poc->compno1 = int_min( - cio_read(cio, numcomps <= 256 ? 1 : 2), (unsigned int) numcomps); /* CEpoc_i */ - poc->prg = (OPJ_PROG_ORDER)cio_read(cio, 1); /* Ppoc_i */ - } - - tcp->numpocs = numpchgs + old_poc - 1; -} - -static void j2k_read_crg(opj_j2k_t *j2k) { - int len, i, Xcrg_i, Ycrg_i; - - opj_cio_t *cio = j2k->cio; - int numcomps = j2k->image->numcomps; - - len = cio_read(cio, 2); /* Lcrg */ - for (i = 0; i < numcomps; i++) { - Xcrg_i = cio_read(cio, 2); /* Xcrg_i */ - Ycrg_i = cio_read(cio, 2); /* Ycrg_i */ - } -} - -static void j2k_read_tlm(opj_j2k_t *j2k) { - int len, Ztlm, Stlm, ST, SP, tile_tlm, i; - long int Ttlm_i, Ptlm_i; - - opj_cio_t *cio = j2k->cio; - - len = cio_read(cio, 2); /* Ltlm */ - Ztlm = cio_read(cio, 1); /* Ztlm */ - Stlm = cio_read(cio, 1); /* Stlm */ - ST = ((Stlm >> 4) & 0x01) + ((Stlm >> 4) & 0x02); - SP = (Stlm >> 6) & 0x01; - tile_tlm = (len - 4) / ((SP + 1) * 2 + ST); - for (i = 0; i < tile_tlm; i++) { - Ttlm_i = cio_read(cio, ST); /* Ttlm_i */ - Ptlm_i = cio_read(cio, SP ? 4 : 2); /* Ptlm_i */ - } -} - -static void j2k_read_plm(opj_j2k_t *j2k) { - int len, i, Zplm, Nplm, add, packet_len = 0; - - opj_cio_t *cio = j2k->cio; - - len = cio_read(cio, 2); /* Lplm */ - Zplm = cio_read(cio, 1); /* Zplm */ - len -= 3; - while (len > 0) { - Nplm = cio_read(cio, 4); /* Nplm */ - len -= 4; - for (i = Nplm; i > 0; i--) { - add = cio_read(cio, 1); - len--; - packet_len = (packet_len << 7) + add; /* Iplm_ij */ - if ((add & 0x80) == 0) { - /* New packet */ - packet_len = 0; - } - if (len <= 0) - break; - } - } -} - -static void j2k_read_plt(opj_j2k_t *j2k) { - int len, i, Zplt, packet_len = 0, add; - - opj_cio_t *cio = j2k->cio; - - len = cio_read(cio, 2); /* Lplt */ - Zplt = cio_read(cio, 1); /* Zplt */ - for (i = len - 3; i > 0; i--) { - add = cio_read(cio, 1); - packet_len = (packet_len << 7) + add; /* Iplt_i */ - if ((add & 0x80) == 0) { - /* New packet */ - packet_len = 0; - } - } -} - -static void j2k_read_ppm(opj_j2k_t *j2k) { - int len, Z_ppm, i, j; - int N_ppm; - - opj_cp_t *cp = j2k->cp; - opj_cio_t *cio = j2k->cio; - - len = cio_read(cio, 2); - cp->ppm = 1; - - Z_ppm = cio_read(cio, 1); /* Z_ppm */ - len -= 3; - while (len > 0) { - if (cp->ppm_previous == 0) { - N_ppm = cio_read(cio, 4); /* N_ppm */ - len -= 4; - } else { - N_ppm = cp->ppm_previous; - } - j = cp->ppm_store; - if (Z_ppm == 0) { /* First PPM marker */ - cp->ppm_data = (unsigned char *) opj_malloc(N_ppm * sizeof(unsigned char)); - cp->ppm_data_first = cp->ppm_data; - cp->ppm_len = N_ppm; - } else { /* NON-first PPM marker */ - cp->ppm_data = (unsigned char *) opj_realloc(cp->ppm_data, (N_ppm + cp->ppm_store) * sizeof(unsigned char)); - -#ifdef USE_JPWL - /* this memory allocation check could be done even in non-JPWL cases */ - if (cp->correct) { - if (!cp->ppm_data) { - opj_event_msg(j2k->cinfo, EVT_ERROR, - "JPWL: failed memory allocation during PPM marker parsing (pos. %x)\n", - cio_tell(cio)); - if (!JPWL_ASSUME || JPWL_ASSUME) { - opj_free(cp->ppm_data); - opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return; - } - } - } -#endif - - cp->ppm_data_first = cp->ppm_data; - cp->ppm_len = N_ppm + cp->ppm_store; - } - for (i = N_ppm; i > 0; i--) { /* Read packet header */ - cp->ppm_data[j] = cio_read(cio, 1); - j++; - len--; - if (len == 0) - break; /* Case of non-finished packet header in present marker but finished in next one */ - } - cp->ppm_previous = i - 1; - cp->ppm_store = j; - } -} - -static void j2k_read_ppt(opj_j2k_t *j2k) { - int len, Z_ppt, i, j = 0; - - opj_cp_t *cp = j2k->cp; - opj_tcp_t *tcp = cp->tcps + j2k->curtileno; - opj_cio_t *cio = j2k->cio; - - len = cio_read(cio, 2); - Z_ppt = cio_read(cio, 1); - tcp->ppt = 1; - if (Z_ppt == 0) { /* First PPT marker */ - tcp->ppt_data = (unsigned char *) opj_malloc((len - 3) * sizeof(unsigned char)); - tcp->ppt_data_first = tcp->ppt_data; - tcp->ppt_store = 0; - tcp->ppt_len = len - 3; - } else { /* NON-first PPT marker */ - tcp->ppt_data = (unsigned char *) opj_realloc(tcp->ppt_data, (len - 3 + tcp->ppt_store) * sizeof(unsigned char)); - tcp->ppt_data_first = tcp->ppt_data; - tcp->ppt_len = len - 3 + tcp->ppt_store; - } - j = tcp->ppt_store; - for (i = len - 3; i > 0; i--) { - tcp->ppt_data[j] = cio_read(cio, 1); - j++; - } - tcp->ppt_store = j; -} - -static void j2k_write_tlm(opj_j2k_t *j2k){ - int lenp; - opj_cio_t *cio = j2k->cio; - j2k->tlm_start = cio_tell(cio); - cio_write(cio, J2K_MS_TLM, 2);/* TLM */ - lenp = 4 + (5*j2k->totnum_tp); - cio_write(cio,lenp,2); /* Ltlm */ - cio_write(cio, 0,1); /* Ztlm=0*/ - cio_write(cio,80,1); /* Stlm ST=1(8bits-255 tiles max),SP=1(Ptlm=32bits) */ - cio_skip(cio,5*j2k->totnum_tp); -} - -static void j2k_write_sot(opj_j2k_t *j2k) { - int lenp, len; - - opj_cio_t *cio = j2k->cio; - - j2k->sot_start = cio_tell(cio); - cio_write(cio, J2K_MS_SOT, 2); /* SOT */ - lenp = cio_tell(cio); - cio_skip(cio, 2); /* Lsot (further) */ - cio_write(cio, j2k->curtileno, 2); /* Isot */ - cio_skip(cio, 4); /* Psot (further in j2k_write_sod) */ - cio_write(cio, j2k->cur_tp_num , 1); /* TPsot */ - cio_write(cio, j2k->cur_totnum_tp[j2k->curtileno], 1); /* TNsot */ - len = cio_tell(cio) - lenp; - cio_seek(cio, lenp); - cio_write(cio, len, 2); /* Lsot */ - cio_seek(cio, lenp + len); - - /* UniPG>> */ -#ifdef USE_JPWL - /* update markers struct */ - j2k_add_marker(j2k->cstr_info, J2K_MS_SOT, j2k->sot_start, len + 2); -#endif /* USE_JPWL */ - /* <cstr_info && j2k->cur_tp_num==0){ - j2k_add_tlmarker( j2k->curtileno, j2k->cstr_info, J2K_MS_SOT, lenp, len); - } -} - -static void j2k_read_sot(opj_j2k_t *j2k) { - int len, tileno, totlen, partno, numparts, i; - opj_tcp_t *tcp = NULL; - char status = 0; - - opj_cp_t *cp = j2k->cp; - opj_cio_t *cio = j2k->cio; - - len = cio_read(cio, 2); - tileno = cio_read(cio, 2); - -#ifdef USE_JPWL - if (j2k->cp->correct) { - - static int backup_tileno = 0; - - /* tileno is negative or larger than the number of tiles!!! */ - if ((tileno < 0) || (tileno >= (cp->tw * cp->th))) { - opj_event_msg(j2k->cinfo, EVT_ERROR, - "JPWL: bad tile number (%d out of a maximum of %d)\n", - tileno, (cp->tw * cp->th)); - if (!JPWL_ASSUME) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return; - } - /* we try to correct */ - tileno = backup_tileno; - opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust this\n" - "- setting tile number to %d\n", - tileno); - } - - /* keep your private count of tiles */ - backup_tileno++; - } - else -#endif /* USE_JPWL */ - { - /* tileno is negative or larger than the number of tiles!!! */ - if ((tileno < 0) || (tileno >= (cp->tw * cp->th))) { - opj_event_msg(j2k->cinfo, EVT_ERROR, - "JPWL: bad tile number (%d out of a maximum of %d)\n", - tileno, (cp->tw * cp->th)); - return; - } - } - - if (cp->tileno_size == 0) { - cp->tileno[cp->tileno_size] = tileno; - cp->tileno_size++; - } else { - i = 0; - while (i < cp->tileno_size && status == 0) { - status = cp->tileno[i] == tileno ? 1 : 0; - i++; - } - if (status == 0) { - cp->tileno[cp->tileno_size] = tileno; - cp->tileno_size++; - } - } - - totlen = cio_read(cio, 4); - -#ifdef USE_JPWL - if (j2k->cp->correct) { - - /* totlen is negative or larger than the bytes left!!! */ - if ((totlen < 0) || (totlen > (cio_numbytesleft(cio) + 8))) { - opj_event_msg(j2k->cinfo, EVT_ERROR, - "JPWL: bad tile byte size (%d bytes against %d bytes left)\n", - totlen, cio_numbytesleft(cio) + 8); - if (!JPWL_ASSUME) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return; - } - /* we try to correct */ - totlen = 0; - opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust this\n" - "- setting Psot to %d => assuming it is the last tile\n", - totlen); - } - - } - else -#endif /* USE_JPWL */ - { - /* totlen is negative or larger than the bytes left!!! */ - if ((totlen < 0) || (totlen > (cio_numbytesleft(cio) + 8))) { - opj_event_msg(j2k->cinfo, EVT_ERROR, - "JPWL: bad tile byte size (%d bytes against %d bytes left)\n", - totlen, cio_numbytesleft(cio) + 8); - return; - } - } - - if (!totlen) - totlen = cio_numbytesleft(cio) + 8; - - partno = cio_read(cio, 1); - numparts = cio_read(cio, 1); - - if (partno >= numparts) { - opj_event_msg(j2k->cinfo, EVT_WARNING, "SOT marker inconsistency in tile %d: tile-part index greater (%d) than number of tile-parts (%d)\n", tileno, partno, numparts); - numparts = partno+1; - } - - j2k->curtileno = tileno; - j2k->cur_tp_num = partno; - j2k->eot = cio_getbp(cio) - 12 + totlen; - j2k->state = J2K_STATE_TPH; - tcp = &cp->tcps[j2k->curtileno]; - - /* Index */ - if (j2k->cstr_info) { - if (tcp->first) { - if (tileno == 0) - j2k->cstr_info->main_head_end = cio_tell(cio) - 13; - j2k->cstr_info->tile[tileno].tileno = tileno; - j2k->cstr_info->tile[tileno].start_pos = cio_tell(cio) - 12; - j2k->cstr_info->tile[tileno].end_pos = j2k->cstr_info->tile[tileno].start_pos + totlen - 1; - } else { - j2k->cstr_info->tile[tileno].end_pos += totlen; - } - j2k->cstr_info->tile[tileno].num_tps = numparts; - if (numparts) - j2k->cstr_info->tile[tileno].tp = (opj_tp_info_t *) opj_realloc(j2k->cstr_info->tile[tileno].tp, numparts * sizeof(opj_tp_info_t)); - else - j2k->cstr_info->tile[tileno].tp = (opj_tp_info_t *) opj_realloc(j2k->cstr_info->tile[tileno].tp, 10 * sizeof(opj_tp_info_t)); /* Fixme (10)*/ - j2k->cstr_info->tile[tileno].tp[partno].tp_start_pos = cio_tell(cio) - 12; - j2k->cstr_info->tile[tileno].tp[partno].tp_end_pos = - j2k->cstr_info->tile[tileno].tp[partno].tp_start_pos + totlen - 1; - } - - if (tcp->first == 1) { - /* Initialization PPT */ - opj_tccp_t *tmp = tcp->tccps; - memcpy(tcp, j2k->default_tcp, sizeof(opj_tcp_t)); - tcp->ppt = 0; - tcp->ppt_data = NULL; - tcp->ppt_data_first = NULL; - tcp->tccps = tmp; - - for (i = 0; i < j2k->image->numcomps; i++) { - tcp->tccps[i] = j2k->default_tcp->tccps[i]; - } - cp->tcps[j2k->curtileno].first = 0; - } -} - -static void j2k_write_sod(opj_j2k_t *j2k, void *tile_coder) { - int l, layno; - int totlen; - opj_tcp_t *tcp = NULL; - opj_codestream_info_t *cstr_info = NULL; - - opj_tcd_t *tcd = (opj_tcd_t*)tile_coder; /* cast is needed because of conflicts in header inclusions */ - opj_cp_t *cp = j2k->cp; - opj_cio_t *cio = j2k->cio; - - tcd->tp_num = j2k->tp_num ; - tcd->cur_tp_num = j2k->cur_tp_num; - - cio_write(cio, J2K_MS_SOD, 2); - - if( j2k->cstr_info && j2k->cur_tp_num==0){ - j2k_add_tlmarker( j2k->curtileno, j2k->cstr_info, J2K_MS_SOD, cio_tell(cio), 0); - } - - if (j2k->curtileno == 0) { - j2k->sod_start = cio_tell(cio) + j2k->pos_correction; - } - - /* INDEX >> */ - cstr_info = j2k->cstr_info; - if (cstr_info) { - if (!j2k->cur_tp_num ) { - cstr_info->tile[j2k->curtileno].end_header = cio_tell(cio) + j2k->pos_correction - 1; - j2k->cstr_info->tile[j2k->curtileno].tileno = j2k->curtileno; - } - else{ - if(cstr_info->tile[j2k->curtileno].packet[cstr_info->packno - 1].end_pos < cio_tell(cio)) - cstr_info->tile[j2k->curtileno].packet[cstr_info->packno].start_pos = cio_tell(cio); - } - /* UniPG>> */ -#ifdef USE_JPWL - /* update markers struct */ - j2k_add_marker(j2k->cstr_info, J2K_MS_SOD, j2k->sod_start, 2); -#endif /* USE_JPWL */ - /* <tcps[j2k->curtileno]; - for (layno = 0; layno < tcp->numlayers; layno++) { - if (tcp->rates[layno]>(j2k->sod_start / (cp->th * cp->tw))) { - tcp->rates[layno]-=(j2k->sod_start / (cp->th * cp->tw)); - } else if (tcp->rates[layno]) { - tcp->rates[layno]=1; - } - } - if(j2k->cur_tp_num == 0){ - tcd->tcd_image->tiles->packno = 0; - if(cstr_info) - cstr_info->packno = 0; - } - - l = tcd_encode_tile(tcd, j2k->curtileno, cio_getbp(cio), cio_numbytesleft(cio) - 2, cstr_info); - - /* Writing Psot in SOT marker */ - totlen = cio_tell(cio) + l - j2k->sot_start; - cio_seek(cio, j2k->sot_start + 6); - cio_write(cio, totlen, 4); - cio_seek(cio, j2k->sot_start + totlen); - /* Writing Ttlm and Ptlm in TLM marker */ - if(cp->cinema){ - cio_seek(cio, j2k->tlm_start + 6 + (5*j2k->cur_tp_num)); - cio_write(cio, j2k->curtileno, 1); - cio_write(cio, totlen, 4); - } - cio_seek(cio, j2k->sot_start + totlen); -} - -static void j2k_read_sod(opj_j2k_t *j2k) { - int len, truncate = 0, i; - unsigned char *data = NULL, *data_ptr = NULL; - - opj_cio_t *cio = j2k->cio; - int curtileno = j2k->curtileno; - - /* Index */ - if (j2k->cstr_info) { - j2k->cstr_info->tile[j2k->curtileno].tp[j2k->cur_tp_num].tp_end_header = - cio_tell(cio) + j2k->pos_correction - 1; - if (j2k->cur_tp_num == 0) - j2k->cstr_info->tile[j2k->curtileno].end_header = cio_tell(cio) + j2k->pos_correction - 1; - j2k->cstr_info->packno = 0; - } - - len = int_min(j2k->eot - cio_getbp(cio), cio_numbytesleft(cio) + 1); - - if (len == cio_numbytesleft(cio) + 1) { - truncate = 1; /* Case of a truncate codestream */ - } - - {/* chop padding bytes: */ - unsigned char *s, *e; - - s = cio_getbp(cio); - e = s + len; - - if(len > 8) s = e - 8; - - if(e[-2] == 0x00 && e[-1] == 0x00) /* padding bytes */ - { - while(e > s) - { - if(e[-2] == 0xff && e[-1] == 0xd9) break; - --len; --e; truncate = 1; - } - } - } - - data = j2k->tile_data[curtileno]; - data = (unsigned char*) opj_realloc(data, (j2k->tile_len[curtileno] + len) * sizeof(unsigned char)); - - data_ptr = data + j2k->tile_len[curtileno]; - for (i = 0; i < len; i++) { - data_ptr[i] = cio_read(cio, 1); - } - - j2k->tile_len[curtileno] += len; - j2k->tile_data[curtileno] = data; - - if (!truncate) { - j2k->state = J2K_STATE_TPHSOT; - } else { - j2k->state = J2K_STATE_NEOC; /* RAJOUTE !! */ - } - j2k->cur_tp_num++; -} - -static void j2k_write_rgn(opj_j2k_t *j2k, int compno, int tileno) { - opj_cp_t *cp = j2k->cp; - opj_tcp_t *tcp = &cp->tcps[tileno]; - opj_cio_t *cio = j2k->cio; - int numcomps = j2k->image->numcomps; - - cio_write(cio, J2K_MS_RGN, 2); /* RGN */ - cio_write(cio, numcomps <= 256 ? 5 : 6, 2); /* Lrgn */ - cio_write(cio, compno, numcomps <= 256 ? 1 : 2); /* Crgn */ - cio_write(cio, 0, 1); /* Srgn */ - cio_write(cio, tcp->tccps[compno].roishift, 1); /* SPrgn */ -} - -static void j2k_read_rgn(opj_j2k_t *j2k) { - int len, compno, roisty; - - opj_cp_t *cp = j2k->cp; - opj_tcp_t *tcp = j2k->state == J2K_STATE_TPH ? &cp->tcps[j2k->curtileno] : j2k->default_tcp; - opj_cio_t *cio = j2k->cio; - int numcomps = j2k->image->numcomps; - - len = cio_read(cio, 2); /* Lrgn */ - compno = cio_read(cio, numcomps <= 256 ? 1 : 2); /* Crgn */ - roisty = cio_read(cio, 1); /* Srgn */ - -#ifdef USE_JPWL - if (j2k->cp->correct) { - /* totlen is negative or larger than the bytes left!!! */ - if (compno >= numcomps) { - opj_event_msg(j2k->cinfo, EVT_ERROR, - "JPWL: bad component number in RGN (%d when there are only %d)\n", - compno, numcomps); - if (!JPWL_ASSUME || JPWL_ASSUME) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return; - } - } - }; -#endif /* USE_JPWL */ - - tcp->tccps[compno].roishift = cio_read(cio, 1); /* SPrgn */ -} - -static void j2k_write_eoc(opj_j2k_t *j2k) { - opj_cio_t *cio = j2k->cio; - /* opj_event_msg(j2k->cinfo, "%.8x: EOC\n", cio_tell(cio) + j2k->pos_correction); */ - cio_write(cio, J2K_MS_EOC, 2); - -/* UniPG>> */ -#ifdef USE_JPWL - /* update markers struct */ - j2k_add_marker(j2k->cstr_info, J2K_MS_EOC, cio_tell(cio) - 2, 2); -#endif /* USE_JPWL */ -/* <cp->limit_decoding != DECODE_ALL_BUT_PACKETS) { - opj_tcd_t *tcd = tcd_create(j2k->cinfo); - tcd_malloc_decode(tcd, j2k->image, j2k->cp); - for (i = 0; i < j2k->cp->tileno_size; i++) { - tcd_malloc_decode_tile(tcd, j2k->image, j2k->cp, i, j2k->cstr_info); - if (j2k->cp->tileno[i] != -1) - { - tileno = j2k->cp->tileno[i]; - success = tcd_decode_tile(tcd, j2k->tile_data[tileno], j2k->tile_len[tileno], tileno, j2k->cstr_info); - opj_free(j2k->tile_data[tileno]); - j2k->tile_data[tileno] = NULL; - tcd_free_decode_tile(tcd, i); - } - else - success = OPJ_FALSE; - if (success == OPJ_FALSE) { - j2k->state |= J2K_STATE_ERR; - break; - } - } - tcd_free_decode(tcd); - tcd_destroy(tcd); - } - /* if packets should not be decoded */ - else { - for (i = 0; i < j2k->cp->tileno_size; i++) { - tileno = j2k->cp->tileno[i]; - opj_free(j2k->tile_data[tileno]); - j2k->tile_data[tileno] = NULL; - } - } - if (j2k->state & J2K_STATE_ERR) - j2k->state = J2K_STATE_MT + J2K_STATE_ERR; - else - j2k->state = J2K_STATE_MT; -} - -typedef struct opj_dec_mstabent { - /** marker value */ - int id; - /** value of the state when the marker can appear */ - int states; - /** action linked to the marker */ - void (*handler) (opj_j2k_t *j2k); -} opj_dec_mstabent_t; - -opj_dec_mstabent_t j2k_dec_mstab[] = { - {J2K_MS_SOC, J2K_STATE_MHSOC, j2k_read_soc}, - {J2K_MS_SOT, J2K_STATE_MH | J2K_STATE_TPHSOT, j2k_read_sot}, - {J2K_MS_SOD, J2K_STATE_TPH, j2k_read_sod}, - {J2K_MS_EOC, J2K_STATE_TPHSOT, j2k_read_eoc}, - {J2K_MS_SIZ, J2K_STATE_MHSIZ, j2k_read_siz}, - {J2K_MS_COD, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_cod}, - {J2K_MS_COC, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_coc}, - {J2K_MS_RGN, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_rgn}, - {J2K_MS_QCD, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_qcd}, - {J2K_MS_QCC, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_qcc}, - {J2K_MS_POC, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_poc}, - {J2K_MS_TLM, J2K_STATE_MH, j2k_read_tlm}, - {J2K_MS_PLM, J2K_STATE_MH, j2k_read_plm}, - {J2K_MS_PLT, J2K_STATE_TPH, j2k_read_plt}, - {J2K_MS_PPM, J2K_STATE_MH, j2k_read_ppm}, - {J2K_MS_PPT, J2K_STATE_TPH, j2k_read_ppt}, - {J2K_MS_SOP, 0, 0}, - {J2K_MS_CRG, J2K_STATE_MH, j2k_read_crg}, - {J2K_MS_COM, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_com}, - -#ifdef USE_JPWL - {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 /* USE_JPWL */ -#ifdef USE_JPSEC - {J2K_MS_SEC, J2K_STATE_MH, j2k_read_sec}, - {J2K_MS_INSEC, 0, j2k_read_insec}, -#endif /* USE_JPSEC */ - - {0, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_unk} -}; - -static void j2k_read_unk(opj_j2k_t *j2k) { - opj_event_msg(j2k->cinfo, EVT_WARNING, "Unknown marker\n"); - -#ifdef USE_JPWL - if (j2k->cp->correct) { - int m = 0, id, i; - int min_id = 0, min_dist = 17, cur_dist = 0, tmp_id; - cio_seek(j2k->cio, cio_tell(j2k->cio) - 2); - id = cio_read(j2k->cio, 2); - opj_event_msg(j2k->cinfo, EVT_ERROR, - "JPWL: really don't know this marker %x\n", - id); - if (!JPWL_ASSUME) { - opj_event_msg(j2k->cinfo, EVT_ERROR, - "- possible synch loss due to uncorrectable codestream errors => giving up\n"); - return; - } - /* OK, activate this at your own risk!!! */ - /* we look for the marker at the minimum hamming distance from this */ - while (j2k_dec_mstab[m].id) { - - /* 1's where they differ */ - tmp_id = j2k_dec_mstab[m].id ^ id; - - /* compute the hamming distance between our id and the current */ - cur_dist = 0; - for (i = 0; i < 16; i++) { - if ((tmp_id >> i) & 0x0001) { - cur_dist++; - } - } - - /* if current distance is smaller, set the minimum */ - if (cur_dist < min_dist) { - min_dist = cur_dist; - min_id = j2k_dec_mstab[m].id; - } - - /* jump to the next marker */ - m++; - } - - /* do we substitute the marker? */ - if (min_dist < JPWL_MAXIMUM_HAMMING) { - opj_event_msg(j2k->cinfo, EVT_ERROR, - "- marker %x is at distance %d from the read %x\n", - min_id, min_dist, id); - opj_event_msg(j2k->cinfo, EVT_ERROR, - "- trying to substitute in place and crossing fingers!\n"); - cio_seek(j2k->cio, cio_tell(j2k->cio) - 2); - cio_write(j2k->cio, min_id, 2); - - /* rewind */ - cio_seek(j2k->cio, cio_tell(j2k->cio) - 2); - - } - - }; -#endif /* USE_JPWL */ - -} - -/** -Read the lookup table containing all the marker, status and action -@param id Marker value -*/ -static opj_dec_mstabent_t *j2k_dec_mstab_lookup(int id) { - opj_dec_mstabent_t *e; - for (e = j2k_dec_mstab; e->id != 0; e++) { - if (e->id == id) { - break; - } - } - return e; -} - -/* ----------------------------------------------------------------------- */ -/* J2K / JPT decoder interface */ -/* ----------------------------------------------------------------------- */ - -opj_j2k_t* j2k_create_decompress(opj_common_ptr cinfo) { - opj_j2k_t *j2k = (opj_j2k_t*) opj_calloc(1, sizeof(opj_j2k_t)); - if(!j2k) - return NULL; - - j2k->default_tcp = (opj_tcp_t*) opj_calloc(1, sizeof(opj_tcp_t)); - if(!j2k->default_tcp) { - opj_free(j2k); - return NULL; - } - - j2k->cinfo = cinfo; - j2k->tile_data = NULL; - - return j2k; -} - -void j2k_destroy_decompress(opj_j2k_t *j2k) { - int i = 0; - - if(j2k->tile_len != NULL) { - opj_free(j2k->tile_len); - } - if(j2k->tile_data != NULL) { - if(j2k->cp != NULL) { - for (i = 0; i < j2k->cp->tileno_size; i++) { - int tileno = j2k->cp->tileno[i]; - opj_free(j2k->tile_data[tileno]); - j2k->tile_data[tileno] = NULL; - } - } - - opj_free(j2k->tile_data); - } - if(j2k->default_tcp != NULL) { - opj_tcp_t *default_tcp = j2k->default_tcp; - if(default_tcp->ppt_data_first != NULL) { - opj_free(default_tcp->ppt_data_first); - } - if(j2k->default_tcp->tccps != NULL) { - opj_free(j2k->default_tcp->tccps); - } - opj_free(j2k->default_tcp); - } - if(j2k->cp != NULL) { - opj_cp_t *cp = j2k->cp; - if(cp->tcps != NULL) { - for(i = 0; i < cp->tw * cp->th; i++) { - if(cp->tcps[i].ppt_data_first != NULL) { - opj_free(cp->tcps[i].ppt_data_first); - } - if(cp->tcps[i].tccps != NULL) { - opj_free(cp->tcps[i].tccps); - } - } - opj_free(cp->tcps); - } - if(cp->ppm_data_first != NULL) { - opj_free(cp->ppm_data_first); - } - if(cp->tileno != NULL) { - opj_free(cp->tileno); - } - if(cp->comment != NULL) { - opj_free(cp->comment); - } - - opj_free(cp); - } - opj_free(j2k); -} - -void j2k_setup_decoder(opj_j2k_t *j2k, opj_dparameters_t *parameters) { - if(j2k && parameters) { - /* create and initialize the coding parameters structure */ - opj_cp_t *cp = (opj_cp_t*) opj_calloc(1, sizeof(opj_cp_t)); - cp->reduce = parameters->cp_reduce; - cp->layer = parameters->cp_layer; - cp->limit_decoding = parameters->cp_limit_decoding; - -#ifdef USE_JPWL - cp->correct = parameters->jpwl_correct; - cp->exp_comps = parameters->jpwl_exp_comps; - cp->max_tiles = parameters->jpwl_max_tiles; -#endif /* USE_JPWL */ - - - /* keep a link to cp so that we can destroy it later in j2k_destroy_decompress */ - j2k->cp = cp; - } -} - -opj_image_t* j2k_decode(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info) { - opj_image_t *image = NULL; - - opj_common_ptr cinfo = j2k->cinfo; - - j2k->cio = cio; - j2k->cstr_info = cstr_info; - if (cstr_info) - memset(cstr_info, 0, sizeof(opj_codestream_info_t)); - - /* create an empty image */ - image = opj_image_create0(); - j2k->image = image; - - j2k->state = J2K_STATE_MHSOC; - - for (;;) { - opj_dec_mstabent_t *e; - int id = cio_read(cio, 2); - -#ifdef USE_JPWL - /* we try to honor JPWL correction power */ - if (j2k->cp->correct) { - - int orig_pos = cio_tell(cio); - opj_bool status; - - /* call the corrector */ - status = jpwl_correct(j2k); - - /* go back to where you were */ - cio_seek(cio, orig_pos - 2); - - /* re-read the marker */ - id = cio_read(cio, 2); - - /* check whether it begins with ff */ - if (id >> 8 != 0xff) { - opj_event_msg(cinfo, EVT_ERROR, - "JPWL: possible bad marker %x at %d\n", - id, cio_tell(cio) - 2); - if (!JPWL_ASSUME) { - opj_image_destroy(image); - opj_event_msg(cinfo, EVT_ERROR, "JPWL: giving up\n"); - return 0; - } - /* we try to correct */ - id = id | 0xff00; - cio_seek(cio, cio_tell(cio) - 2); - cio_write(cio, id, 2); - opj_event_msg(cinfo, EVT_WARNING, "- trying to adjust this\n" - "- setting marker to %x\n", - id); - } - - } -#endif /* USE_JPWL */ - - if (id >> 8 != 0xff) { - if(cio_numbytesleft(cio) != 0) /* not end of file reached and no EOC */ - { - opj_event_msg(cinfo, EVT_ERROR, "%.8x: expected a marker instead of %x\n", cio_tell(cio) - 2, id); - opj_image_destroy(image); - return 0; - } - opj_event_msg(cinfo, EVT_WARNING, "%.8x: expected a marker instead of %x\n", cio_tell(cio) - 2, id); - j2k->state = J2K_STATE_NEOC; - break; - } - e = j2k_dec_mstab_lookup(id); - /* Check if the marker is known*/ - if (!(j2k->state & e->states)) { - opj_image_destroy(image); - opj_event_msg(cinfo, EVT_ERROR, "%.8x: unexpected marker %x\n", cio_tell(cio) - 2, id); - return 0; - } - /* Check if the decoding is limited to the main header*/ - if (e->id == J2K_MS_SOT && j2k->cp->limit_decoding == LIMIT_TO_MAIN_HEADER) { - opj_event_msg(cinfo, EVT_INFO, "Main Header decoded.\n"); - return image; - } - - if (e->handler) { - (*e->handler)(j2k); - } - if (j2k->state & J2K_STATE_ERR) - { - opj_image_destroy(image); - return NULL; - } - - if (j2k->state == J2K_STATE_MT) { - break; - } - if (j2k->state == J2K_STATE_NEOC) { - break; - } - } - if (j2k->state == J2K_STATE_NEOC) { - j2k_read_eoc(j2k); - } - - if (j2k->state != J2K_STATE_MT) { - opj_event_msg(cinfo, EVT_WARNING, "Incomplete bitstream\n"); - } - return image; -} - -/* -* Read a JPT-stream and decode file -* -*/ -opj_image_t* j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info) { - opj_image_t *image = NULL; - opj_jpt_msg_header_t header; - int position; - opj_common_ptr cinfo = j2k->cinfo; - - OPJ_ARG_NOT_USED(cstr_info); - - j2k->cio = cio; - - /* create an empty image */ - image = opj_image_create0(); - j2k->image = image; - - j2k->state = J2K_STATE_MHSOC; - - /* Initialize the header */ - jpt_init_msg_header(&header); - /* Read the first header of the message */ - jpt_read_msg_header(cinfo, cio, &header); - - position = cio_tell(cio); - if (header.Class_Id != 6) { /* 6 : Main header data-bin message */ - opj_image_destroy(image); - opj_event_msg(cinfo, EVT_ERROR, "[JPT-stream] : Expecting Main header first [class_Id %d] !\n", header.Class_Id); - return 0; - } - - for (;;) { - opj_dec_mstabent_t *e = NULL; - int id; - - if (!cio_numbytesleft(cio)) { - j2k_read_eoc(j2k); - return image; - } - /* data-bin read -> need to read a new header */ - if ((unsigned int) (cio_tell(cio) - position) == header.Msg_length) { - jpt_read_msg_header(cinfo, cio, &header); - position = cio_tell(cio); - if (header.Class_Id != 4) { /* 4 : Tile data-bin message */ - opj_image_destroy(image); - opj_event_msg(cinfo, EVT_ERROR, "[JPT-stream] : Expecting Tile info !\n"); - return 0; - } - } - - id = cio_read(cio, 2); - if (id >> 8 != 0xff) { - if(cio_numbytesleft(cio) != 0) /* no end of file reached and no EOC */ - { - opj_event_msg(cinfo, EVT_ERROR, "%.8x: expected a marker instead of %x\n", cio_tell(cio) - 2, id); - opj_image_destroy(image); - return 0; - } - opj_event_msg(cinfo, EVT_WARNING, "%.8x: expected a marker instead of %x\n", cio_tell(cio) - 2, id); - j2k->state = J2K_STATE_NEOC; - break; - } - e = j2k_dec_mstab_lookup(id); - if (!(j2k->state & e->states)) { - opj_image_destroy(image); - opj_event_msg(cinfo, EVT_ERROR, "%.8x: unexpected marker %x\n", cio_tell(cio) - 2, id); - return 0; - } - if (e->handler) { - (*e->handler)(j2k); - } - if (j2k->state == J2K_STATE_MT) { - break; - } - if (j2k->state == J2K_STATE_NEOC) { - break; - } - } - if (j2k->state == J2K_STATE_NEOC) { - j2k_read_eoc(j2k); - } - - if (j2k->state != J2K_STATE_MT) { - opj_event_msg(cinfo, EVT_WARNING, "Incomplete bitstream\n"); - } - - return image; -} - -/* ----------------------------------------------------------------------- */ -/* J2K encoder interface */ -/* ----------------------------------------------------------------------- */ - -opj_j2k_t* j2k_create_compress(opj_common_ptr cinfo) { - opj_j2k_t *j2k = (opj_j2k_t*) opj_calloc(1, sizeof(opj_j2k_t)); - if(j2k) { - j2k->cinfo = cinfo; - } - return j2k; -} - -void j2k_destroy_compress(opj_j2k_t *j2k) { - int tileno; - - if(!j2k) return; - if(j2k->cp != NULL) { - opj_cp_t *cp = j2k->cp; - - if(cp->comment) { - opj_free(cp->comment); - } - if(cp->matrice) { - opj_free(cp->matrice); - } - for (tileno = 0; tileno < cp->tw * cp->th; tileno++) { - opj_free(cp->tcps[tileno].tccps); - } - opj_free(cp->tcps); - opj_free(cp); - } - - opj_free(j2k); -} - -void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_image_t *image) { - int i, j, tileno, numpocs_tile; - opj_cp_t *cp = NULL; - - if(!j2k || !parameters || ! image) { - return; - } - - /* create and initialize the coding parameters structure */ - cp = (opj_cp_t*) opj_calloc(1, sizeof(opj_cp_t)); - - /* keep a link to cp so that we can destroy it later in j2k_destroy_compress */ - j2k->cp = cp; - - /* set default values for cp */ - cp->tw = 1; - cp->th = 1; - - /* - copy user encoding parameters - */ - cp->cinema = parameters->cp_cinema; - cp->max_comp_size = parameters->max_comp_size; - cp->rsiz = parameters->cp_rsiz; - cp->disto_alloc = parameters->cp_disto_alloc; - cp->fixed_alloc = parameters->cp_fixed_alloc; - cp->fixed_quality = parameters->cp_fixed_quality; - - /* mod fixed_quality */ - if(parameters->cp_matrice) { - size_t array_size = parameters->tcp_numlayers * parameters->numresolution * 3 * sizeof(int); - cp->matrice = (int *) opj_malloc(array_size); - memcpy(cp->matrice, parameters->cp_matrice, array_size); - } - - /* tiles */ - cp->tdx = parameters->cp_tdx; - cp->tdy = parameters->cp_tdy; - - /* tile offset */ - cp->tx0 = parameters->cp_tx0; - cp->ty0 = 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 = int_ceildiv(image->x1 - cp->tx0, cp->tdx); - cp->th = int_ceildiv(image->y1 - cp->ty0, cp->tdy); - } else { - cp->tdx = image->x1 - cp->tx0; - cp->tdy = image->y1 - cp->ty0; - } - - if(parameters->tp_on){ - cp->tp_flag = parameters->tp_flag; - cp->tp_on = 1; - } - - cp->img_size = 0; - for(i=0;inumcomps ;i++){ - cp->img_size += (image->comps[i].w *image->comps[i].h * image->comps[i].prec); - } - - -#ifdef USE_JPWL - /* - calculate JPWL encoding parameters - */ - - if (parameters->jpwl_epc_on) { - int 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)); - - for (tileno = 0; tileno < cp->tw * cp->th; tileno++) { - opj_tcp_t *tcp = &cp->tcps[tileno]; - tcp->numlayers = parameters->tcp_numlayers; - for (j = 0; j < tcp->numlayers; j++) { - if(cp->cinema){ - if (cp->fixed_quality) { - tcp->distoratio[j] = parameters->tcp_distoratio[j]; - } - tcp->rates[j] = parameters->tcp_rates[j]; - }else{ - if (cp->fixed_quality) { /* add fixed_quality */ - tcp->distoratio[j] = parameters->tcp_distoratio[j]; - } else { - tcp->rates[j] = parameters->tcp_rates[j]; - } - } - } - tcp->csty = parameters->csty; - tcp->prg = parameters->prog_order; - tcp->mct = 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 == parameters->POC[i].tile - 1) || (parameters->POC[i].tile == -1)) { - 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)); - - 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 = parameters->numresolution; - tccp->cblkw = int_floorlog2(parameters->cblockw_init); - tccp->cblkh = int_floorlog2(parameters->cblockh_init); - tccp->cblksty = parameters->mode; - tccp->qmfbid = parameters->irreversible ? 0 : 1; - tccp->qntsty = parameters->irreversible ? J2K_CCP_QNTSTY_SEQNT : J2K_CCP_QNTSTY_NOQNT; - tccp->numgbits = 2; - if (i == parameters->roi_compno) { - tccp->roishift = parameters->roi_shift; - } else { - tccp->roishift = 0; - } - - if(parameters->cp_cinema) - { - /*Precinct size for lowest frequency subband=128*/ - tccp->prcw[0] = 7; - tccp->prch[0] = 7; - /*Precinct size at all other resolutions = 256*/ - for (j = 1; j < tccp->numresolutions; j++) { - tccp->prcw[j] = 8; - tccp->prch[j] = 8; - } - }else{ - if (parameters->csty & J2K_CCP_CSTY_PRT) { - int p = 0; - for (j = tccp->numresolutions - 1; j >= 0; j--) { - if (p < parameters->res_spec) { - - if (parameters->prcw_init[p] < 1) { - tccp->prcw[j] = 1; - } else { - tccp->prcw[j] = int_floorlog2(parameters->prcw_init[p]); - } - - if (parameters->prch_init[p] < 1) { - tccp->prch[j] = 1; - }else { - tccp->prch[j] = int_floorlog2(parameters->prch_init[p]); - } - - } else { - int res_spec = parameters->res_spec; - int size_prcw = parameters->prcw_init[res_spec - 1] >> (p - (res_spec - 1)); - int size_prch = parameters->prch_init[res_spec - 1] >> (p - (res_spec - 1)); - - if (size_prcw < 1) { - tccp->prcw[j] = 1; - } else { - tccp->prcw[j] = int_floorlog2(size_prcw); - } - - if (size_prch < 1) { - tccp->prch[j] = 1; - } else { - tccp->prch[j] = int_floorlog2(size_prch); - } - } - p++; - /*printf("\nsize precinct for level %d : %d,%d\n", j,tccp->prcw[j], tccp->prch[j]); */ - } /*end for*/ - } else { - for (j = 0; j < tccp->numresolutions; j++) { - tccp->prcw[j] = 15; - tccp->prch[j] = 15; - } - } - } - - dwt_calc_explicit_stepsizes(tccp, image->comps[i].prec); - } - } -} - -opj_bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info) { - int tileno, compno; - opj_cp_t *cp = NULL; - - opj_tcd_t *tcd = NULL; /* TCD component */ - - j2k->cio = cio; - j2k->image = image; - - cp = j2k->cp; - - /* INDEX >> */ - j2k->cstr_info = cstr_info; - if (cstr_info) { - int compno; - cstr_info->tile = (opj_tile_info_t *) opj_malloc(cp->tw * cp->th * sizeof(opj_tile_info_t)); - cstr_info->image_w = image->x1 - image->x0; - cstr_info->image_h = image->y1 - image->y0; - cstr_info->prog = (&cp->tcps[0])->prg; - cstr_info->tw = cp->tw; - cstr_info->th = cp->th; - cstr_info->tile_x = cp->tdx; /* new version parser */ - cstr_info->tile_y = cp->tdy; /* new version parser */ - cstr_info->tile_Ox = cp->tx0; /* new version parser */ - cstr_info->tile_Oy = cp->ty0; /* new version parser */ - cstr_info->numcomps = image->numcomps; - cstr_info->numlayers = (&cp->tcps[0])->numlayers; - cstr_info->numdecompos = (int*) opj_malloc(image->numcomps * sizeof(int)); - for (compno=0; compno < image->numcomps; compno++) { - cstr_info->numdecompos[compno] = (&cp->tcps[0])->tccps->numresolutions - 1; - } - cstr_info->D_max = 0.0; /* ADD Marcela */ - cstr_info->main_head_start = cio_tell(cio); /* position of SOC */ - cstr_info->maxmarknum = 100; - cstr_info->marker = (opj_marker_info_t *) opj_malloc(cstr_info->maxmarknum * sizeof(opj_marker_info_t)); - cstr_info->marknum = 0; - } - /* << INDEX */ - - j2k_write_soc(j2k); - j2k_write_siz(j2k); - j2k_write_cod(j2k); - j2k_write_qcd(j2k); - - if(cp->cinema){ - for (compno = 1; compno < image->numcomps; compno++) { - j2k_write_coc(j2k, compno); - j2k_write_qcc(j2k, compno); - } - } - - for (compno = 0; compno < image->numcomps; compno++) { - opj_tcp_t *tcp = &cp->tcps[0]; - if (tcp->tccps[compno].roishift) - j2k_write_rgn(j2k, compno, 0); - } - if (cp->comment != NULL) { - j2k_write_com(j2k); - } - - j2k->totnum_tp = j2k_calculate_tp(cp,image->numcomps,image,j2k); - /* TLM Marker*/ - if(cp->cinema){ - j2k_write_tlm(j2k); - if (cp->cinema == CINEMA4K_24) { - j2k_write_poc(j2k); - } - } - - /* uncomment only for testing JPSEC marker writing */ - /* j2k_write_sec(j2k); */ - - /* INDEX >> */ - if(cstr_info) { - cstr_info->main_head_end = cio_tell(cio) - 1; - } - /* << INDEX */ - /**** Main Header ENDS here ***/ - - /* create the tile encoder */ - tcd = tcd_create(j2k->cinfo); - - /* encode each tile */ - for (tileno = 0; tileno < cp->tw * cp->th; tileno++) { - int pino; - int tilepartno=0; - /* UniPG>> */ - int acc_pack_num = 0; - /* <tcps[tileno]; - opj_event_msg(j2k->cinfo, EVT_INFO, "tile number %d / %d\n", tileno + 1, cp->tw * cp->th); - - j2k->curtileno = tileno; - j2k->cur_tp_num = 0; - tcd->cur_totnum_tp = j2k->cur_totnum_tp[j2k->curtileno]; - /* initialisation before tile encoding */ - if (tileno == 0) { - tcd_malloc_encode(tcd, image, cp, j2k->curtileno); - } else { - tcd_init_encode(tcd, image, cp, j2k->curtileno); - } - - /* INDEX >> */ - if(cstr_info) { - cstr_info->tile[j2k->curtileno].start_pos = cio_tell(cio) + j2k->pos_correction; - cstr_info->tile[j2k->curtileno].maxmarknum = 10; - cstr_info->tile[j2k->curtileno].marker = (opj_marker_info_t *) opj_malloc(cstr_info->tile[j2k->curtileno].maxmarknum * sizeof(opj_marker_info_t)); - cstr_info->tile[j2k->curtileno].marknum = 0; - } - /* << INDEX */ - - for(pino = 0; pino <= tcp->numpocs; pino++) { - int tot_num_tp; - tcd->cur_pino=pino; - - /*Get number of tile parts*/ - tot_num_tp = j2k_get_num_tp(cp,pino,tileno); - tcd->tp_pos = cp->tp_pos; - - for(tilepartno = 0; tilepartno < tot_num_tp ; tilepartno++){ - j2k->tp_num = tilepartno; - /* INDEX >> */ - if(cstr_info) - cstr_info->tile[j2k->curtileno].tp[j2k->cur_tp_num].tp_start_pos = - cio_tell(cio) + j2k->pos_correction; - /* << INDEX */ - j2k_write_sot(j2k); - - if(j2k->cur_tp_num == 0 && cp->cinema == 0){ - for (compno = 1; compno < image->numcomps; compno++) { - j2k_write_coc(j2k, compno); - j2k_write_qcc(j2k, compno); - } - if (cp->tcps[tileno].numpocs) { - j2k_write_poc(j2k); - } - } - - /* INDEX >> */ - if(cstr_info) - cstr_info->tile[j2k->curtileno].tp[j2k->cur_tp_num].tp_end_header = - cio_tell(cio) + j2k->pos_correction + 1; - /* << INDEX */ - - j2k_write_sod(j2k, tcd); - - /* INDEX >> */ - if(cstr_info) { - cstr_info->tile[j2k->curtileno].tp[j2k->cur_tp_num].tp_end_pos = - cio_tell(cio) + j2k->pos_correction - 1; - cstr_info->tile[j2k->curtileno].tp[j2k->cur_tp_num].tp_start_pack = - acc_pack_num; - cstr_info->tile[j2k->curtileno].tp[j2k->cur_tp_num].tp_numpacks = - cstr_info->packno - acc_pack_num; - acc_pack_num = cstr_info->packno; - } - /* << INDEX */ - - j2k->cur_tp_num++; - } - } - if(cstr_info) { - cstr_info->tile[j2k->curtileno].end_pos = cio_tell(cio) + j2k->pos_correction - 1; - } - - - /* - if (tile->PPT) { // BAD PPT !!! - FILE *PPT_file; - int i; - PPT_file=fopen("PPT","rb"); - fprintf(stderr,"%c%c%c%c",255,97,tile->len_ppt/256,tile->len_ppt%256); - for (i=0;ilen_ppt;i++) { - unsigned char elmt; - fread(&elmt, 1, 1, PPT_file); - fwrite(&elmt,1,1,f); - } - fclose(PPT_file); - unlink("PPT"); - } - */ - - } - - /* destroy the tile encoder */ - tcd_free_encode(tcd); - tcd_destroy(tcd); - - opj_free(j2k->cur_totnum_tp); - - j2k_write_eoc(j2k); - - if(cstr_info) { - cstr_info->codestream_size = cio_tell(cio) + j2k->pos_correction; - /* 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 */ - cstr_info->codestream_size -= cstr_info->main_head_start; - /* <epc_on) { - - /* encode according to JPWL */ - jpwl_encode(j2k, cio, image); - - } -#endif /* USE_JPWL */ - - return OPJ_TRUE; -} - -static void j2k_add_mhmarker(opj_codestream_info_t *cstr_info, unsigned short int type, int pos, int len) { - - if (!cstr_info) - return; - - /* expand the list? */ - if ((cstr_info->marknum + 1) > cstr_info->maxmarknum) { - cstr_info->maxmarknum = 100 + (int) ((float) cstr_info->maxmarknum * 1.0F); - cstr_info->marker = (opj_marker_info_t*)opj_realloc(cstr_info->marker, cstr_info->maxmarknum); - } - - /* add the marker */ - cstr_info->marker[cstr_info->marknum].type = type; - cstr_info->marker[cstr_info->marknum].pos = pos; - cstr_info->marker[cstr_info->marknum].len = len; - cstr_info->marknum++; - -} - -static void j2k_add_tlmarker( int tileno, opj_codestream_info_t *cstr_info, unsigned short int type, int pos, int len) { - - opj_marker_info_t *marker; - - if (!cstr_info) - return; - - /* expand the list? */ - if ((cstr_info->tile[tileno].marknum + 1) > cstr_info->tile[tileno].maxmarknum) { - cstr_info->tile[tileno].maxmarknum = 100 + (int) ((float) cstr_info->tile[tileno].maxmarknum * 1.0F); - cstr_info->tile[tileno].marker = (opj_marker_info_t*)opj_realloc(cstr_info->tile[tileno].marker, cstr_info->maxmarknum); - } - - marker = &(cstr_info->tile[tileno].marker[cstr_info->tile[tileno].marknum]); - - /* add the marker */ - marker->type = type; - marker->pos = pos; - marker->len = len; - cstr_info->tile[tileno].marknum++; -} diff --git a/Source/LibOpenJPEG/j2k.h b/Source/LibOpenJPEG/j2k.h deleted file mode 100644 index 6338c29..0000000 --- a/Source/LibOpenJPEG/j2k.h +++ /dev/null @@ -1,446 +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. - */ -#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 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 */ -/* 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 */ - int ppt; - /** used in case of multiple marker PPT (number of info already stored) */ - int ppt_store; - /** ppmbug1 */ - int ppt_len; - /** add fixed_quality */ - float distoratio[100]; - /** tile-component coding parameters */ - opj_tccp_t *tccps; -} opj_tcp_t; - -/** -Coding parameters -*/ -typedef struct opj_cp { - /** Digital cinema profile*/ - OPJ_CINEMA_MODE cinema; - /** Maximum rate for each component. If == 0, component size limitation is not considered */ - int max_comp_size; - /** Size of the image in bits*/ - int img_size; - /** Rsiz*/ - OPJ_RSIZ_CAPABILITIES rsiz; - /** Enabling Tile part generation*/ - char tp_on; - /** Flag determining tile part generation*/ - char tp_flag; - /** Position of tile part flag in progression order*/ - int tp_pos; - /** allocation by rate/distortion */ - int disto_alloc; - /** allocation by fixed layer */ - int fixed_alloc; - /** add fixed_quality */ - int fixed_quality; - /** if != 0, then original dimension divided by 2^(reduce); if == 0 or not used, image is decoded to the full resolution */ - int reduce; - /** if != 0, then only the first "layer" layers are decoded; if == 0 or not used, all the quality layers are decoded */ - int layer; - /** if == NO_LIMITATION, decode entire codestream; if == LIMIT_TO_MAIN_HEADER then only decode the main header */ - OPJ_LIMIT_DECODING limit_decoding; - /** XTOsiz */ - int tx0; - /** YTOsiz */ - int ty0; - /** XTsiz */ - int tdx; - /** YTsiz */ - int tdy; - /** comment for coding */ - char *comment; - /** number of tiles in width */ - int tw; - /** number of tiles in heigth */ - int th; - /** ID number of the tiles present in the codestream */ - int *tileno; - /** size of the vector tileno */ - int tileno_size; - /** packet header store there for futur use in t2_decode_packet */ - unsigned char *ppm_data; - /** pointer remaining on the first byte of the first header if ppm is used */ - unsigned char *ppm_data_first; - /** if ppm == 1 --> there was a PPM marker for the present tile */ - int ppm; - /** use in case of multiple marker PPM (number of info already store) */ - int ppm_store; - /** use in case of multiple marker PPM (case on non-finished previous info) */ - int ppm_previous; - /** ppmbug1 */ - int ppm_len; - /** tile coding parameters */ - opj_tcp_t *tcps; - /** fixed layer */ - int *matrice; -/* 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 */ - int max_tiles; -#endif /* USE_JPWL */ -/* <cp. -@param j2k J2K decompressor handle -@param parameters decompression parameters -*/ -void j2k_setup_decoder(opj_j2k_t *j2k, opj_dparameters_t *parameters); -/** -Decode an image from a JPEG-2000 codestream -@param j2k J2K decompressor handle -@param cio Input buffer stream -@param cstr_info Codestream information structure if required, NULL otherwise -@return Returns a decoded image if successful, returns NULL otherwise -*/ -opj_image_t* j2k_decode(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info); -/** -Decode an image form a JPT-stream (JPEG 2000, JPIP) -@param j2k J2K decompressor handle -@param cio Input buffer stream -@param cstr_info Codestream information structure if required, NULL otherwise -@return Returns a decoded image if successful, returns NULL otherwise -*/ -opj_image_t* j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info); -/** -Creates a J2K compression structure -@param cinfo Codec context info -@return Returns a handle to a J2K compressor if successful, returns NULL otherwise -*/ -opj_j2k_t* j2k_create_compress(opj_common_ptr cinfo); -/** -Destroy a J2K compressor handle -@param j2k J2K compressor handle to destroy -*/ -void j2k_destroy_compress(opj_j2k_t *j2k); -/** -Setup the encoder parameters using the current image and using user parameters. -Coding parameters are returned in j2k->cp. -@param j2k J2K compressor handle -@param parameters compression parameters -@param image input filled image -*/ -void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_image_t *image); -/** -Converts an enum type progression order to string type -*/ -char *j2k_convert_progression_order(OPJ_PROG_ORDER prg_order); -/** -Encode an image into a JPEG-2000 codestream -@param j2k J2K compressor handle -@param cio Output buffer stream -@param image Image to encode -@param cstr_info Codestream information structure if required, NULL otherwise -@return Returns true if successful, returns false otherwise -*/ -opj_bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); - -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __J2K_H */ diff --git a/Source/LibOpenJPEG/j2k_lib.c b/Source/LibOpenJPEG/j2k_lib.c deleted file mode 100644 index a66e31e..0000000 --- a/Source/LibOpenJPEG/j2k_lib.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" - -double 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 /(double) freq.QuadPart ) ; -#else - /* Unix or Linux: use resource usage */ - struct rusage t; - double 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 = t.ru_utime.tv_sec + t.ru_stime.tv_sec; - /* (2b) More precisely! Get the microseconds part ! */ - return ( procTime + (t.ru_utime.tv_usec + t.ru_stime.tv_usec) * 1e-6 ) ; -#endif -} - diff --git a/Source/LibOpenJPEG/j2k_lib.h b/Source/LibOpenJPEG/j2k_lib.h deleted file mode 100644 index 5f3406e..0000000 --- a/Source/LibOpenJPEG/j2k_lib.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 __J2K_LIB_H -#define __J2K_LIB_H -/** -@file j2k_lib.h -@brief Internal functions - -The functions in J2K_LIB.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 -*/ -double opj_clock(void); - -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __J2K_LIB_H */ - diff --git a/Source/LibOpenJPEG/jp2.c b/Source/LibOpenJPEG/jp2.c deleted file mode 100644 index d43e70c..0000000 --- a/Source/LibOpenJPEG/jp2.c +++ /dev/null @@ -1,1223 +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 - * 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 */ -/*@{*/ - -/** @name Local static functions */ -/*@{*/ - -/** -Read box headers -@param cinfo Codec context info -@param cio Input stream -@param box -@return Returns true if successful, returns false otherwise -*/ -static opj_bool jp2_read_boxhdr(opj_common_ptr cinfo, opj_cio_t *cio, opj_jp2_box_t *box); -/*static void jp2_write_url(opj_cio_t *cio, char *Idx_file);*/ -/** -Read the IHDR box - Image Header box -@param jp2 JP2 handle -@param cio Input buffer stream -@return Returns true if successful, returns false otherwise -*/ -static opj_bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio); -static void jp2_write_ihdr(opj_jp2_t *jp2, opj_cio_t *cio); -static void jp2_write_bpcc(opj_jp2_t *jp2, opj_cio_t *cio); -static opj_bool jp2_read_bpcc(opj_jp2_t *jp2, opj_cio_t *cio); -static void jp2_write_colr(opj_jp2_t *jp2, opj_cio_t *cio); -/** -Write the FTYP box - File type box -@param jp2 JP2 handle -@param cio Output buffer stream -*/ -static void jp2_write_ftyp(opj_jp2_t *jp2, opj_cio_t *cio); -/** -Read the FTYP box - File type box -@param jp2 JP2 handle -@param cio Input buffer stream -@return Returns true if successful, returns false otherwise -*/ -static opj_bool jp2_read_ftyp(opj_jp2_t *jp2, opj_cio_t *cio); -static int jp2_write_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); -static opj_bool jp2_read_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, unsigned int *j2k_codestream_length, unsigned int *j2k_codestream_offset); -static void jp2_write_jp(opj_cio_t *cio); -/** -Read the JP box - JPEG 2000 signature -@param jp2 JP2 handle -@param cio Input buffer stream -@return Returns true if successful, returns false otherwise -*/ -static opj_bool jp2_read_jp(opj_jp2_t *jp2, opj_cio_t *cio); -/** -Decode the structure of a JP2 file -@param jp2 JP2 handle -@param cio Input buffer stream -@param color Collector for profile, cdef and pclr data -@return Returns true if successful, returns false otherwise -*/ -static opj_bool jp2_read_struct(opj_jp2_t *jp2, opj_cio_t *cio, - opj_jp2_color_t *color); -/** -Apply collected palette data -@param color Collector for profile, cdef and pclr data -@param image -*/ -static void jp2_apply_pclr(opj_jp2_color_t *color, opj_image_t *image, opj_common_ptr cinfo); -/** -Collect palette data -@param jp2 JP2 handle -@param cio Input buffer stream -@param box -@param color Collector for profile, cdef and pclr data -@return Returns true if successful, returns false otherwise -*/ -static opj_bool jp2_read_pclr(opj_jp2_t *jp2, opj_cio_t *cio, - opj_jp2_box_t *box, opj_jp2_color_t *color); -/** -Collect component mapping data -@param jp2 JP2 handle -@param cio Input buffer stream -@param box -@param color Collector for profile, cdef and pclr data -@return Returns true if successful, returns false otherwise -*/ -static opj_bool jp2_read_cmap(opj_jp2_t *jp2, opj_cio_t *cio, - opj_jp2_box_t *box, opj_jp2_color_t *color); -/** -Collect colour specification data -@param jp2 JP2 handle -@param cio Input buffer stream -@param box -@param color Collector for profile, cdef and pclr data -@return Returns true if successful, returns false otherwise -*/ -static opj_bool jp2_read_colr(opj_jp2_t *jp2, opj_cio_t *cio, - opj_jp2_box_t *box, opj_jp2_color_t *color); -/** -Write file Index (superbox) -@param[in] offset_jp2c offset of jp2c box -@param[in] length_jp2c length of jp2c box -@param[in] offset_idx offset of cidx box -@param[in] length_idx length of cidx box -@param[in] cio file output handle -@return length of fidx box -*/ -static int write_fidx( int offset_jp2c, int length_jp2c, int offset_idx, int length_idx, opj_cio_t *cio); -/** -Write index Finder box -@param[in] offset offset of fidx box -@param[in] length length of fidx box -@param[in] cio file output handle -*/ -static void write_iptr( int offset, int length, opj_cio_t *cio); -/** -Write proxy box -@param[in] offset_jp2c offset of jp2c box -@param[in] length_jp2c length of jp2c box -@param[in] offset_idx offset of cidx box -@param[in] length_idx length of cidx box -@param[in] cio file output handle -*/ -static void write_prxy( int offset_jp2c, int length_jp2c, int offset_idx, int length_idx, opj_cio_t *cio); -/*@}*/ - -/*@}*/ - -/* ----------------------------------------------------------------------- */ - -static opj_bool jp2_read_boxhdr(opj_common_ptr cinfo, opj_cio_t *cio, opj_jp2_box_t *box) { - box->init_pos = cio_tell(cio); - box->length = cio_read(cio, 4); - box->type = cio_read(cio, 4); - if (box->length == 1) { - if (cio_read(cio, 4) != 0) { - opj_event_msg(cinfo, EVT_ERROR, "Cannot handle box sizes higher than 2^32\n"); - return OPJ_FALSE; - } - box->length = cio_read(cio, 4); - if (box->length == 0) - box->length = cio_numbytesleft(cio) + 12; - } - else if (box->length == 0) { - box->length = cio_numbytesleft(cio) + 8; - } - - return OPJ_TRUE; -} - -#if 0 -static void jp2_write_url(opj_cio_t *cio, char *Idx_file) { - unsigned int 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 - -static opj_bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio) { - opj_jp2_box_t box; - - opj_common_ptr cinfo = jp2->cinfo; - - if(jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) { - opj_event_msg(cinfo, EVT_ERROR, "Failed to read boxhdr\n"); - return OPJ_FALSE; - } - if (JP2_IHDR != box.type) { - opj_event_msg(cinfo, EVT_ERROR, "Expected IHDR Marker\n"); - return OPJ_FALSE; - } - - jp2->h = cio_read(cio, 4); /* HEIGHT */ - jp2->w = cio_read(cio, 4); /* WIDTH */ - jp2->numcomps = cio_read(cio, 2); /* NC */ - jp2->comps = (opj_jp2_comps_t*) opj_malloc(jp2->numcomps * sizeof(opj_jp2_comps_t)); - - jp2->bpc = cio_read(cio, 1); /* BPC */ - - jp2->C = cio_read(cio, 1); /* C */ - jp2->UnkC = cio_read(cio, 1); /* UnkC */ - jp2->IPR = cio_read(cio, 1); /* IPR */ - - if (cio_tell(cio) - box.init_pos != box.length) { - opj_event_msg(cinfo, EVT_ERROR, "Error with IHDR Box\n"); - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -static void jp2_write_ihdr(opj_jp2_t *jp2, opj_cio_t *cio) { - opj_jp2_box_t box; - - box.init_pos = cio_tell(cio); - cio_skip(cio, 4); - cio_write(cio, JP2_IHDR, 4); /* IHDR */ - - cio_write(cio, jp2->h, 4); /* HEIGHT */ - cio_write(cio, jp2->w, 4); /* WIDTH */ - cio_write(cio, jp2->numcomps, 2); /* NC */ - - cio_write(cio, jp2->bpc, 1); /* BPC */ - - cio_write(cio, jp2->C, 1); /* C : Always 7 */ - cio_write(cio, jp2->UnkC, 1); /* UnkC, colorspace unknown */ - cio_write(cio, jp2->IPR, 1); /* IPR, no intellectual property */ - - 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); -} - -static void jp2_write_bpcc(opj_jp2_t *jp2, opj_cio_t *cio) { - unsigned int i; - opj_jp2_box_t box; - - box.init_pos = cio_tell(cio); - cio_skip(cio, 4); - cio_write(cio, JP2_BPCC, 4); /* BPCC */ - - for (i = 0; i < jp2->numcomps; i++) { - cio_write(cio, jp2->comps[i].bpcc, 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); -} - - -static opj_bool jp2_read_bpcc(opj_jp2_t *jp2, opj_cio_t *cio) { - unsigned int i; - opj_jp2_box_t box; - - opj_common_ptr cinfo = jp2->cinfo; - - if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) { - opj_event_msg(cinfo, EVT_ERROR, "Failed to read boxhdr\n"); - return OPJ_FALSE; - } - if (JP2_BPCC != box.type) { - opj_event_msg(cinfo, EVT_ERROR, "Expected BPCC Marker\n"); - return OPJ_FALSE; - } - - for (i = 0; i < jp2->numcomps; i++) { - jp2->comps[i].bpcc = cio_read(cio, 1); - } - - if (cio_tell(cio) - box.init_pos != box.length) { - opj_event_msg(cinfo, EVT_ERROR, "Error with BPCC Box\n"); - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -static void jp2_write_colr(opj_jp2_t *jp2, opj_cio_t *cio) { - opj_jp2_box_t box; - - box.init_pos = cio_tell(cio); - cio_skip(cio, 4); - cio_write(cio, JP2_COLR, 4); /* COLR */ - - cio_write(cio, jp2->meth, 1); /* METH */ - cio_write(cio, jp2->precedence, 1); /* PRECEDENCE */ - cio_write(cio, jp2->approx, 1); /* APPROX */ - - if(jp2->meth == 2) - jp2->enumcs = 0; - - cio_write(cio, jp2->enumcs, 4); /* EnumCS */ - - 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); -} - -static void 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 void free_color_data(opj_jp2_color_t *color) -{ - if(color->jp2_pclr) - { - jp2_free_pclr(color); - } - if(color->jp2_cdef) - { - if(color->jp2_cdef->info) opj_free(color->jp2_cdef->info); - opj_free(color->jp2_cdef); - } - if(color->icc_profile_buf) opj_free(color->icc_profile_buf); -} - -static void jp2_apply_pclr(opj_jp2_color_t *color, opj_image_t *image, opj_common_ptr cinfo) -{ - opj_image_comp_t *old_comps, *new_comps; - unsigned char *channel_size, *channel_sign; - unsigned int *entries; - opj_jp2_cmap_comp_t *cmap; - int *src, *dst; - unsigned int j, max; - unsigned short i, nr_channels, cmp, pcol; - int 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; - - if( pcol < nr_channels ) - new_comps[pcol] = old_comps[cmp]; - else - { - opj_event_msg(cinfo, EVT_ERROR, "Error with pcol value %d (max: %d). skipping\n", pcol, nr_channels); - continue; - } - - if(cmap[i].mtyp == 0) /* Direct use */ - { - old_comps[cmp].data = NULL; continue; - } -/* Palette mapping: */ - new_comps[pcol].data = (int*) - opj_malloc(old_comps[cmp].w * old_comps[cmp].h * sizeof(int)); - new_comps[pcol].prec = channel_size[i]; - new_comps[pcol].sgnd = channel_sign[i]; - } - top_k = color->jp2_pclr->nr_entries - 1; - - for(i = 0; i < nr_channels; ++i) - { -/* Direct use: */ - if(cmap[i].mtyp == 0) continue; - -/* Palette mapping: */ - cmp = cmap[i].cmp; pcol = cmap[i].pcol; - src = old_comps[cmp].data; - dst = new_comps[pcol].data; - max = new_comps[pcol].w * new_comps[pcol].h; - - 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] = 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; - - jp2_free_pclr(color); - -}/* apply_pclr() */ - -static opj_bool jp2_read_pclr(opj_jp2_t *jp2, opj_cio_t *cio, - opj_jp2_box_t *box, opj_jp2_color_t *color) -{ - opj_jp2_pclr_t *jp2_pclr; - unsigned char *channel_size, *channel_sign; - unsigned int *entries; - unsigned short nr_entries, nr_channels; - unsigned short i, j; - unsigned char uc; - - OPJ_ARG_NOT_USED(box); - OPJ_ARG_NOT_USED(jp2); - -/* Part 1, I.5.3.4: 'There shall be at most one Palette box inside - * a JP2 Header box' : -*/ - if(color->jp2_pclr) return OPJ_FALSE; - - nr_entries = (unsigned short)cio_read(cio, 2); /* NE */ - nr_channels = (unsigned short)cio_read(cio, 1);/* NPC */ - - entries = (unsigned int*) - opj_malloc(nr_channels * nr_entries * sizeof(unsigned int)); - channel_size = (unsigned char*)opj_malloc(nr_channels); - channel_sign = (unsigned char*)opj_malloc(nr_channels); - - jp2_pclr = (opj_jp2_pclr_t*)opj_malloc(sizeof(opj_jp2_pclr_t)); - 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 = nr_channels; - jp2_pclr->cmap = NULL; - - color->jp2_pclr = jp2_pclr; - - for(i = 0; i < nr_channels; ++i) - { - uc = cio_read(cio, 1); /* Bi */ - channel_size[i] = (uc & 0x7f) + 1; - channel_sign[i] = (uc & 0x80)?1:0; - } - - for(j = 0; j < nr_entries; ++j) - { - for(i = 0; i < nr_channels; ++i) - { -/* Cji */ - *entries++ = cio_read(cio, (channel_size[i]+7)>>3); - } - } - - return OPJ_TRUE; -}/* jp2_read_pclr() */ - -static opj_bool jp2_read_cmap(opj_jp2_t *jp2, opj_cio_t *cio, - opj_jp2_box_t *box, opj_jp2_color_t *color) -{ - opj_jp2_cmap_comp_t *cmap; - unsigned short i, nr_channels; - - OPJ_ARG_NOT_USED(box); - OPJ_ARG_NOT_USED(jp2); - -/* Need nr_channels: */ - if(color->jp2_pclr == NULL) return OPJ_FALSE; - -/* Part 1, I.5.3.5: 'There shall be at most one Component Mapping box - * inside a JP2 Header box' : -*/ - if(color->jp2_pclr->cmap) return OPJ_FALSE; - - nr_channels = color->jp2_pclr->nr_channels; - cmap = (opj_jp2_cmap_comp_t*) - opj_malloc(nr_channels * sizeof(opj_jp2_cmap_comp_t)); - - for(i = 0; i < nr_channels; ++i) - { - cmap[i].cmp = (unsigned short)cio_read(cio, 2); - cmap[i].mtyp = cio_read(cio, 1); - cmap[i].pcol = cio_read(cio, 1); - - } - color->jp2_pclr->cmap = cmap; - - return OPJ_TRUE; -}/* jp2_read_cmap() */ - -static void jp2_apply_cdef(opj_image_t *image, opj_jp2_color_t *color) -{ - opj_jp2_cdef_info_t *info; - int color_space; - unsigned short i, n, cn, typ, asoc, acn; - - color_space = image->color_space; - info = color->jp2_cdef->info; - n = color->jp2_cdef->n; - - for(i = 0; i < n; ++i) - { -/* WATCH: acn = asoc - 1 ! */ - if((asoc = info[i].asoc) == 0) continue; - - cn = info[i].cn; typ = info[i].typ; acn = asoc - 1; - - 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 = cn + 1; - info[acn].asoc = info[acn].cn + 1; - } - } - if(color->jp2_cdef->info) opj_free(color->jp2_cdef->info); - - opj_free(color->jp2_cdef); color->jp2_cdef = NULL; - -}/* jp2_apply_cdef() */ - -static opj_bool jp2_read_cdef(opj_jp2_t *jp2, opj_cio_t *cio, - opj_jp2_box_t *box, opj_jp2_color_t *color) -{ - opj_jp2_cdef_info_t *info; - unsigned short i, n; - - OPJ_ARG_NOT_USED(box); - OPJ_ARG_NOT_USED(jp2); - -/* Part 1, I.5.3.6: 'The shall be at most one Channel Definition box - * inside a JP2 Header box.' -*/ - if(color->jp2_cdef) return OPJ_FALSE; - - if((n = (unsigned short)cio_read(cio, 2)) == 0) return OPJ_FALSE; /* szukw000: FIXME */ - - info = (opj_jp2_cdef_info_t*) - opj_malloc(n * sizeof(opj_jp2_cdef_info_t)); - - color->jp2_cdef = (opj_jp2_cdef_t*)opj_malloc(sizeof(opj_jp2_cdef_t)); - color->jp2_cdef->info = info; - color->jp2_cdef->n = n; - - for(i = 0; i < n; ++i) - { - info[i].cn = (unsigned short)cio_read(cio, 2); - info[i].typ = (unsigned short)cio_read(cio, 2); - info[i].asoc = (unsigned short)cio_read(cio, 2); - - } - return OPJ_TRUE; -}/* jp2_read_cdef() */ - -static opj_bool jp2_read_colr(opj_jp2_t *jp2, opj_cio_t *cio, - opj_jp2_box_t *box, opj_jp2_color_t *color) -{ - int skip_len; - opj_common_ptr cinfo; - -/* Part 1, I.5.3.3 : 'A conforming JP2 reader shall ignore all Colour - * Specification boxes after the first.' -*/ - if(color->jp2_has_colr) return OPJ_FALSE; - - cinfo = jp2->cinfo; - - jp2->meth = cio_read(cio, 1); /* METH */ - jp2->precedence = cio_read(cio, 1); /* PRECEDENCE */ - jp2->approx = cio_read(cio, 1); /* APPROX */ - - if (jp2->meth == 1) - { - jp2->enumcs = cio_read(cio, 4); /* EnumCS */ - } - else - if (jp2->meth == 2) - { -/* skip PROFILE */ - skip_len = box->init_pos + box->length - cio_tell(cio); - if (skip_len < 0) - { - opj_event_msg(cinfo, EVT_ERROR, "Error with COLR box size\n"); - return OPJ_FALSE; - } - if(skip_len > 0) - { - unsigned char *start; - - start = cio_getbp(cio); - color->icc_profile_buf = (unsigned char*)opj_malloc(skip_len); - color->icc_profile_len = skip_len; - - cio_skip(cio, box->init_pos + box->length - cio_tell(cio)); - - memcpy(color->icc_profile_buf, start, skip_len); - } - } - - if (cio_tell(cio) - box->init_pos != box->length) - { - opj_event_msg(cinfo, EVT_ERROR, "Error with COLR Box\n"); - return OPJ_FALSE; - } - color->jp2_has_colr = 1; - - return OPJ_TRUE; -}/* jp2_read_colr() */ - -opj_bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio, opj_jp2_color_t *color) -{ - opj_jp2_box_t box; - int jp2h_end; - - opj_common_ptr cinfo = jp2->cinfo; - - if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) return OPJ_FALSE; - do { - if (JP2_JP2H != box.type) - { - if (box.type == JP2_JP2C) - { - opj_event_msg(cinfo, EVT_ERROR, "Expected JP2H Marker\n"); - return OPJ_FALSE; - } - cio_skip(cio, box.length - 8); - - if(cio->bp >= cio->end) return OPJ_FALSE; - - if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) return OPJ_FALSE; - } - } while(JP2_JP2H != box.type); - - if (!jp2_read_ihdr(jp2, cio)) - return OPJ_FALSE; - jp2h_end = box.init_pos + box.length; - - if (jp2->bpc == 255) - { - if (!jp2_read_bpcc(jp2, cio)) - return OPJ_FALSE; - } - if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) return OPJ_FALSE; - - while(cio_tell(cio) < jp2h_end) - { - if(box.type == JP2_COLR) - { - if( !jp2_read_colr(jp2, cio, &box, color)) - { - cio_seek(cio, box.init_pos + 8); - cio_skip(cio, box.length - 8); - } - if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) return OPJ_FALSE; - continue; - } - if(box.type == JP2_CDEF && !jp2->ignore_pclr_cmap_cdef) - { - if( !jp2_read_cdef(jp2, cio, &box, color)) - { - cio_seek(cio, box.init_pos + 8); - cio_skip(cio, box.length - 8); - } - if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) return OPJ_FALSE; - continue; - } - if(box.type == JP2_PCLR && !jp2->ignore_pclr_cmap_cdef) - { - if( !jp2_read_pclr(jp2, cio, &box, color)) - { - cio_seek(cio, box.init_pos + 8); - cio_skip(cio, box.length - 8); - } - if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) return OPJ_FALSE; - continue; - } - if(box.type == JP2_CMAP && !jp2->ignore_pclr_cmap_cdef) - { - if( !jp2_read_cmap(jp2, cio, &box, color)) - { - cio_seek(cio, box.init_pos + 8); - cio_skip(cio, box.length - 8); - } - if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) return OPJ_FALSE; - continue; - } - cio_seek(cio, box.init_pos + 8); - cio_skip(cio, box.length - 8); - if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) return OPJ_FALSE; - - }/* while(cio_tell(cio) < box_end) */ - - cio_seek(cio, jp2h_end); - - /* Part 1, I.5.3.3 : 'must contain at least one' */ - return (color->jp2_has_colr == 1); - -}/* jp2_read_jp2h() */ - -opj_image_t* opj_jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, - opj_codestream_info_t *cstr_info) -{ - opj_common_ptr cinfo; - opj_image_t *image = NULL; - opj_jp2_color_t color; - - if(!jp2 || !cio) - { - return NULL; - } - memset(&color, 0, sizeof(opj_jp2_color_t)); - cinfo = jp2->cinfo; - -/* JP2 decoding */ - if(!jp2_read_struct(jp2, cio, &color)) - { - free_color_data(&color); - opj_event_msg(cinfo, EVT_ERROR, "Failed to decode jp2 structure\n"); - return NULL; - } - -/* J2K decoding */ - image = j2k_decode(jp2->j2k, cio, cstr_info); - - if(!image) - { - free_color_data(&color); - opj_event_msg(cinfo, EVT_ERROR, "Failed to decode J2K image\n"); - return NULL; - } - - if (!jp2->ignore_pclr_cmap_cdef){ - - /* Set Image Color Space */ - if (jp2->enumcs == 16) - image->color_space = CLRSPC_SRGB; - else if (jp2->enumcs == 17) - image->color_space = CLRSPC_GRAY; - else if (jp2->enumcs == 18) - image->color_space = CLRSPC_SYCC; - else - image->color_space = CLRSPC_UNKNOWN; - - if(color.jp2_cdef) - { - jp2_apply_cdef(image, &color); - } - if(color.jp2_pclr) - { -/* Part 1, I.5.3.4: Either both or none : */ - if( !color.jp2_pclr->cmap) - jp2_free_pclr(&color); - else - jp2_apply_pclr(&color, image, cinfo); - } - if(color.icc_profile_buf) - { - image->icc_profile_buf = color.icc_profile_buf; - color.icc_profile_buf = NULL; - image->icc_profile_len = color.icc_profile_len; - } - } - - return image; - -}/* opj_jp2_decode() */ - - -void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio) { - opj_jp2_box_t box; - - box.init_pos = cio_tell(cio); - cio_skip(cio, 4); - cio_write(cio, JP2_JP2H, 4); /* JP2H */ - - jp2_write_ihdr(jp2, cio); - - if (jp2->bpc == 255) { - jp2_write_bpcc(jp2, cio); - } - jp2_write_colr(jp2, cio); - - 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); -} - -static void jp2_write_ftyp(opj_jp2_t *jp2, opj_cio_t *cio) { - unsigned int i; - opj_jp2_box_t box; - - box.init_pos = cio_tell(cio); - cio_skip(cio, 4); - cio_write(cio, JP2_FTYP, 4); /* FTYP */ - - cio_write(cio, jp2->brand, 4); /* BR */ - cio_write(cio, jp2->minversion, 4); /* MinV */ - - for (i = 0; i < jp2->numcl; i++) { - cio_write(cio, jp2->cl[i], 4); /* CL */ - } - - 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); -} - -static opj_bool jp2_read_ftyp(opj_jp2_t *jp2, opj_cio_t *cio) { - int i; - opj_jp2_box_t box; - - opj_common_ptr cinfo = jp2->cinfo; - - if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) { - opj_event_msg(cinfo, EVT_ERROR, "Failed to read boxhdr\n"); - return OPJ_FALSE; - } - if (JP2_FTYP != box.type) { - opj_event_msg(cinfo, EVT_ERROR, "Expected FTYP Marker\n"); - return OPJ_FALSE; - } - - jp2->brand = cio_read(cio, 4); /* BR */ - jp2->minversion = cio_read(cio, 4); /* MinV */ - jp2->numcl = (box.length - 16) / 4; - jp2->cl = (unsigned int *) opj_malloc(jp2->numcl * sizeof(unsigned int)); - - for (i = 0; i < (int)jp2->numcl; i++) { - jp2->cl[i] = cio_read(cio, 4); /* CLi */ - } - - if (cio_tell(cio) - box.init_pos != box.length) { - opj_event_msg(cinfo, EVT_ERROR, "Error with FTYP Box\n"); - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -static int jp2_write_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info) { - unsigned int j2k_codestream_offset, j2k_codestream_length; - opj_jp2_box_t box; - - opj_j2k_t *j2k = jp2->j2k; - - box.init_pos = cio_tell(cio); - cio_skip(cio, 4); - cio_write(cio, JP2_JP2C, 4); /* JP2C */ - - /* J2K encoding */ - j2k_codestream_offset = cio_tell(cio); - if(!j2k_encode(j2k, cio, image, cstr_info)) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "Failed to encode image\n"); - return 0; - } - j2k_codestream_length = cio_tell(cio) - j2k_codestream_offset; - - jp2->j2k_codestream_offset = j2k_codestream_offset; - jp2->j2k_codestream_length = j2k_codestream_length; - - box.length = 8 + jp2->j2k_codestream_length; - cio_seek(cio, box.init_pos); - cio_write(cio, box.length, 4); /* L */ - cio_seek(cio, box.init_pos + box.length); - - return box.length; -} - -static opj_bool jp2_read_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, unsigned int *j2k_codestream_length, unsigned int *j2k_codestream_offset) { - opj_jp2_box_t box; - - opj_common_ptr cinfo = jp2->cinfo; - - if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) { - opj_event_msg(cinfo, EVT_ERROR, "Failed to read boxhdr\n"); - return OPJ_FALSE; - } - do { - if(JP2_JP2C != box.type) { - cio_skip(cio, box.length - 8); - if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) return OPJ_FALSE; - } - } while(JP2_JP2C != box.type); - - *j2k_codestream_offset = cio_tell(cio); - *j2k_codestream_length = box.length - 8; - - return OPJ_TRUE; -} - -static void jp2_write_jp(opj_cio_t *cio) { - opj_jp2_box_t box; - - box.init_pos = cio_tell(cio); - cio_skip(cio, 4); - cio_write(cio, JP2_JP, 4); /* JP2 signature */ - cio_write(cio, 0x0d0a870a, 4); - - 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); -} - -static opj_bool jp2_read_jp(opj_jp2_t *jp2, opj_cio_t *cio) { - opj_jp2_box_t box; - - opj_common_ptr cinfo = jp2->cinfo; - - if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) { - opj_event_msg(cinfo, EVT_ERROR, "Failed to read boxhdr\n"); - return OPJ_FALSE; - } - if (JP2_JP != box.type) { - opj_event_msg(cinfo, EVT_ERROR, "Expected JP Marker\n"); - return OPJ_FALSE; - } - if (0x0d0a870a != cio_read(cio, 4)) { - opj_event_msg(cinfo, EVT_ERROR, "Error with JP Marker\n"); - return OPJ_FALSE; - } - if (cio_tell(cio) - box.init_pos != box.length) { - opj_event_msg(cinfo, EVT_ERROR, "Error with JP Box size\n"); - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - - -static opj_bool jp2_read_struct(opj_jp2_t *jp2, opj_cio_t *cio, - opj_jp2_color_t *color) { - if (!jp2_read_jp(jp2, cio)) - return OPJ_FALSE; - if (!jp2_read_ftyp(jp2, cio)) - return OPJ_FALSE; - if (!jp2_read_jp2h(jp2, cio, color)) - return OPJ_FALSE; - if (!jp2_read_jp2c(jp2, cio, &jp2->j2k_codestream_length, &jp2->j2k_codestream_offset)) - return OPJ_FALSE; - - return OPJ_TRUE; -} - - -static int write_fidx( int offset_jp2c, int length_jp2c, int offset_idx, int length_idx, opj_cio_t *cio) -{ - int len, lenp; - - lenp = cio_tell( cio); - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_FIDX, 4); /* IPTR */ - - write_prxy( offset_jp2c, length_jp2c, offset_idx, length_idx, cio); - - len = cio_tell( cio)-lenp; - cio_seek( cio, lenp); - cio_write( cio, len, 4); /* L */ - cio_seek( cio, lenp+len); - - return len; -} - -static void write_prxy( int offset_jp2c, int length_jp2c, int offset_idx, int length_idx, opj_cio_t *cio) -{ - int len, lenp; - - lenp = cio_tell( cio); - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_PRXY, 4); /* IPTR */ - - cio_write( cio, offset_jp2c, 8); /* OOFF */ - cio_write( cio, length_jp2c, 4); /* OBH part 1 */ - cio_write( cio, JP2_JP2C, 4); /* OBH part 2 */ - - cio_write( cio, 1,1); /* NI */ - - cio_write( cio, offset_idx, 8); /* IOFF */ - cio_write( cio, length_idx, 4); /* IBH part 1 */ - cio_write( cio, JPIP_CIDX, 4); /* IBH part 2 */ - - len = cio_tell( cio)-lenp; - cio_seek( cio, lenp); - cio_write( cio, len, 4); /* L */ - cio_seek( cio, lenp+len); -} - -static void write_iptr( int offset, int length, opj_cio_t *cio) -{ - int len, lenp; - - lenp = cio_tell( cio); - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_IPTR, 4); /* IPTR */ - - cio_write( cio, offset, 8); - cio_write( cio, length, 8); - - len = cio_tell( cio)-lenp; - cio_seek( cio, lenp); - cio_write( cio, len, 4); /* L */ - cio_seek( cio, lenp+len); -} - - -/* ----------------------------------------------------------------------- */ -/* JP2 decoder interface */ -/* ----------------------------------------------------------------------- */ - -opj_jp2_t* jp2_create_decompress(opj_common_ptr cinfo) { - opj_jp2_t *jp2 = (opj_jp2_t*) opj_calloc(1, sizeof(opj_jp2_t)); - if(jp2) { - jp2->cinfo = cinfo; - /* create the J2K codec */ - jp2->j2k = j2k_create_decompress(cinfo); - if(jp2->j2k == NULL) { - jp2_destroy_decompress(jp2); - return NULL; - } - } - return jp2; -} - -void jp2_destroy_decompress(opj_jp2_t *jp2) { - if(jp2) { - /* destroy the J2K codec */ - j2k_destroy_decompress(jp2->j2k); - - if(jp2->comps) { - opj_free(jp2->comps); - } - if(jp2->cl) { - opj_free(jp2->cl); - } - opj_free(jp2); - } -} - -void jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters) { - /* setup the J2K codec */ - j2k_setup_decoder(jp2->j2k, parameters); - /* further JP2 initializations go here */ - jp2->ignore_pclr_cmap_cdef = parameters->flags & OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG; -} - -/* ----------------------------------------------------------------------- */ -/* JP2 encoder interface */ -/* ----------------------------------------------------------------------- */ - -opj_jp2_t* jp2_create_compress(opj_common_ptr cinfo) { - opj_jp2_t *jp2 = (opj_jp2_t*)opj_malloc(sizeof(opj_jp2_t)); - if(jp2) { - jp2->cinfo = cinfo; - /* create the J2K codec */ - jp2->j2k = j2k_create_compress(cinfo); - if(jp2->j2k == NULL) { - jp2_destroy_compress(jp2); - return NULL; - } - } - return jp2; -} - -void jp2_destroy_compress(opj_jp2_t *jp2) { - if(jp2) { - /* destroy the J2K codec */ - j2k_destroy_compress(jp2->j2k); - - if(jp2->comps) { - opj_free(jp2->comps); - } - if(jp2->cl) { - opj_free(jp2->cl); - } - opj_free(jp2); - } -} - -void jp2_setup_encoder(opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_t *image) { - int i; - int depth_0, 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(jp2->cinfo, EVT_ERROR, "Invalid number of components specified while setting up JP2 encoder\n"); - return; - } - - j2k_setup_encoder(jp2->j2k, parameters, image); - - /* setup the JP2 codec */ - /* ------------------- */ - - /* Profile box */ - - jp2->brand = JP2_JP2; /* BR */ - jp2->minversion = 0; /* MinV */ - jp2->numcl = 1; - jp2->cl = (unsigned int*) opj_malloc(jp2->numcl * sizeof(unsigned int)); - 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)); - 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++) { - int 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); - } - 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_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info) { - - int pos_iptr, pos_cidx, pos_jp2c, len_jp2c, len_cidx, end_pos, pos_fidx, len_fidx; - pos_jp2c = pos_iptr = -1; /* remove a warning */ - - /* JP2 encoding */ - - /* JPEG 2000 Signature box */ - jp2_write_jp(cio); - /* File Type box */ - jp2_write_ftyp(jp2, cio); - /* JP2 Header box */ - jp2_write_jp2h(jp2, cio); - - if( jp2->jpip_on){ - pos_iptr = cio_tell( cio); - cio_skip( cio, 24); /* IPTR further ! */ - - pos_jp2c = cio_tell( cio); - } - - /* J2K encoding */ - if(!(len_jp2c = jp2_write_jp2c( jp2, cio, image, cstr_info))){ - opj_event_msg(jp2->cinfo, EVT_ERROR, "Failed to encode image\n"); - return OPJ_FALSE; - } - - if( jp2->jpip_on){ - pos_cidx = cio_tell( cio); - - len_cidx = write_cidx( pos_jp2c+8, cio, image, *cstr_info, len_jp2c-8); - - pos_fidx = cio_tell( cio); - len_fidx = write_fidx( pos_jp2c, len_jp2c, pos_cidx, len_cidx, cio); - - end_pos = cio_tell( cio); - - cio_seek( cio, pos_iptr); - write_iptr( pos_fidx, len_fidx, cio); - - cio_seek( cio, end_pos); - } - - return OPJ_TRUE; -} diff --git a/Source/LibOpenJPEG/jp2.h b/Source/LibOpenJPEG/jp2.h deleted file mode 100644 index acb643c..0000000 --- a/Source/LibOpenJPEG/jp2.h +++ /dev/null @@ -1,234 +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 - * 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 */ -#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 /**< URL box */ -#define JP2_DTBL 0x6474626c /**< Data Reference box */ -#define JP2_BPCC 0x62706363 /**< Bits per component box */ -#define JP2_JP2 0x6a703220 /**< File type fields */ -#define JP2_PCLR 0x70636c72 /**< Palette box */ -#define JP2_CMAP 0x636d6170 /**< Component Mapping box */ -#define JP2_CDEF 0x63646566 /**< Channel Definition box */ - -/* ----------------------------------------------------------------------- */ -/** -Channel description: channel index, type, assocation -*/ -typedef struct opj_jp2_cdef_info -{ - unsigned short 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; - unsigned short n; -} opj_jp2_cdef_t; - -/** -Component mappings: channel index, mapping type, palette index -*/ -typedef struct opj_jp2_cmap_comp -{ - unsigned short cmp; - unsigned char mtyp, pcol; -} opj_jp2_cmap_comp_t; - -/** -Palette data: table entries, palette columns -*/ -typedef struct opj_jp2_pclr -{ - unsigned int *entries; - unsigned char *channel_sign; - unsigned char *channel_size; - opj_jp2_cmap_comp_t *cmap; - unsigned short nr_entries, nr_channels; -} opj_jp2_pclr_t; - -/** -Collector for ICC profile, palette, component mapping, channel description -*/ -typedef struct opj_jp2_color -{ - unsigned char *icc_profile_buf; - int icc_profile_len; - - opj_jp2_cdef_t *jp2_cdef; - opj_jp2_pclr_t *jp2_pclr; - unsigned char jp2_has_colr; -} opj_jp2_color_t; - -/** -JP2 component -*/ -typedef struct opj_jp2_comps { - int depth; - int sgnd; - int bpcc; -} opj_jp2_comps_t; - -/** -JPEG-2000 file format reader/writer -*/ -typedef struct opj_jp2 { - /** codec context */ - opj_common_ptr cinfo; - /** handle to the J2K codec */ - opj_j2k_t *j2k; - unsigned int w; - unsigned int h; - unsigned int numcomps; - unsigned int bpc; - unsigned int C; - unsigned int UnkC; - unsigned int IPR; - unsigned int meth; - unsigned int approx; - unsigned int enumcs; - unsigned int precedence; - unsigned int brand; - unsigned int minversion; - unsigned int numcl; - unsigned int *cl; - opj_jp2_comps_t *comps; - unsigned int j2k_codestream_offset; - unsigned int j2k_codestream_length; - opj_bool jpip_on; - opj_bool ignore_pclr_cmap_cdef; -} opj_jp2_t; - -/** -JP2 Box -*/ -typedef struct opj_jp2_box { - int length; - int type; - int init_pos; -} opj_jp2_box_t; - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** -Write the JP2H box - JP2 Header box (used in MJ2) -@param jp2 JP2 handle -@param cio Output buffer stream -*/ -void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio); -/** -Read the JP2H box - JP2 Header box (used in MJ2) -@param jp2 JP2 handle -@param cio Input buffer stream -@param ext Collector for profile, cdef and pclr data -@return Returns true if successful, returns false otherwise -*/ -opj_bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio, opj_jp2_color_t *color); -/** -Creates a JP2 decompression structure -@param cinfo Codec context info -@return Returns a handle to a JP2 decompressor if successful, returns NULL otherwise -*/ -opj_jp2_t* jp2_create_decompress(opj_common_ptr cinfo); -/** -Destroy a JP2 decompressor handle -@param jp2 JP2 decompressor handle to destroy -*/ -void jp2_destroy_decompress(opj_jp2_t *jp2); -/** -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 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 cio Input buffer stream -@param cstr_info Codestream information structure if required, NULL otherwise -@return Returns a decoded image if successful, returns NULL otherwise -*/ -opj_image_t* opj_jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, opj_codestream_info_t *cstr_info); -/** -Creates a JP2 compression structure -@param cinfo Codec context info -@return Returns a handle to a JP2 compressor if successful, returns NULL otherwise -*/ -opj_jp2_t* jp2_create_compress(opj_common_ptr cinfo); -/** -Destroy a JP2 compressor handle -@param jp2 JP2 compressor handle to destroy -*/ -void jp2_destroy_compress(opj_jp2_t *jp2); -/** -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 -*/ -void jp2_setup_encoder(opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_t *image); -/** -Encode an image into a JPEG-2000 file stream -@param jp2 JP2 compressor handle -@param cio Output buffer stream -@param image Image to encode -@param cstr_info Codestream information structure if required, NULL otherwise -@return Returns true if successful, returns false otherwise -*/ -opj_bool opj_jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); - -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __JP2_H */ - diff --git a/Source/LibOpenJPEG/jpt.c b/Source/LibOpenJPEG/jpt.c deleted file mode 100644 index a2566ea..0000000 --- a/Source/LibOpenJPEG/jpt.c +++ /dev/null @@ -1,155 +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 - * 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" - -/* - * Read the information contains in VBAS [JPP/JPT stream message header] - * Store information (7 bits) in value - * - */ -unsigned int jpt_read_VBAS_info(opj_cio_t *cio, unsigned int value) { - unsigned char elmt; - - elmt = cio_read(cio, 1); - while ((elmt >> 7) == 1) { - value = (value << 7); - value |= (elmt & 0x7f); - elmt = cio_read(cio, 1); - } - value = (value << 7); - value |= (elmt & 0x7f); - - return value; -} - -/* - * Initialize the value of the message header structure - * - */ -void jpt_init_msg_header(opj_jpt_msg_header_t * header) { - header->Id = 0; /* In-class Identifier */ - header->last_byte = 0; /* Last byte information */ - header->Class_Id = 0; /* Class Identifier */ - header->CSn_Id = 0; /* CSn : index identifier */ - header->Msg_offset = 0; /* Message offset */ - header->Msg_length = 0; /* Message length */ - header->Layer_nb = 0; /* Auxiliary for JPP case */ -} - -/* - * Re-initialize the value of the message header structure - * - * Only parameters always present in message header - * - */ -void jpt_reinit_msg_header(opj_jpt_msg_header_t * header) { - header->Id = 0; /* In-class Identifier */ - header->last_byte = 0; /* Last byte information */ - header->Msg_offset = 0; /* Message offset */ - header->Msg_length = 0; /* Message length */ -} - -/* - * Read the message header for a JPP/JPT - stream - * - */ -void jpt_read_msg_header(opj_common_ptr cinfo, opj_cio_t *cio, opj_jpt_msg_header_t *header) { - unsigned char elmt, Class = 0, CSn = 0; - jpt_reinit_msg_header(header); - - /* ------------- */ - /* VBAS : Bin-ID */ - /* ------------- */ - elmt = cio_read(cio, 1); - - /* See for Class and CSn */ - switch ((elmt >> 5) & 0x03) { - case 0: - opj_event_msg(cinfo, EVT_ERROR, "Forbidden value encounter in message header !!\n"); - break; - case 1: - Class = 0; - CSn = 0; - break; - case 2: - Class = 1; - CSn = 0; - break; - case 3: - Class = 1; - CSn = 1; - break; - default: - break; - } - - /* see information on bits 'c' [p 10 : A.2.1 general, ISO/IEC FCD 15444-9] */ - if (((elmt >> 4) & 0x01) == 1) - header->last_byte = 1; - - /* In-class identifier */ - header->Id |= (elmt & 0x0f); - if ((elmt >> 7) == 1) - header->Id = jpt_read_VBAS_info(cio, header->Id); - - /* ------------ */ - /* VBAS : Class */ - /* ------------ */ - if (Class == 1) { - header->Class_Id = 0; - header->Class_Id = jpt_read_VBAS_info(cio, header->Class_Id); - } - - /* ---------- */ - /* VBAS : CSn */ - /* ---------- */ - if (CSn == 1) { - header->CSn_Id = 0; - header->CSn_Id = jpt_read_VBAS_info(cio, header->CSn_Id); - } - - /* ----------------- */ - /* VBAS : Msg_offset */ - /* ----------------- */ - header->Msg_offset = jpt_read_VBAS_info(cio, header->Msg_offset); - - /* ----------------- */ - /* VBAS : Msg_length */ - /* ----------------- */ - header->Msg_length = jpt_read_VBAS_info(cio, header->Msg_length); - - /* ---------- */ - /* VBAS : Aux */ - /* ---------- */ - if ((header->Class_Id & 0x01) == 1) { - header->Layer_nb = 0; - header->Layer_nb = jpt_read_VBAS_info(cio, header->Layer_nb); - } -} diff --git a/Source/LibOpenJPEG/jpt.h b/Source/LibOpenJPEG/jpt.h deleted file mode 100644 index eb01f98..0000000 --- a/Source/LibOpenJPEG/jpt.h +++ /dev/null @@ -1,75 +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 - * 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 __JPT_H -#define __JPT_H -/** -@file jpt.h -@brief JPT-stream reader (JPEG 2000, JPIP) - -JPT-stream functions are implemented in J2K.C. -*/ - -/** -Message Header JPT stream structure -*/ -typedef struct opj_jpt_msg_header { - /** In-class Identifier */ - unsigned int Id; - /** Last byte information */ - unsigned int last_byte; - /** Class Identifier */ - unsigned int Class_Id; - /** CSn : index identifier */ - unsigned int CSn_Id; - /** Message offset */ - unsigned int Msg_offset; - /** Message length */ - unsigned int Msg_length; - /** Auxiliary for JPP case */ - unsigned int Layer_nb; -} opj_jpt_msg_header_t; - -/* ----------------------------------------------------------------------- */ - -/** -Initialize the value of the message header structure -@param header Message header structure -*/ -void jpt_init_msg_header(opj_jpt_msg_header_t * header); - -/** -Read the message header for a JPP/JPT - stream -@param cinfo Codec context info -@param cio CIO handle -@param header Message header structure -*/ -void jpt_read_msg_header(opj_common_ptr cinfo, opj_cio_t *cio, opj_jpt_msg_header_t *header); - -#endif diff --git a/Source/LibOpenJPEG/mct.c b/Source/LibOpenJPEG/mct.c deleted file mode 100644 index 870993b..0000000 --- a/Source/LibOpenJPEG/mct.c +++ /dev/null @@ -1,190 +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. - */ - -#ifdef __SSE__ -#include -#endif - -#include "opj_includes.h" - -/* */ -/* This table contains the norms of the basis function of the reversible MCT. */ -/* */ -static const double mct_norms[3] = { 1.732, .8292, .8292 }; - -/* */ -/* This table contains the norms of the basis function of the irreversible MCT. */ -/* */ -static const double mct_norms_real[3] = { 1.732, 1.805, 1.573 }; - -/* */ -/* Foward reversible MCT. */ -/* */ -void mct_encode( - int* restrict c0, - int* restrict c1, - int* restrict c2, - int n) -{ - int i; - for(i = 0; i < n; ++i) { - int r = c0[i]; - int g = c1[i]; - int b = c2[i]; - int y = (r + (g * 2) + b) >> 2; - int u = b - g; - int v = r - g; - c0[i] = y; - c1[i] = u; - c2[i] = v; - } -} - -/* */ -/* Inverse reversible MCT. */ -/* */ -void mct_decode( - int* restrict c0, - int* restrict c1, - int* restrict c2, - int n) -{ - int i; - for (i = 0; i < n; ++i) { - int y = c0[i]; - int u = c1[i]; - int v = c2[i]; - int g = y - ((u + v) >> 2); - int r = v + g; - int b = u + g; - c0[i] = r; - c1[i] = g; - c2[i] = b; - } -} - -/* */ -/* Get norm of basis function of reversible MCT. */ -/* */ -double mct_getnorm(int compno) { - return mct_norms[compno]; -} - -/* */ -/* Foward irreversible MCT. */ -/* */ -void mct_encode_real( - int* restrict c0, - int* restrict c1, - int* restrict c2, - int n) -{ - int i; - for(i = 0; i < n; ++i) { - int r = c0[i]; - int g = c1[i]; - int b = c2[i]; - int y = fix_mul(r, 2449) + fix_mul(g, 4809) + fix_mul(b, 934); - int u = -fix_mul(r, 1382) - fix_mul(g, 2714) + fix_mul(b, 4096); - int v = fix_mul(r, 4096) - fix_mul(g, 3430) - fix_mul(b, 666); - c0[i] = y; - c1[i] = u; - c2[i] = v; - } -} - -/* */ -/* Inverse irreversible MCT. */ -/* */ -void mct_decode_real( - float* restrict c0, - float* restrict c1, - float* restrict c2, - int n) -{ - int 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) { - float y = c0[i]; - float u = c1[i]; - float v = c2[i]; - float r = y + (v * 1.402f); - float g = y - (u * 0.34413f) - (v * (0.71414f)); - float b = y + (u * 1.772f); - c0[i] = r; - c1[i] = g; - c2[i] = b; - } -} - -/* */ -/* Get norm of basis function of irreversible MCT. */ -/* */ -double mct_getnorm_real(int compno) { - return mct_norms_real[compno]; -} diff --git a/Source/LibOpenJPEG/mct.h b/Source/LibOpenJPEG/mct.h deleted file mode 100644 index 84e3f8a..0000000 --- a/Source/LibOpenJPEG/mct.h +++ /dev/null @@ -1,98 +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 __MCT_H -#define __MCT_H -/** -@file mct.h -@brief Implementation of a multi-component transforms (MCT) - -The functions in MCT.C have for goal to realize reversible and irreversible multicomponent -transform. The functions in MCT.C are used by some function in TCD.C. -*/ - -/** @defgroup MCT MCT - Implementation of a multi-component transform */ -/*@{*/ - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** -Apply a reversible 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 mct_encode(int *c0, int *c1, int *c2, int n); -/** -Apply a reversible 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 mct_decode(int *c0, int *c1, int *c2, int n); -/** -Get norm of the basis function used for the reversible multi-component transform -@param compno Number of the component (0->Y, 1->U, 2->V) -@return -*/ -double mct_getnorm(int 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 mct_encode_real(int *c0, int *c1, int *c2, int 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 mct_decode_real(float* c0, float* c1, float* c2, int 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 -*/ -double mct_getnorm_real(int compno); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __MCT_H */ diff --git a/Source/LibOpenJPEG/mqc.c b/Source/LibOpenJPEG/mqc.c deleted file mode 100644 index 14129fb..0000000 --- a/Source/LibOpenJPEG/mqc.c +++ /dev/null @@ -1,592 +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 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 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 mqc_renorme(opj_mqc_t *mqc); -/** -Encode the most probable symbol -@param mqc MQC handle -*/ -static void mqc_codemps(opj_mqc_t *mqc); -/** -Encode the most least symbol -@param mqc MQC handle -*/ -static void mqc_codelps(opj_mqc_t *mqc); -/** -Fill mqc->c with 1's for flushing -@param mqc MQC handle -*/ -static void mqc_setbits(opj_mqc_t *mqc); -/** -FIXME: documentation ??? -@param mqc MQC handle -@return -*/ -static INLINE int mqc_mpsexchange(opj_mqc_t *const mqc); -/** -FIXME: documentation ??? -@param mqc MQC handle -@return -*/ -static INLINE int mqc_lpsexchange(opj_mqc_t *const mqc); -/** -Input a byte -@param mqc MQC handle -*/ -static INLINE void mqc_bytein(opj_mqc_t *const mqc); -/** -Renormalize mqc->a and mqc->c while decoding -@param mqc MQC handle -*/ -static INLINE void 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 -========================================================== -*/ - -static void mqc_byteout(opj_mqc_t *mqc) { - if (*mqc->bp == 0xff) { - mqc->bp++; - *mqc->bp = mqc->c >> 20; - mqc->c &= 0xfffff; - mqc->ct = 7; - } else { - if ((mqc->c & 0x8000000) == 0) { /* ((mqc->c&0x8000000)==0) CHANGE */ - mqc->bp++; - *mqc->bp = mqc->c >> 19; - mqc->c &= 0x7ffff; - mqc->ct = 8; - } else { - (*mqc->bp)++; - if (*mqc->bp == 0xff) { - mqc->c &= 0x7ffffff; - mqc->bp++; - *mqc->bp = mqc->c >> 20; - mqc->c &= 0xfffff; - mqc->ct = 7; - } else { - mqc->bp++; - *mqc->bp = mqc->c >> 19; - mqc->c &= 0x7ffff; - mqc->ct = 8; - } - } - } -} - -static void mqc_renorme(opj_mqc_t *mqc) { - do { - mqc->a <<= 1; - mqc->c <<= 1; - mqc->ct--; - if (mqc->ct == 0) { - mqc_byteout(mqc); - } - } while ((mqc->a & 0x8000) == 0); -} - -static void 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; - mqc_renorme(mqc); - } else { - mqc->c += (*mqc->curctx)->qeval; - } -} - -static void 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; - mqc_renorme(mqc); -} - -static void mqc_setbits(opj_mqc_t *mqc) { - unsigned int tempc = mqc->c + mqc->a; - mqc->c |= 0xffff; - if (mqc->c >= tempc) { - mqc->c -= 0x8000; - } -} - -static INLINE int mqc_mpsexchange(opj_mqc_t *const mqc) { - int d; - if (mqc->a < (*mqc->curctx)->qeval) { - d = 1 - (*mqc->curctx)->mps; - *mqc->curctx = (*mqc->curctx)->nlps; - } else { - d = (*mqc->curctx)->mps; - *mqc->curctx = (*mqc->curctx)->nmps; - } - - return d; -} - -static INLINE int mqc_lpsexchange(opj_mqc_t *const mqc) { - int d; - if (mqc->a < (*mqc->curctx)->qeval) { - mqc->a = (*mqc->curctx)->qeval; - d = (*mqc->curctx)->mps; - *mqc->curctx = (*mqc->curctx)->nmps; - } else { - mqc->a = (*mqc->curctx)->qeval; - d = 1 - (*mqc->curctx)->mps; - *mqc->curctx = (*mqc->curctx)->nlps; - } - - return d; -} - -#ifdef MQC_PERF_OPT -static INLINE void 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 mqc_bytein(opj_mqc_t *const mqc) { - if (mqc->bp != mqc->end) { - unsigned int 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 mqc_renormd(opj_mqc_t *const mqc) { - do { - if (mqc->ct == 0) { - mqc_bytein(mqc); - } - mqc->a <<= 1; - mqc->c <<= 1; - mqc->ct--; - } while (mqc->a < 0x8000); -} - -/* -========================================================== - MQ-Coder interface -========================================================== -*/ - -opj_mqc_t* 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 mqc_destroy(opj_mqc_t *mqc) { - if(mqc) { -#ifdef MQC_PERF_OPT - if (mqc->buffer) { - opj_free(mqc->buffer); - } -#endif - opj_free(mqc); - } -} - -int mqc_numbytes(opj_mqc_t *mqc) { - return mqc->bp - mqc->start; -} - -void mqc_init_enc(opj_mqc_t *mqc, unsigned char *bp) { - 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 mqc_encode(opj_mqc_t *mqc, int d) { - if ((*mqc->curctx)->mps == d) { - mqc_codemps(mqc); - } else { - mqc_codelps(mqc); - } -} - -void mqc_flush(opj_mqc_t *mqc) { - mqc_setbits(mqc); - mqc->c <<= mqc->ct; - mqc_byteout(mqc); - mqc->c <<= mqc->ct; - mqc_byteout(mqc); - - if (*mqc->bp != 0xff) { - mqc->bp++; - } -} - -void mqc_bypass_init_enc(opj_mqc_t *mqc) { - mqc->c = 0; - mqc->ct = 8; - /*if (*mqc->bp == 0xff) { - mqc->ct = 7; - } */ -} - -void mqc_bypass_enc(opj_mqc_t *mqc, int d) { - mqc->ct--; - mqc->c = mqc->c + (d << mqc->ct); - if (mqc->ct == 0) { - mqc->bp++; - *mqc->bp = mqc->c; - mqc->ct = 8; - if (*mqc->bp == 0xff) { - mqc->ct = 7; - } - mqc->c = 0; - } -} - -int mqc_bypass_flush_enc(opj_mqc_t *mqc) { - unsigned char bit_padding; - - bit_padding = 0; - - if (mqc->ct != 0) { - while (mqc->ct > 0) { - mqc->ct--; - mqc->c += bit_padding << mqc->ct; - bit_padding = (bit_padding + 1) & 0x01; - } - mqc->bp++; - *mqc->bp = mqc->c; - mqc->ct = 8; - mqc->c = 0; - } - - return 1; -} - -void mqc_reset_enc(opj_mqc_t *mqc) { - mqc_resetstates(mqc); - mqc_setstate(mqc, T1_CTXNO_UNI, 0, 46); - mqc_setstate(mqc, T1_CTXNO_AGG, 0, 3); - mqc_setstate(mqc, T1_CTXNO_ZC, 0, 4); -} - -int mqc_restart_enc(opj_mqc_t *mqc) { - int correction = 1; - - /* */ - int n = 27 - 15 - mqc->ct; - mqc->c <<= mqc->ct; - while (n > 0) { - mqc_byteout(mqc); - n -= mqc->ct; - mqc->c <<= mqc->ct; - } - mqc_byteout(mqc); - - return correction; -} - -void mqc_restart_init_enc(opj_mqc_t *mqc) { - /* */ - mqc_setcurctx(mqc, 0); - mqc->a = 0x8000; - mqc->c = 0; - mqc->ct = 12; - mqc->bp--; - if (*mqc->bp == 0xff) { - mqc->ct = 13; - } -} - -void mqc_erterm_enc(opj_mqc_t *mqc) { - int k = 11 - mqc->ct + 1; - - while (k > 0) { - mqc->c <<= mqc->ct; - mqc->ct = 0; - mqc_byteout(mqc); - k -= mqc->ct; - } - - if (*mqc->bp != 0xff) { - mqc_byteout(mqc); - } -} - -void mqc_segmark_enc(opj_mqc_t *mqc) { - int i; - mqc_setcurctx(mqc, 18); - - for (i = 1; i < 5; i++) { - mqc_encode(mqc, i % 2); - } -} - -void mqc_init_dec(opj_mqc_t *mqc, unsigned char *bp, int len) { - mqc_setcurctx(mqc, 0); - mqc->start = bp; - mqc->end = bp + len; - mqc->bp = bp; - if (len==0) mqc->c = 0xff << 16; - else mqc->c = *mqc->bp << 16; - -#ifdef MQC_PERF_OPT - { - unsigned int c; - unsigned int *ip; - unsigned char *end = mqc->end - 1; - mqc->buffer = opj_realloc(mqc->buffer, (len + 1) * sizeof(unsigned int)); - ip = (unsigned int *) 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 - mqc_bytein(mqc); - mqc->c <<= 7; - mqc->ct -= 7; - mqc->a = 0x8000; -} - -int mqc_decode(opj_mqc_t *const mqc) { - int d; - mqc->a -= (*mqc->curctx)->qeval; - if ((mqc->c >> 16) < (*mqc->curctx)->qeval) { - d = mqc_lpsexchange(mqc); - mqc_renormd(mqc); - } else { - mqc->c -= (*mqc->curctx)->qeval << 16; - if ((mqc->a & 0x8000) == 0) { - d = mqc_mpsexchange(mqc); - mqc_renormd(mqc); - } else { - d = (*mqc->curctx)->mps; - } - } - - return d; -} - -void mqc_resetstates(opj_mqc_t *mqc) { - int i; - for (i = 0; i < MQC_NUMCTXS; i++) { - mqc->ctxs[i] = mqc_states; - } -} - -void mqc_setstate(opj_mqc_t *mqc, int ctxno, int msb, int prob) { - mqc->ctxs[ctxno] = &mqc_states[msb + (prob << 1)]; -} - - diff --git a/Source/LibOpenJPEG/mqc.h b/Source/LibOpenJPEG/mqc.h deleted file mode 100644 index d00cd10..0000000 --- a/Source/LibOpenJPEG/mqc.h +++ /dev/null @@ -1,200 +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 __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) */ - unsigned int qeval; - /** the Most Probable Symbol (0 or 1) */ - int 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 { - unsigned int c; - unsigned int a; - unsigned int ct; - unsigned char *bp; - unsigned char *start; - unsigned char *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* mqc_create(void); -/** -Destroy a previously created MQC handle -@param mqc MQC handle to destroy -*/ -void 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 -*/ -int 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 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 mqc_setstate(opj_mqc_t *mqc, int ctxno, int msb, int prob); -/** -Initialize the encoder -@param mqc MQC handle -@param bp Pointer to the start of the buffer where the bytes will be written -*/ -void mqc_init_enc(opj_mqc_t *mqc, unsigned char *bp); -/** -Set the current context used for coding/decoding -@param mqc MQC handle -@param ctxno Number that identifies the context -*/ -#define mqc_setcurctx(mqc, ctxno) (mqc)->curctx = &(mqc)->ctxs[(int)(ctxno)] -/** -Encode a symbol using the MQ-coder -@param mqc MQC handle -@param d The symbol to be encoded (0 or 1) -*/ -void mqc_encode(opj_mqc_t *mqc, int d); -/** -Flush the encoder, so that all remaining data is written -@param mqc MQC handle -*/ -void 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 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 mqc_bypass_enc(opj_mqc_t *mqc, int d); -/** -BYPASS mode switch, flush operation -

Not fully implemented and tested !!

-@param mqc MQC handle -@return Returns 1 (always) -*/ -int mqc_bypass_flush_enc(opj_mqc_t *mqc); -/** -RESET mode switch -@param mqc MQC handle -*/ -void mqc_reset_enc(opj_mqc_t *mqc); -/** -RESTART mode switch (TERMALL) -@param mqc MQC handle -@return Returns 1 (always) -*/ -int mqc_restart_enc(opj_mqc_t *mqc); -/** -RESTART mode switch (TERMALL) reinitialisation -@param mqc MQC handle -*/ -void mqc_restart_init_enc(opj_mqc_t *mqc); -/** -ERTERM mode switch (PTERM) -@param mqc MQC handle -*/ -void mqc_erterm_enc(opj_mqc_t *mqc); -/** -SEGMARK mode switch (SEGSYM) -@param mqc MQC handle -*/ -void 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 -*/ -void mqc_init_dec(opj_mqc_t *mqc, unsigned char *bp, int len); -/** -Decode a symbol -@param mqc MQC handle -@return Returns the decoded symbol (0 or 1) -*/ -int mqc_decode(opj_mqc_t *const mqc); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __MQC_H */ diff --git a/Source/LibOpenJPEG/openjpeg.c b/Source/LibOpenJPEG/openjpeg.c deleted file mode 100644 index 180cc84..0000000 --- a/Source/LibOpenJPEG/openjpeg.c +++ /dev/null @@ -1,343 +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 -#endif /* _WIN32 */ - -#include "opj_config.h" -#include "opj_includes.h" - -/* ---------------------------------------------------------------------- */ -#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 PACKAGE_VERSION; -} - -opj_dinfo_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format) { - opj_dinfo_t *dinfo = (opj_dinfo_t*)opj_calloc(1, sizeof(opj_dinfo_t)); - if(!dinfo) return NULL; - dinfo->is_decompressor = OPJ_TRUE; - switch(format) { - case CODEC_J2K: - case CODEC_JPT: - /* get a J2K decoder handle */ - dinfo->j2k_handle = (void*)j2k_create_decompress((opj_common_ptr)dinfo); - if(!dinfo->j2k_handle) { - opj_free(dinfo); - return NULL; - } - break; - case CODEC_JP2: - /* get a JP2 decoder handle */ - dinfo->jp2_handle = (void*)jp2_create_decompress((opj_common_ptr)dinfo); - if(!dinfo->jp2_handle) { - opj_free(dinfo); - return NULL; - } - break; - case CODEC_UNKNOWN: - default: - opj_free(dinfo); - return NULL; - } - - dinfo->codec_format = format; - - return dinfo; -} - -void OPJ_CALLCONV opj_destroy_decompress(opj_dinfo_t *dinfo) { - if(dinfo) { - /* destroy the codec */ - switch(dinfo->codec_format) { - case CODEC_J2K: - case CODEC_JPT: - j2k_destroy_decompress((opj_j2k_t*)dinfo->j2k_handle); - break; - case CODEC_JP2: - jp2_destroy_decompress((opj_jp2_t*)dinfo->jp2_handle); - break; - case CODEC_UNKNOWN: - default: - break; - } - /* destroy the decompressor */ - opj_free(dinfo); - } -} - -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->cp_limit_decoding = NO_LIMITATION; - - 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 */ -/* <codec_format) { - case CODEC_J2K: - case CODEC_JPT: - j2k_setup_decoder((opj_j2k_t*)dinfo->j2k_handle, parameters); - break; - case CODEC_JP2: - jp2_setup_decoder((opj_jp2_t*)dinfo->jp2_handle, parameters); - break; - case CODEC_UNKNOWN: - default: - break; - } - } -} - -opj_image_t* OPJ_CALLCONV opj_decode(opj_dinfo_t *dinfo, opj_cio_t *cio) { - return opj_decode_with_info(dinfo, cio, NULL); -} - -opj_image_t* OPJ_CALLCONV opj_decode_with_info(opj_dinfo_t *dinfo, opj_cio_t *cio, opj_codestream_info_t *cstr_info) { - if(dinfo && cio) { - switch(dinfo->codec_format) { - case CODEC_J2K: - return j2k_decode((opj_j2k_t*)dinfo->j2k_handle, cio, cstr_info); - case CODEC_JPT: - return j2k_decode_jpt_stream((opj_j2k_t*)dinfo->j2k_handle, cio, cstr_info); - case CODEC_JP2: - return opj_jp2_decode((opj_jp2_t*)dinfo->jp2_handle, cio, cstr_info); - case CODEC_UNKNOWN: - default: - break; - } - } - return NULL; -} - -opj_cinfo_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format) { - opj_cinfo_t *cinfo = (opj_cinfo_t*)opj_calloc(1, sizeof(opj_cinfo_t)); - if(!cinfo) return NULL; - cinfo->is_decompressor = OPJ_FALSE; - switch(format) { - case CODEC_J2K: - /* get a J2K coder handle */ - cinfo->j2k_handle = (void*)j2k_create_compress((opj_common_ptr)cinfo); - if(!cinfo->j2k_handle) { - opj_free(cinfo); - return NULL; - } - break; - case CODEC_JP2: - /* get a JP2 coder handle */ - cinfo->jp2_handle = (void*)jp2_create_compress((opj_common_ptr)cinfo); - if(!cinfo->jp2_handle) { - opj_free(cinfo); - return NULL; - } - break; - case CODEC_JPT: - case CODEC_UNKNOWN: - default: - opj_free(cinfo); - return NULL; - } - - cinfo->codec_format = format; - - return cinfo; -} - -void OPJ_CALLCONV opj_destroy_compress(opj_cinfo_t *cinfo) { - if(cinfo) { - /* destroy the codec */ - switch(cinfo->codec_format) { - case CODEC_J2K: - j2k_destroy_compress((opj_j2k_t*)cinfo->j2k_handle); - break; - case CODEC_JP2: - jp2_destroy_compress((opj_jp2_t*)cinfo->jp2_handle); - break; - case CODEC_JPT: - case CODEC_UNKNOWN: - default: - break; - } - /* destroy the decompressor */ - opj_free(cinfo); - } -} - -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 = OFF; - parameters->max_comp_size = 0; - parameters->numresolution = 6; - parameters->cp_rsiz = STD_RSIZ; - parameters->cblockw_init = 64; - parameters->cblockh_init = 64; - parameters->prog_order = 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 */ -/* <codec_format) { - case CODEC_J2K: - j2k_setup_encoder((opj_j2k_t*)cinfo->j2k_handle, parameters, image); - break; - case CODEC_JP2: - jp2_setup_encoder((opj_jp2_t*)cinfo->jp2_handle, parameters, image); - break; - case CODEC_JPT: - case CODEC_UNKNOWN: - default: - break; - } - } -} - -opj_bool OPJ_CALLCONV opj_encode(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, char *index) { - if (index != NULL) - opj_event_msg((opj_common_ptr)cinfo, EVT_WARNING, "Set index to NULL when calling the opj_encode function.\n" - "To extract the index, use the opj_encode_with_info() function.\n" - "No index will be generated during this encoding\n"); - return opj_encode_with_info(cinfo, cio, image, NULL); -} - -opj_bool OPJ_CALLCONV opj_encode_with_info(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info) { - if(cinfo && cio && image) { - switch(cinfo->codec_format) { - case CODEC_J2K: - return j2k_encode((opj_j2k_t*)cinfo->j2k_handle, cio, image, cstr_info); - case CODEC_JP2: - return opj_jp2_encode((opj_jp2_t*)cinfo->jp2_handle, cio, image, cstr_info); - case CODEC_JPT: - case CODEC_UNKNOWN: - default: - break; - } - } - return OPJ_FALSE; -} - -void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_t *cstr_info) { - if (cstr_info) { - int tileno; - for (tileno = 0; tileno < cstr_info->tw * cstr_info->th; tileno++) { - opj_tile_info_t *tile_info = &cstr_info->tile[tileno]; - opj_free(tile_info->thresh); - opj_free(tile_info->packet); - opj_free(tile_info->tp); - opj_free(tile_info->marker); - } - opj_free(cstr_info->tile); - opj_free(cstr_info->marker); - opj_free(cstr_info->numdecompos); - } -} diff --git a/Source/LibOpenJPEG/openjpeg.h b/Source/LibOpenJPEG/openjpeg.h deleted file mode 100644 index 59147c8..0000000 --- a/Source/LibOpenJPEG/openjpeg.h +++ /dev/null @@ -1,914 +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) 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. - */ -#ifndef OPENJPEG_H -#define OPENJPEG_H - - -/* -========================================================== - Compiler directives -========================================================== -*/ - -#if defined(OPJ_STATIC) || !defined(_WIN32) -#define OPJ_API -#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 - -/* 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 J2K_MAXRLVLS 33 /**< Number of maximum resolution level authorized */ -#define J2K_MAXBANDS (3*J2K_MAXRLVLS-2) /**< Number of maximum sub-band linked to number of resolution level */ - -/* UniPG>> */ -#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 */ -/* < -
  • Error messages -
  • Warning messages -
  • Debugging messages - -*/ -typedef struct opj_event_mgr { - /** 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; - - -/* -========================================================== - codec typedef definitions -========================================================== -*/ - -/** -Progression order changes -*/ -typedef struct opj_poc { - /** Resolution num start, Component num start, given by POC */ - int resno0, compno0; - /** Layer num end,Resolution num end, Component num end, given by POC */ - int layno1, resno1, compno1; - /** Layer num start,Precinct num start, Precinct num end */ - int layno0, precno0, precno1; - /** Progression order enum*/ - OPJ_PROG_ORDER prg1,prg; - /** Progression order string*/ - char progorder[5]; - /** Tile number */ - int tile; - /** Start and end values for Tile width and height*/ - int tx0,tx1,ty0,ty1; - /** Start value, initialised in pi_initialise_encode*/ - int layS, resS, compS, prcS; - /** End value, initialised in pi_initialise_encode */ - int layE, resE, compE, prcE; - /** Start and end values of Tile width and height, initialised in pi_initialise_encode*/ - int txS,txE,tyS,tyE,dx,dy; - /** Temporary values for Tile parts, initialised in pi_create_encode */ - int lay_t, res_t, comp_t, prc_t,tx0_t,ty0_t; -} opj_poc_t; - -/** -Compression parameters -*/ -typedef struct opj_cparameters { - /** size of tile: tile_size_on = false (not in argument) or = true (in argument) */ - opj_bool tile_size_on; - /** XTOsiz */ - int cp_tx0; - /** YTOsiz */ - int cp_ty0; - /** XTsiz */ - int cp_tdx; - /** YTsiz */ - int cp_tdy; - /** allocation by rate/distortion */ - int cp_disto_alloc; - /** allocation by fixed layer */ - int cp_fixed_alloc; - /** add fixed_quality */ - int cp_fixed_quality; - /** fixed layer */ - int *cp_matrice; - /** comment for coding */ - char *cp_comment; - /** csty : coding style */ - int csty; - /** progression order (default LRCP) */ - OPJ_PROG_ORDER prog_order; - /** progression order changes */ - opj_poc_t POC[32]; - /** number of progression order changes (POC), default to 0 */ - int numpocs; - /** number of layers */ - int tcp_numlayers; - /** rates of layers */ - float tcp_rates[100]; - /** different psnr for successive layers */ - float tcp_distoratio[100]; - /** number of resolutions */ - int numresolution; - /** initial code block width, default to 64 */ - int cblockw_init; - /** initial code block height, default to 64 */ - int cblockh_init; - /** mode switch (cblk_style) */ - int mode; - /** 1 : use the irreversible DWT 9-7, 0 : use lossless compression (default) */ - int irreversible; - /** region of interest: affected component in [0..3], -1 means no ROI */ - int roi_compno; - /** region of interest: upshift value */ - int roi_shift; - /* number of precinct size specifications */ - int res_spec; - /** initial precinct width */ - int prcw_init[J2K_MAXRLVLS]; - /** initial precinct height */ - int prch_init[J2K_MAXRLVLS]; - - /**@name command line encoder parameters (not used inside the library) */ - /*@{*/ - /** input file name */ - char infile[OPJ_PATH_LEN]; - /** output file name */ - char outfile[OPJ_PATH_LEN]; - /** DEPRECATED. Index generation is now handeld with the opj_encode_with_info() function. Set to NULL */ - int index_on; - /** DEPRECATED. Index generation is now handeld with the opj_encode_with_info() function. Set to NULL */ - char index[OPJ_PATH_LEN]; - /** subimage encoding: origin image offset in x direction */ - int image_offset_x0; - /** subimage encoding: origin image offset in y direction */ - int image_offset_y0; - /** subsampling value for dx */ - int subsampling_dx; - /** subsampling value for dy */ - int subsampling_dy; - /** input file format 0: PGX, 1: PxM, 2: BMP 3:TIF*/ - int decod_format; - /** output file format 0: J2K, 1: JP2, 2: JPT */ - int cod_format; - /*@}*/ - -/* UniPG>> */ - /**@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]; - /*@}*/ -/* <> */ - /**@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_t { - /** marker type */ - unsigned short int type; - /** position in codestream */ - int 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; -/* <cp. -@param dinfo decompressor handle -@param parameters decompression parameters -*/ -OPJ_API void OPJ_CALLCONV opj_setup_decoder(opj_dinfo_t *dinfo, opj_dparameters_t *parameters); -/** -Decode an image from a JPEG-2000 codestream -@param dinfo decompressor handle -@param cio Input buffer stream -@return Returns a decoded image if successful, returns NULL otherwise -*/ -OPJ_API opj_image_t* OPJ_CALLCONV opj_decode(opj_dinfo_t *dinfo, opj_cio_t *cio); - -/** -Decode an image from a JPEG-2000 codestream and extract the codestream information -@param dinfo decompressor handle -@param cio Input buffer stream -@param cstr_info Codestream information structure if needed afterwards, NULL otherwise -@return Returns a decoded image if successful, returns NULL otherwise -*/ -OPJ_API opj_image_t* OPJ_CALLCONV opj_decode_with_info(opj_dinfo_t *dinfo, opj_cio_t *cio, opj_codestream_info_t *cstr_info); -/** -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_cinfo_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format); -/** -Destroy a compressor handle -@param cinfo compressor handle to destroy -*/ -OPJ_API void OPJ_CALLCONV opj_destroy_compress(opj_cinfo_t *cinfo); -/** -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 cinfo Compressor handle -@param parameters Compression parameters -@param image Input filled image -*/ -OPJ_API void OPJ_CALLCONV opj_setup_encoder(opj_cinfo_t *cinfo, opj_cparameters_t *parameters, opj_image_t *image); -/** -Encode an image into a JPEG-2000 codestream -3@param cinfo compressor handle -@param cio Output buffer stream -@param image Image to encode -@param index Depreacted -> Set to NULL. To extract index, used opj_encode_wci() -@return Returns true if successful, returns false otherwise -*/ -OPJ_API opj_bool OPJ_CALLCONV opj_encode(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, char *index); -/** -Encode an image into a JPEG-2000 codestream and extract the codestream information -@param cinfo compressor handle -@param cio Output buffer stream -@param image Image to encode -@param cstr_info Codestream information structure if needed afterwards, NULL otherwise -@return Returns true if successful, returns false otherwise -*/ -OPJ_API opj_bool OPJ_CALLCONV opj_encode_with_info(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); -/** -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_t *cstr_info); - - -#ifdef __cplusplus -} -#endif - -#endif /* OPENJPEG_H */ diff --git a/Source/LibOpenJPEG/opj_config.h b/Source/LibOpenJPEG/opj_config.h deleted file mode 100644 index b36f4e7..0000000 --- a/Source/LibOpenJPEG/opj_config.h +++ /dev/null @@ -1,41 +0,0 @@ -/* If you want to build the library manually without using - * 'configure' or 'CMake' - * then copy this file - * 'opj_config.h.in.user' - * to - * 'opj_config.h' - * - * Open 'opj_config.h' and change the file contents - * if you want to define something because you know you have - * BOTH installed the library AND the header file(s). - * Then e.g. write -#define HAVE_LIBPNG 1 - * - * - * The file 'opj_config.h' will be included in some source files. - * ==== YOU CAN NOT COMPILE WITHOUT IT. ==== - * === DO NOT FOREGET TO CHANGE 'config.nix' APPROPRIATELY. ==== -*/ - -/* DO NOT DEFINE BOTH VERSIONS OF LCMS */ -/* define to 1 if you have both liblcms and lcms.h installed */ -#undef HAVE_LIBLCMS1 -/* #define HAVE_LIBLCMS1 1 */ - -/* define to 1 if you have both liblcms2 and lcms2.h installed */ -#undef HAVE_LIBLCMS2 -/* #define HAVE_LIBLCMS2 1 */ - -/* define to 1 if you have both libpng and png.h installed */ -#undef HAVE_LIBPNG -/* #define HAVE_LIBPNG 1 */ - -/* define to 1 if you have both libtiff and tiff.h installed */ -#undef HAVE_LIBTIFF -/* #define HAVE_LIBTIFF 1 */ - -/*---------------- DO NOT CHANGE BELOW THIS LINE ----------------*/ -#define PACKAGE_URL "http://www.openjpeg.org/" -#define PACKAGE_BUGREPORT "http://code.google.com/p/openjpeg/" - -#define PACKAGE_VERSION "1.5.0" diff --git a/Source/LibOpenJPEG/opj_includes.h b/Source/LibOpenJPEG/opj_includes.h deleted file mode 100644 index 2b5866a..0000000 --- a/Source/LibOpenJPEG/opj_includes.h +++ /dev/null @@ -1,140 +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_INCLUDES_H -#define OPJ_INCLUDES_H - -/* - ========================================================== - Standard includes used by the library - ========================================================== -*/ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - ========================================================== - OpenJPEG interface - ========================================================== - */ -#include "openjpeg.h" - -/* - ========================================================== - OpenJPEG modules - ========================================================== -*/ - -/* Ignore GCC attributes if this is not GCC */ -#ifndef __GNUC__ - #define __attribute__(x) /* __attribute__(x) */ -#endif - -/* -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 */ - -/* 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 and Borland C do not have lrintf */ -#if defined(_MSC_VER) || 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 "j2k_lib.h" -#include "opj_malloc.h" -#include "event.h" -#include "bio.h" -#include "cio.h" - -#include "image.h" -#include "j2k.h" -#include "jp2.h" -#include "jpt.h" - -#include "mqc.h" -#include "raw.h" -#include "bio.h" -#include "tgt.h" -#include "pi.h" -#include "tcd.h" -#include "t1.h" -#include "dwt.h" -#include "t2.h" -#include "mct.h" -#include "int.h" -#include "fix.h" - -#include "cidx_manager.h" -#include "indexbox_manager.h" - -/* JPWL>> */ -#ifdef USE_JPWL -#include "./jpwl/jpwl.h" -#endif /* USE_JPWL */ -/* < - * 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 -#define opj_malloc(size) malloc(size) -#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 -#define opj_calloc(num, size) calloc(num, size) -#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 -#define opj_realloc(m, s) realloc(m, s) -#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/Source/LibOpenJPEG/phix_manager.c b/Source/LibOpenJPEG/phix_manager.c deleted file mode 100644 index 4995d48..0000000 --- a/Source/LibOpenJPEG/phix_manager.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * $Id: phix_manager.c,v 1.2 2012/09/23 12:44:41 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 -#include -#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 write_phixfaix( int coff, int compno, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_cio_t *cio); - -int write_phix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_cio_t *cio) -{ - int len, lenp=0, compno, i; - opj_jp2_box_t *box; - - box = (opj_jp2_box_t *)opj_calloc( cstr_info.numcomps, sizeof(opj_jp2_box_t)); - - for( i=0;i<2;i++){ - if (i) cio_seek( cio, lenp); - - lenp = cio_tell( cio); - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_PHIX, 4); /* PHIX */ - - write_manf( i, cstr_info.numcomps, box, cio); - - for( compno=0; compno pow( 2, 32)){ - size_of_coding = 8; - version = 1; - } - else{ - size_of_coding = 4; - version = 0; - } - - lenp = cio_tell( cio); - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_FAIX, 4); /* FAIX */ - cio_write( cio, version,1); /* Version 0 = 4 bytes */ - - nmax = 0; - for( i=0; i<=cstr_info.numdecompos[compno]; i++) - nmax += cstr_info.tile[0].ph[i] * cstr_info.tile[0].pw[i] * cstr_info.numlayers; - - cio_write( cio, nmax, size_of_coding); /* NMAX */ - cio_write( cio, cstr_info.tw*cstr_info.th, size_of_coding); /* M */ - - for( tileno=0; tilenopw[resno]*tile_Idx->ph[resno]; - for( precno=0; precnopacket[ ((layno*numOfres+resno)*cstr_info.numcomps+compno)*numOfprec+precno]; - break; - case RLCP: - packet = tile_Idx->packet[ ((resno*numOflayers+layno)*cstr_info.numcomps+compno)*numOfprec+precno]; - break; - case RPCL: - packet = tile_Idx->packet[ ((resno*numOfprec+precno)*cstr_info.numcomps+compno)*numOflayers+layno]; - break; - case PCRL: - packet = tile_Idx->packet[ ((precno*cstr_info.numcomps+compno)*numOfres+resno)*numOflayers + layno]; - break; - case CPRL: - packet = tile_Idx->packet[ ((compno*numOfprec+precno)*numOfres+resno)*numOflayers + layno]; - break; - default: - fprintf( stderr, "failed to ppix indexing\n"); - } - - cio_write( cio, packet.start_pos-coff, size_of_coding); /* start position */ - cio_write( cio, packet.end_ph_pos-packet.start_pos+1, size_of_coding); /* length */ - - num_packet++; - } - } - } - - /* PADDING */ - while( num_packet < nmax){ - cio_write( cio, 0, size_of_coding); /* start position */ - cio_write( cio, 0, size_of_coding); /* length */ - num_packet++; - } - } - - len = cio_tell( cio)-lenp; - cio_seek( cio, lenp); - cio_write( cio, len, 4); /* L */ - cio_seek( cio, lenp+len); - - return len; -} diff --git a/Source/LibOpenJPEG/pi.c b/Source/LibOpenJPEG/pi.c deleted file mode 100644 index e8e33bf..0000000 --- a/Source/LibOpenJPEG/pi.c +++ /dev/null @@ -1,963 +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 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 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 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 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 pi_next_cprl(opj_pi_iterator_t * pi); - -/*@}*/ - -/*@}*/ - -/* -========================================================== - local functions -========================================================== -*/ - -static opj_bool pi_next_lrcp(opj_pi_iterator_t * pi) { - opj_pi_comp_t *comp = NULL; - opj_pi_resolution_t *res = NULL; - long 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; -} - -static opj_bool pi_next_rlcp(opj_pi_iterator_t * pi) { - opj_pi_comp_t *comp = NULL; - opj_pi_resolution_t *res = NULL; - long 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; -} - -static opj_bool pi_next_rpcl(opj_pi_iterator_t * pi) { - opj_pi_comp_t *comp = NULL; - opj_pi_resolution_t *res = NULL; - long index = 0; - - if (!pi->first) { - goto LABEL_SKIP; - } else { - int 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++) { - int dx, dy; - res = &comp->resolutions[resno]; - dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno)); - dy = comp->dy * (1 << (res->pdy + comp->numresolutions - 1 - resno)); - pi->dx = !pi->dx ? dx : int_min(pi->dx, dx); - pi->dy = !pi->dy ? dy : int_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 += pi->dy - (pi->y % pi->dy)) { - for (pi->x = pi->poc.tx0; pi->x < pi->poc.tx1; pi->x += pi->dx - (pi->x % pi->dx)) { - for (pi->compno = pi->poc.compno0; pi->compno < pi->poc.compno1; pi->compno++) { - int levelno; - int trx0, try0; - int trx1, try1; - int rpx, rpy; - int 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 = int_ceildiv(pi->tx0, comp->dx << levelno); - try0 = int_ceildiv(pi->ty0, comp->dy << levelno); - trx1 = int_ceildiv(pi->tx1, comp->dx << levelno); - try1 = int_ceildiv(pi->ty1, comp->dy << levelno); - rpx = res->pdx + levelno; - rpy = res->pdy + levelno; - if (!((pi->y % (comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){ - continue; - } - if (!((pi->x % (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 = int_floordivpow2(int_ceildiv(pi->x, comp->dx << levelno), res->pdx) - - int_floordivpow2(trx0, res->pdx); - prcj = int_floordivpow2(int_ceildiv(pi->y, comp->dy << levelno), res->pdy) - - int_floordivpow2(try0, res->pdy); - pi->precno = prci + prcj * 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; -} - -static opj_bool pi_next_pcrl(opj_pi_iterator_t * pi) { - opj_pi_comp_t *comp = NULL; - opj_pi_resolution_t *res = NULL; - long index = 0; - - if (!pi->first) { - comp = &pi->comps[pi->compno]; - goto LABEL_SKIP; - } else { - int 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++) { - int dx, dy; - res = &comp->resolutions[resno]; - dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno)); - dy = comp->dy * (1 << (res->pdy + comp->numresolutions - 1 - resno)); - pi->dx = !pi->dx ? dx : int_min(pi->dx, dx); - pi->dy = !pi->dy ? dy : int_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 += pi->dy - (pi->y % pi->dy)) { - for (pi->x = pi->poc.tx0; pi->x < pi->poc.tx1; pi->x += pi->dx - (pi->x % 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 < int_min(pi->poc.resno1, comp->numresolutions); pi->resno++) { - int levelno; - int trx0, try0; - int trx1, try1; - int rpx, rpy; - int prci, prcj; - res = &comp->resolutions[pi->resno]; - levelno = comp->numresolutions - 1 - pi->resno; - trx0 = int_ceildiv(pi->tx0, comp->dx << levelno); - try0 = int_ceildiv(pi->ty0, comp->dy << levelno); - trx1 = int_ceildiv(pi->tx1, comp->dx << levelno); - try1 = int_ceildiv(pi->ty1, comp->dy << levelno); - rpx = res->pdx + levelno; - rpy = res->pdy + levelno; - if (!((pi->y % (comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){ - continue; - } - if (!((pi->x % (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 = int_floordivpow2(int_ceildiv(pi->x, comp->dx << levelno), res->pdx) - - int_floordivpow2(trx0, res->pdx); - prcj = int_floordivpow2(int_ceildiv(pi->y, comp->dy << levelno), res->pdy) - - int_floordivpow2(try0, res->pdy); - pi->precno = prci + prcj * 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; -} - -static opj_bool pi_next_cprl(opj_pi_iterator_t * pi) { - opj_pi_comp_t *comp = NULL; - opj_pi_resolution_t *res = NULL; - long 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++) { - int resno; - comp = &pi->comps[pi->compno]; - pi->dx = 0; - pi->dy = 0; - for (resno = 0; resno < comp->numresolutions; resno++) { - int dx, dy; - res = &comp->resolutions[resno]; - dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno)); - dy = comp->dy * (1 << (res->pdy + comp->numresolutions - 1 - resno)); - pi->dx = !pi->dx ? dx : int_min(pi->dx, dx); - pi->dy = !pi->dy ? dy : int_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 += pi->dy - (pi->y % pi->dy)) { - for (pi->x = pi->poc.tx0; pi->x < pi->poc.tx1; pi->x += pi->dx - (pi->x % pi->dx)) { - for (pi->resno = pi->poc.resno0; pi->resno < int_min(pi->poc.resno1, comp->numresolutions); pi->resno++) { - int levelno; - int trx0, try0; - int trx1, try1; - int rpx, rpy; - int prci, prcj; - res = &comp->resolutions[pi->resno]; - levelno = comp->numresolutions - 1 - pi->resno; - trx0 = int_ceildiv(pi->tx0, comp->dx << levelno); - try0 = int_ceildiv(pi->ty0, comp->dy << levelno); - trx1 = int_ceildiv(pi->tx1, comp->dx << levelno); - try1 = int_ceildiv(pi->ty1, comp->dy << levelno); - rpx = res->pdx + levelno; - rpy = res->pdy + levelno; - if (!((pi->y % (comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){ - continue; - } - if (!((pi->x % (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 = int_floordivpow2(int_ceildiv(pi->x, comp->dx << levelno), res->pdx) - - int_floordivpow2(trx0, res->pdx); - prcj = int_floordivpow2(int_ceildiv(pi->y, comp->dy << levelno), res->pdy) - - int_floordivpow2(try0, res->pdy); - pi->precno = prci + prcj * 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; -} - -/* -========================================================== - Packet iterator interface -========================================================== -*/ - -opj_pi_iterator_t *pi_create_decode(opj_image_t *image, opj_cp_t *cp, int tileno) { - int p, q; - int compno, resno, pino; - opj_pi_iterator_t *pi = NULL; - opj_tcp_t *tcp = NULL; - opj_tccp_t *tccp = NULL; - - tcp = &cp->tcps[tileno]; - - pi = (opj_pi_iterator_t*) opj_calloc((tcp->numpocs + 1), sizeof(opj_pi_iterator_t)); - if(!pi) { - /* TODO: throw an error */ - return NULL; - } - - for (pino = 0; pino < tcp->numpocs + 1; pino++) { /* change */ - int maxres = 0; - int maxprec = 0; - p = tileno % cp->tw; - q = tileno / cp->tw; - - pi[pino].tx0 = int_max(cp->tx0 + p * cp->tdx, image->x0); - pi[pino].ty0 = int_max(cp->ty0 + q * cp->tdy, image->y0); - pi[pino].tx1 = int_min(cp->tx0 + (p + 1) * cp->tdx, image->x1); - pi[pino].ty1 = int_min(cp->ty0 + (q + 1) * cp->tdy, image->y1); - pi[pino].numcomps = image->numcomps; - - pi[pino].comps = (opj_pi_comp_t*) opj_calloc(image->numcomps, sizeof(opj_pi_comp_t)); - if(!pi[pino].comps) { - /* TODO: throw an error */ - pi_destroy(pi, cp, tileno); - return NULL; - } - - for (compno = 0; compno < pi->numcomps; compno++) { - int tcx0, tcy0, tcx1, tcy1; - opj_pi_comp_t *comp = &pi[pino].comps[compno]; - tccp = &tcp->tccps[compno]; - comp->dx = image->comps[compno].dx; - comp->dy = image->comps[compno].dy; - comp->numresolutions = tccp->numresolutions; - - comp->resolutions = (opj_pi_resolution_t*) opj_calloc(comp->numresolutions, sizeof(opj_pi_resolution_t)); - if(!comp->resolutions) { - /* TODO: throw an error */ - pi_destroy(pi, cp, tileno); - return NULL; - } - - tcx0 = int_ceildiv(pi->tx0, comp->dx); - tcy0 = int_ceildiv(pi->ty0, comp->dy); - tcx1 = int_ceildiv(pi->tx1, comp->dx); - tcy1 = int_ceildiv(pi->ty1, comp->dy); - if (comp->numresolutions > maxres) { - maxres = comp->numresolutions; - } - - for (resno = 0; resno < comp->numresolutions; resno++) { - int levelno; - int rx0, ry0, rx1, ry1; - int px0, py0, px1, py1; - opj_pi_resolution_t *res = &comp->resolutions[resno]; - if (tccp->csty & J2K_CCP_CSTY_PRT) { - res->pdx = tccp->prcw[resno]; - res->pdy = tccp->prch[resno]; - } else { - res->pdx = 15; - res->pdy = 15; - } - levelno = comp->numresolutions - 1 - resno; - rx0 = int_ceildivpow2(tcx0, levelno); - ry0 = int_ceildivpow2(tcy0, levelno); - rx1 = int_ceildivpow2(tcx1, levelno); - ry1 = int_ceildivpow2(tcy1, levelno); - px0 = int_floordivpow2(rx0, res->pdx) << res->pdx; - py0 = int_floordivpow2(ry0, res->pdy) << res->pdy; - px1 = int_ceildivpow2(rx1, res->pdx) << res->pdx; - py1 = int_ceildivpow2(ry1, res->pdy) << res->pdy; - res->pw = (rx0==rx1)?0:((px1 - px0) >> res->pdx); - res->ph = (ry0==ry1)?0:((py1 - py0) >> res->pdy); - - if (res->pw*res->ph > maxprec) { - maxprec = res->pw*res->ph; - } - - } - } - - tccp = &tcp->tccps[0]; - pi[pino].step_p = 1; - pi[pino].step_c = maxprec * pi[pino].step_p; - pi[pino].step_r = image->numcomps * pi[pino].step_c; - pi[pino].step_l = maxres * pi[pino].step_r; - - if (pino == 0) { - pi[pino].include = (short int*) opj_calloc(image->numcomps * maxres * tcp->numlayers * maxprec, sizeof(short int)); - if(!pi[pino].include) { - /* TODO: throw an error */ - pi_destroy(pi, cp, tileno); - return NULL; - } - } - else { - pi[pino].include = pi[pino - 1].include; - } - - if (tcp->POC == 0) { - pi[pino].first = 1; - pi[pino].poc.resno0 = 0; - pi[pino].poc.compno0 = 0; - pi[pino].poc.layno1 = tcp->numlayers; - pi[pino].poc.resno1 = maxres; - pi[pino].poc.compno1 = image->numcomps; - pi[pino].poc.prg = tcp->prg; - } else { - pi[pino].first = 1; - pi[pino].poc.resno0 = tcp->pocs[pino].resno0; - pi[pino].poc.compno0 = tcp->pocs[pino].compno0; - pi[pino].poc.layno1 = tcp->pocs[pino].layno1; - pi[pino].poc.resno1 = tcp->pocs[pino].resno1; - pi[pino].poc.compno1 = tcp->pocs[pino].compno1; - pi[pino].poc.prg = tcp->pocs[pino].prg; - } - pi[pino].poc.layno0 = 0; - pi[pino].poc.precno0 = 0; - pi[pino].poc.precno1 = maxprec; - - } - - return pi; -} - - -opj_pi_iterator_t *pi_initialise_encode(opj_image_t *image, opj_cp_t *cp, int tileno, J2K_T2_MODE t2_mode){ - int p, q, pino; - int compno, resno; - int maxres = 0; - int maxprec = 0; - opj_pi_iterator_t *pi = NULL; - opj_tcp_t *tcp = NULL; - opj_tccp_t *tccp = NULL; - - tcp = &cp->tcps[tileno]; - - pi = (opj_pi_iterator_t*) opj_calloc((tcp->numpocs + 1), sizeof(opj_pi_iterator_t)); - if(!pi) { return NULL;} - pi->tp_on = cp->tp_on; - - for(pino = 0;pino < tcp->numpocs+1 ; pino ++){ - p = tileno % cp->tw; - q = tileno / cp->tw; - - pi[pino].tx0 = int_max(cp->tx0 + p * cp->tdx, image->x0); - pi[pino].ty0 = int_max(cp->ty0 + q * cp->tdy, image->y0); - pi[pino].tx1 = int_min(cp->tx0 + (p + 1) * cp->tdx, image->x1); - pi[pino].ty1 = int_min(cp->ty0 + (q + 1) * cp->tdy, image->y1); - pi[pino].numcomps = image->numcomps; - - pi[pino].comps = (opj_pi_comp_t*) opj_calloc(image->numcomps, sizeof(opj_pi_comp_t)); - if(!pi[pino].comps) { - pi_destroy(pi, cp, tileno); - return NULL; - } - - for (compno = 0; compno < pi[pino].numcomps; compno++) { - int tcx0, tcy0, tcx1, tcy1; - opj_pi_comp_t *comp = &pi[pino].comps[compno]; - tccp = &tcp->tccps[compno]; - comp->dx = image->comps[compno].dx; - comp->dy = image->comps[compno].dy; - comp->numresolutions = tccp->numresolutions; - - comp->resolutions = (opj_pi_resolution_t*) opj_malloc(comp->numresolutions * sizeof(opj_pi_resolution_t)); - if(!comp->resolutions) { - pi_destroy(pi, cp, tileno); - return NULL; - } - - tcx0 = int_ceildiv(pi[pino].tx0, comp->dx); - tcy0 = int_ceildiv(pi[pino].ty0, comp->dy); - tcx1 = int_ceildiv(pi[pino].tx1, comp->dx); - tcy1 = int_ceildiv(pi[pino].ty1, comp->dy); - if (comp->numresolutions > maxres) { - maxres = comp->numresolutions; - } - - for (resno = 0; resno < comp->numresolutions; resno++) { - int levelno; - int rx0, ry0, rx1, ry1; - int px0, py0, px1, py1; - opj_pi_resolution_t *res = &comp->resolutions[resno]; - if (tccp->csty & J2K_CCP_CSTY_PRT) { - res->pdx = tccp->prcw[resno]; - res->pdy = tccp->prch[resno]; - } else { - res->pdx = 15; - res->pdy = 15; - } - levelno = comp->numresolutions - 1 - resno; - rx0 = int_ceildivpow2(tcx0, levelno); - ry0 = int_ceildivpow2(tcy0, levelno); - rx1 = int_ceildivpow2(tcx1, levelno); - ry1 = int_ceildivpow2(tcy1, levelno); - px0 = int_floordivpow2(rx0, res->pdx) << res->pdx; - py0 = int_floordivpow2(ry0, res->pdy) << res->pdy; - px1 = int_ceildivpow2(rx1, res->pdx) << res->pdx; - py1 = int_ceildivpow2(ry1, res->pdy) << res->pdy; - res->pw = (rx0==rx1)?0:((px1 - px0) >> res->pdx); - res->ph = (ry0==ry1)?0:((py1 - py0) >> res->pdy); - - if (res->pw*res->ph > maxprec) { - maxprec = res->pw * res->ph; - } - } - } - - tccp = &tcp->tccps[0]; - pi[pino].step_p = 1; - pi[pino].step_c = maxprec * pi[pino].step_p; - pi[pino].step_r = image->numcomps * pi[pino].step_c; - pi[pino].step_l = maxres * pi[pino].step_r; - - for (compno = 0; compno < pi->numcomps; compno++) { - opj_pi_comp_t *comp = &pi->comps[compno]; - for (resno = 0; resno < comp->numresolutions; resno++) { - int dx, dy; - opj_pi_resolution_t *res = &comp->resolutions[resno]; - dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno)); - dy = comp->dy * (1 << (res->pdy + comp->numresolutions - 1 - resno)); - pi[pino].dx = !pi->dx ? dx : int_min(pi->dx, dx); - pi[pino].dy = !pi->dy ? dy : int_min(pi->dy, dy); - } - } - - if (pino == 0) { - pi[pino].include = (short int*) opj_calloc(tcp->numlayers * pi[pino].step_l, sizeof(short int)); - if(!pi[pino].include) { - pi_destroy(pi, cp, tileno); - return NULL; - } - } - else { - pi[pino].include = pi[pino - 1].include; - } - - /* Generation of boundaries for each prog flag*/ - if(tcp->POC && ( cp->cinema || ((!cp->cinema) && (t2_mode == FINAL_PASS)))){ - tcp->pocs[pino].compS= tcp->pocs[pino].compno0; - tcp->pocs[pino].compE= tcp->pocs[pino].compno1; - tcp->pocs[pino].resS = tcp->pocs[pino].resno0; - tcp->pocs[pino].resE = tcp->pocs[pino].resno1; - tcp->pocs[pino].layE = tcp->pocs[pino].layno1; - tcp->pocs[pino].prg = tcp->pocs[pino].prg1; - if (pino > 0) - tcp->pocs[pino].layS = (tcp->pocs[pino].layE > tcp->pocs[pino - 1].layE) ? tcp->pocs[pino - 1].layE : 0; - }else { - tcp->pocs[pino].compS= 0; - tcp->pocs[pino].compE= image->numcomps; - tcp->pocs[pino].resS = 0; - tcp->pocs[pino].resE = maxres; - tcp->pocs[pino].layS = 0; - tcp->pocs[pino].layE = tcp->numlayers; - tcp->pocs[pino].prg = tcp->prg; - } - tcp->pocs[pino].prcS = 0; - tcp->pocs[pino].prcE = maxprec;; - tcp->pocs[pino].txS = pi[pino].tx0; - tcp->pocs[pino].txE = pi[pino].tx1; - tcp->pocs[pino].tyS = pi[pino].ty0; - tcp->pocs[pino].tyE = pi[pino].ty1; - tcp->pocs[pino].dx = pi[pino].dx; - tcp->pocs[pino].dy = pi[pino].dy; - } - return pi; - } - - - -void pi_destroy(opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno) { - int compno, pino; - opj_tcp_t *tcp = &cp->tcps[tileno]; - if(pi) { - for (pino = 0; pino < tcp->numpocs + 1; pino++) { - if(pi[pino].comps) { - for (compno = 0; compno < pi->numcomps; compno++) { - opj_pi_comp_t *comp = &pi[pino].comps[compno]; - if(comp->resolutions) { - opj_free(comp->resolutions); - } - } - opj_free(pi[pino].comps); - } - } - if(pi->include) { - opj_free(pi->include); - } - opj_free(pi); - } -} - -opj_bool pi_next(opj_pi_iterator_t * pi) { - switch (pi->poc.prg) { - case LRCP: - return pi_next_lrcp(pi); - case RLCP: - return pi_next_rlcp(pi); - case RPCL: - return pi_next_rpcl(pi); - case PCRL: - return pi_next_pcrl(pi); - case CPRL: - return pi_next_cprl(pi); - case PROG_UNKNOWN: - return OPJ_FALSE; - } - - return OPJ_FALSE; -} - -opj_bool pi_create_encode( opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino,int tpnum, int tppos, J2K_T2_MODE t2_mode,int cur_totnum_tp){ - char prog[4]; - int i; - int incr_top=1,resetX=0; - opj_tcp_t *tcps =&cp->tcps[tileno]; - opj_poc_t *tcp= &tcps->pocs[pino]; - - pi[pino].first = 1; - pi[pino].poc.prg = tcp->prg; - - switch(tcp->prg){ - case CPRL: strncpy(prog, "CPRL",4); - break; - case LRCP: strncpy(prog, "LRCP",4); - break; - case PCRL: strncpy(prog, "PCRL",4); - break; - case RLCP: strncpy(prog, "RLCP",4); - break; - case RPCL: strncpy(prog, "RPCL",4); - break; - case PROG_UNKNOWN: - return OPJ_TRUE; - } - - if(!(cp->tp_on && ((!cp->cinema && (t2_mode == FINAL_PASS)) || cp->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 = tcp->txS; - pi[pino].poc.ty0 = tcp->tyS; - pi[pino].poc.tx1 = tcp->txE; - pi[pino].poc.ty1 = tcp->tyE; - }else { - if( tpnum < cur_totnum_tp){ - for(i=3;i>=0;i--){ - switch(prog[i]){ - case 'C': - if (i > tppos){ - pi[pino].poc.compno0 = tcp->compS; - pi[pino].poc.compno1 = tcp->compE; - }else{ - if (tpnum == 0){ - tcp->comp_t = tcp->compS; - pi[pino].poc.compno0 = tcp->comp_t; - pi[pino].poc.compno1 = tcp->comp_t+1; - tcp->comp_t+=1; - }else{ - if (incr_top == 1){ - if(tcp->comp_t ==tcp->compE){ - 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{ - pi[pino].poc.compno0 = tcp->comp_t; - pi[pino].poc.compno1 = tcp->comp_t+1; - tcp->comp_t+=1; - incr_top=0; - } - }else{ - pi[pino].poc.compno0 = tcp->comp_t-1; - pi[pino].poc.compno1 = tcp->comp_t; - } - } - } - break; - - case 'R': - if (i > tppos){ - pi[pino].poc.resno0 = tcp->resS; - pi[pino].poc.resno1 = tcp->resE; - }else{ - if (tpnum == 0){ - tcp->res_t = tcp->resS; - pi[pino].poc.resno0 = tcp->res_t; - pi[pino].poc.resno1 = tcp->res_t+1; - tcp->res_t+=1; - }else{ - if (incr_top == 1){ - if(tcp->res_t==tcp->resE){ - 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{ - pi[pino].poc.resno0 = tcp->res_t; - pi[pino].poc.resno1 = tcp->res_t+1; - tcp->res_t+=1; - incr_top=0; - } - }else{ - pi[pino].poc.resno0 = tcp->res_t - 1; - pi[pino].poc.resno1 = tcp->res_t; - } - } - } - break; - - case 'L': - if (i > tppos){ - pi[pino].poc.layno0 = tcp->layS; - pi[pino].poc.layno1 = tcp->layE; - }else{ - if (tpnum == 0){ - tcp->lay_t = tcp->layS; - pi[pino].poc.layno0 = tcp->lay_t; - pi[pino].poc.layno1 = tcp->lay_t+1; - tcp->lay_t+=1; - }else{ - if (incr_top == 1){ - if(tcp->lay_t == tcp->layE){ - 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{ - pi[pino].poc.layno0 = tcp->lay_t; - pi[pino].poc.layno1 = tcp->lay_t+1; - tcp->lay_t+=1; - incr_top=0; - } - }else{ - pi[pino].poc.layno0 = tcp->lay_t - 1; - pi[pino].poc.layno1 = tcp->lay_t; - } - } - } - break; - - case 'P': - switch(tcp->prg){ - case LRCP: - case RLCP: - if (i > tppos){ - pi[pino].poc.precno0 = tcp->prcS; - pi[pino].poc.precno1 = tcp->prcE; - }else{ - if (tpnum == 0){ - tcp->prc_t = tcp->prcS; - pi[pino].poc.precno0 = tcp->prc_t; - pi[pino].poc.precno1 = tcp->prc_t+1; - tcp->prc_t+=1; - }else{ - if (incr_top == 1){ - if(tcp->prc_t == tcp->prcE){ - 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{ - pi[pino].poc.precno0 = tcp->prc_t; - pi[pino].poc.precno1 = tcp->prc_t+1; - tcp->prc_t+=1; - incr_top=0; - } - }else{ - pi[pino].poc.precno0 = tcp->prc_t - 1; - pi[pino].poc.precno1 = tcp->prc_t; - } - } - } - break; - default: - if (i > tppos){ - pi[pino].poc.tx0 = tcp->txS; - pi[pino].poc.ty0 = tcp->tyS; - pi[pino].poc.tx1 = tcp->txE; - pi[pino].poc.ty1 = tcp->tyE; - }else{ - if (tpnum == 0){ - tcp->tx0_t = tcp->txS; - tcp->ty0_t = tcp->tyS; - pi[pino].poc.tx0 = tcp->tx0_t; - pi[pino].poc.tx1 = tcp->tx0_t + tcp->dx - (tcp->tx0_t % tcp->dx); - pi[pino].poc.ty0 = tcp->ty0_t; - pi[pino].poc.ty1 = tcp->ty0_t + tcp->dy - (tcp->ty0_t % tcp->dy); - tcp->tx0_t = pi[pino].poc.tx1; - tcp->ty0_t = pi[pino].poc.ty1; - }else{ - if (incr_top == 1){ - if(tcp->tx0_t >= tcp->txE){ - if(tcp->ty0_t >= tcp->tyE){ - tcp->ty0_t = tcp->tyS; - pi[pino].poc.ty0 = tcp->ty0_t; - pi[pino].poc.ty1 = tcp->ty0_t + tcp->dy - (tcp->ty0_t % tcp->dy); - tcp->ty0_t = pi[pino].poc.ty1; - incr_top=1;resetX=1; - }else{ - pi[pino].poc.ty0 = tcp->ty0_t; - pi[pino].poc.ty1 = tcp->ty0_t + tcp->dy - (tcp->ty0_t % tcp->dy); - tcp->ty0_t = pi[pino].poc.ty1; - incr_top=0;resetX=1; - } - if(resetX==1){ - tcp->tx0_t = tcp->txS; - pi[pino].poc.tx0 = tcp->tx0_t; - pi[pino].poc.tx1 = tcp->tx0_t + tcp->dx- (tcp->tx0_t % tcp->dx); - tcp->tx0_t = pi[pino].poc.tx1; - } - }else{ - pi[pino].poc.tx0 = tcp->tx0_t; - pi[pino].poc.tx1 = tcp->tx0_t + tcp->dx- (tcp->tx0_t % tcp->dx); - tcp->tx0_t = pi[pino].poc.tx1; - pi[pino].poc.ty0 = tcp->ty0_t - tcp->dy - (tcp->ty0_t % tcp->dy); - pi[pino].poc.ty1 = tcp->ty0_t ; - incr_top=0; - } - }else{ - pi[pino].poc.tx0 = tcp->tx0_t - tcp->dx - (tcp->tx0_t % tcp->dx); - pi[pino].poc.tx1 = tcp->tx0_t ; - pi[pino].poc.ty0 = tcp->ty0_t - tcp->dy - (tcp->ty0_t % tcp->dy); - pi[pino].poc.ty1 = tcp->ty0_t ; - } - } - } - break; - } - break; - } - } - } - } - return OPJ_FALSE; -} - diff --git a/Source/LibOpenJPEG/pi.h b/Source/LibOpenJPEG/pi.h deleted file mode 100644 index cf9135f..0000000 --- a/Source/LibOpenJPEG/pi.h +++ /dev/null @@ -1,156 +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: documentation -*/ -typedef struct opj_pi_resolution { - int pdx, pdy; - int pw, ph; -} opj_pi_resolution_t; - -/** -FIXME: documentation -*/ -typedef struct opj_pi_comp { - int dx, dy; - /** number of resolution levels */ - int numresolutions; - opj_pi_resolution_t *resolutions; -} opj_pi_comp_t; - -/** -Packet iterator -*/ -typedef struct opj_pi_iterator { - /** Enabling Tile part generation*/ - char tp_on; - /** precise if the packet has been already used (usefull for progression order change) */ - short int *include; - /** layer step used to localize the packet in the include vector */ - int step_l; - /** resolution step used to localize the packet in the include vector */ - int step_r; - /** component step used to localize the packet in the include vector */ - int step_c; - /** precinct step used to localize the packet in the include vector */ - int step_p; - /** component that identify the packet */ - int compno; - /** resolution that identify the packet */ - int resno; - /** precinct that identify the packet */ - int precno; - /** layer that identify the packet */ - int layno; - /** 0 if the first packet */ - int first; - /** progression order change information */ - opj_poc_t poc; - /** number of components in the image */ - int numcomps; - /** Components*/ - opj_pi_comp_t *comps; - int tx0, ty0, tx1, ty1; - int x, y, dx, dy; -} opj_pi_iterator_t; - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** -Create a packet iterator for Encoder -@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 -@param t2_mode If == 0 In Threshold calculation ,If == 1 Final pass -@return Returns a packet iterator that points to the first packet of the tile -@see pi_destroy -*/ -opj_pi_iterator_t *pi_initialise_encode(opj_image_t *image, opj_cp_t *cp, int tileno,J2K_T2_MODE t2_mode); -/** -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 Iterator index for pi -@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 If == 0 In Threshold calculation ,If == 1 Final pass -@param cur_totnum_tp The total number of tile parts in the current tile -@return Returns true if an error is detected -*/ -opj_bool pi_create_encode(opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino,int tpnum, int tppos, J2K_T2_MODE t2_mode,int cur_totnum_tp); -/** -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 pi_destroy -*/ -opj_pi_iterator_t *pi_create_decode(opj_image_t * image, opj_cp_t * cp, int tileno); - -/** -Destroy a packet iterator -@param pi Previously created packet iterator -@param cp Coding parameters -@param tileno Number that identifies the tile for which the packets were listed -@see pi_create -*/ -void pi_destroy(opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno); - -/** -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 pi_next(opj_pi_iterator_t * pi); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __PI_H */ diff --git a/Source/LibOpenJPEG/ppix_manager.c b/Source/LibOpenJPEG/ppix_manager.c deleted file mode 100644 index ee477c1..0000000 --- a/Source/LibOpenJPEG/ppix_manager.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * $Id: ppix_manager.c,v 1.2 2012/09/23 12:44:41 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 -#include -#include -#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 write_ppixfaix( int coff, int compno, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_cio_t *cio); - -int write_ppix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_cio_t *cio) -{ - int len, lenp, compno, i; - opj_jp2_box_t *box; - - /* printf("cstr_info.packno %d\n", cstr_info.packno); //NMAX? */ - - lenp = -1; - box = (opj_jp2_box_t *)opj_calloc( cstr_info.numcomps, sizeof(opj_jp2_box_t)); - - for (i=0;i<2;i++){ - if (i) cio_seek( cio, lenp); - - lenp = cio_tell( cio); - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_PPIX, 4); /* PPIX */ - - write_manf( i, cstr_info.numcomps, box, cio); - - for (compno=0; compno pow( 2, 32)){ - size_of_coding = 8; - version = 1; - } - else{ - size_of_coding = 4; - version = 0; - } - - lenp = cio_tell( cio); - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_FAIX, 4); /* FAIX */ - cio_write( cio, version, 1); /* Version 0 = 4 bytes */ - - nmax = 0; - for( i=0; i<=cstr_info.numdecompos[compno]; i++) - nmax += cstr_info.tile[0].ph[i] * cstr_info.tile[0].pw[i] * cstr_info.numlayers; - - cio_write( cio, nmax, size_of_coding); /* NMAX */ - cio_write( cio, cstr_info.tw*cstr_info.th, size_of_coding); /* M */ - - for( tileno=0; tilenopw[resno]*tile_Idx->ph[resno]; - for( precno=0; precnopacket[ ((layno*numOfres+resno)*cstr_info.numcomps+compno)*numOfprec+precno]; - break; - case RLCP: - packet = tile_Idx->packet[ ((resno*numOflayers+layno)*cstr_info.numcomps+compno)*numOfprec+precno]; - break; - case RPCL: - packet = tile_Idx->packet[ ((resno*numOfprec+precno)*cstr_info.numcomps+compno)*numOflayers+layno]; - break; - case PCRL: - packet = tile_Idx->packet[ ((precno*cstr_info.numcomps+compno)*numOfres+resno)*numOflayers + layno]; - break; - case CPRL: - packet = tile_Idx->packet[ ((compno*numOfprec+precno)*numOfres+resno)*numOflayers + layno]; - break; - default: - fprintf( stderr, "failed to ppix indexing\n"); - } - - cio_write( cio, packet.start_pos-coff, size_of_coding); /* start position */ - cio_write( cio, packet.end_pos-packet.start_pos+1, size_of_coding); /* length */ - - num_packet++; - } - } - } - - while( num_packet < nmax){ /* PADDING */ - cio_write( cio, 0, size_of_coding); /* start position */ - cio_write( cio, 0, size_of_coding); /* length */ - num_packet++; - } - } - - len = cio_tell( cio)-lenp; - cio_seek( cio, lenp); - cio_write( cio, len, 4); /* L */ - cio_seek( cio, lenp+len); - - return len; -} diff --git a/Source/LibOpenJPEG/raw.c b/Source/LibOpenJPEG/raw.c deleted file mode 100644 index 3d231bf..0000000 --- a/Source/LibOpenJPEG/raw.c +++ /dev/null @@ -1,87 +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* raw_create(void) { - opj_raw_t *raw = (opj_raw_t*)opj_malloc(sizeof(opj_raw_t)); - return raw; -} - -void raw_destroy(opj_raw_t *raw) { - if(raw) { - opj_free(raw); - } -} - -int raw_numbytes(opj_raw_t *raw) { - return raw->bp - raw->start; -} - -void raw_init_dec(opj_raw_t *raw, unsigned char *bp, int len) { - raw->start = bp; - raw->lenmax = len; - raw->len = 0; - raw->c = 0; - raw->ct = 0; -} - -int raw_decode(opj_raw_t *raw) { - int 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/Source/LibOpenJPEG/raw.h b/Source/LibOpenJPEG/raw.h deleted file mode 100644 index 3c4b372..0000000 --- a/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 */ - unsigned char c; - /** number of bits already read or free to write */ - unsigned int ct; - /** maximum length to decode */ - unsigned int lenmax; - /** length decoded */ - unsigned int len; - /** pointer to the current position in the buffer */ - unsigned char *bp; - /** pointer to the start of the buffer */ - unsigned char *start; - /** pointer to the end of the buffer */ - unsigned char *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* raw_create(void); -/** -Destroy a previously created RAW handle -@param raw RAW handle to destroy -*/ -void 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 -*/ -int 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 raw_init_dec(opj_raw_t *raw, unsigned char *bp, int len); -/** -Decode a symbol using raw-decoder. Cfr p.506 TAUBMAN -@param raw RAW handle -@return Returns the decoded symbol (0 or 1) -*/ -int raw_decode(opj_raw_t *raw); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __RAW_H */ diff --git a/Source/LibOpenJPEG/t1.c b/Source/LibOpenJPEG/t1.c deleted file mode 100644 index ed9cdc3..0000000 --- a/Source/LibOpenJPEG/t1.c +++ /dev/null @@ -1,1585 +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 char t1_getctxno_zc(int f, int orient); -static char t1_getctxno_sc(int f); -static INLINE int t1_getctxno_mag(int f); -static char t1_getspb(int f); -static short t1_getnmsedec_sig(int x, int bitpos); -static short t1_getnmsedec_ref(int x, int bitpos); -static void t1_updateflags(flag_t *flagsp, int s, int stride); -/** -Encode significant pass -*/ -static void t1_enc_sigpass_step( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int bpno, - int one, - int *nmsedec, - char type, - int vsc); -/** -Decode significant pass -*/ -static INLINE void t1_dec_sigpass_step_raw( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int oneplushalf, - int vsc); -static INLINE void t1_dec_sigpass_step_mqc( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int oneplushalf); -static INLINE void t1_dec_sigpass_step_mqc_vsc( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int oneplushalf, - int vsc); -/** -Encode significant pass -*/ -static void t1_enc_sigpass( - opj_t1_t *t1, - int bpno, - int orient, - int *nmsedec, - char type, - int cblksty); -/** -Decode significant pass -*/ -static void t1_dec_sigpass_raw( - opj_t1_t *t1, - int bpno, - int orient, - int cblksty); -static void t1_dec_sigpass_mqc( - opj_t1_t *t1, - int bpno, - int orient); -static void t1_dec_sigpass_mqc_vsc( - opj_t1_t *t1, - int bpno, - int orient); -/** -Encode refinement pass -*/ -static void t1_enc_refpass_step( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int bpno, - int one, - int *nmsedec, - char type, - int vsc); -/** -Decode refinement pass -*/ -static INLINE void t1_dec_refpass_step_raw( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int poshalf, - int neghalf, - int vsc); -static INLINE void t1_dec_refpass_step_mqc( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int poshalf, - int neghalf); -static INLINE void t1_dec_refpass_step_mqc_vsc( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int poshalf, - int neghalf, - int vsc); - -/** -Encode refinement pass -*/ -static void t1_enc_refpass( - opj_t1_t *t1, - int bpno, - int *nmsedec, - char type, - int cblksty); -/** -Decode refinement pass -*/ -static void t1_dec_refpass_raw( - opj_t1_t *t1, - int bpno, - int cblksty); -static void t1_dec_refpass_mqc( - opj_t1_t *t1, - int bpno); -static void t1_dec_refpass_mqc_vsc( - opj_t1_t *t1, - int bpno); -/** -Encode clean-up pass -*/ -static void t1_enc_clnpass_step( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int bpno, - int one, - int *nmsedec, - int partial, - int vsc); -/** -Decode clean-up pass -*/ -static void t1_dec_clnpass_step_partial( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int oneplushalf); -static void t1_dec_clnpass_step( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int oneplushalf); -static void t1_dec_clnpass_step_vsc( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int oneplushalf, - int partial, - int vsc); -/** -Encode clean-up pass -*/ -static void t1_enc_clnpass( - opj_t1_t *t1, - int bpno, - int orient, - int *nmsedec, - int cblksty); -/** -Decode clean-up pass -*/ -static void t1_dec_clnpass( - opj_t1_t *t1, - int bpno, - int orient, - int cblksty); -static double t1_getwmsedec( - int nmsedec, - int compno, - int level, - int orient, - int bpno, - int qmfbid, - double stepsize, - int numcomps, - int mct); -/** -Encode 1 code-block -@param t1 T1 handle -@param cblk Code-block coding parameters -@param orient -@param compno Component number -@param level -@param qmfbid -@param stepsize -@param cblksty Code-block style -@param numcomps -@param mct -@param tile -*/ -static void t1_encode_cblk( - opj_t1_t *t1, - opj_tcd_cblk_enc_t* cblk, - int orient, - int compno, - int level, - int qmfbid, - double stepsize, - int cblksty, - int numcomps, - int mct, - opj_tcd_tile_t * tile); -/** -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 void t1_decode_cblk( - opj_t1_t *t1, - opj_tcd_cblk_dec_t* cblk, - int orient, - int roishift, - int cblksty); - -/*@}*/ - -/*@}*/ - -/* ----------------------------------------------------------------------- */ - -static char t1_getctxno_zc(int f, int orient) { - return lut_ctxno_zc[(orient << 8) | (f & T1_SIG_OTH)]; -} - -static char t1_getctxno_sc(int f) { - return lut_ctxno_sc[(f & (T1_SIG_PRIM | T1_SGN)) >> 4]; -} - -static int t1_getctxno_mag(int f) { - int tmp1 = (f & T1_SIG_OTH) ? T1_CTXNO_MAG + 1 : T1_CTXNO_MAG; - int tmp2 = (f & T1_REFINE) ? T1_CTXNO_MAG + 2 : tmp1; - return (tmp2); -} - -static char t1_getspb(int f) { - return lut_spb[(f & (T1_SIG_PRIM | T1_SGN)) >> 4]; -} - -static short t1_getnmsedec_sig(int x, int 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)]; -} - -static short t1_getnmsedec_ref(int x, int 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)]; -} - -static void t1_updateflags(flag_t *flagsp, int s, int stride) { - flag_t *np = flagsp - stride; - flag_t *sp = flagsp + stride; - - static const 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; -} - -static void t1_enc_sigpass_step( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int bpno, - int one, - int *nmsedec, - char type, - int vsc) -{ - int 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))) { - v = int_abs(*datap) & one ? 1 : 0; - mqc_setcurctx(mqc, t1_getctxno_zc(flag, orient)); /* ESSAI */ - if (type == T1_TYPE_RAW) { /* BYPASS/LAZY MODE */ - mqc_bypass_enc(mqc, v); - } else { - mqc_encode(mqc, v); - } - if (v) { - v = *datap < 0 ? 1 : 0; - *nmsedec += t1_getnmsedec_sig(int_abs(*datap), bpno + T1_NMSEDEC_FRACBITS); - mqc_setcurctx(mqc, t1_getctxno_sc(flag)); /* ESSAI */ - if (type == T1_TYPE_RAW) { /* BYPASS/LAZY MODE */ - mqc_bypass_enc(mqc, v); - } else { - mqc_encode(mqc, v ^ t1_getspb(flag)); - } - t1_updateflags(flagsp, v, t1->flags_stride); - } - *flagsp |= T1_VISIT; - } -} - -static INLINE void t1_dec_sigpass_step_raw( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int oneplushalf, - int vsc) -{ - int 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 (raw_decode(raw)) { - v = raw_decode(raw); /* ESSAI */ - *datap = v ? -oneplushalf : oneplushalf; - t1_updateflags(flagsp, v, t1->flags_stride); - } - *flagsp |= T1_VISIT; - } -} /* VSC and BYPASS by Antonin */ - -static INLINE void t1_dec_sigpass_step_mqc( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int oneplushalf) -{ - int v, flag; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - flag = *flagsp; - if ((flag & T1_SIG_OTH) && !(flag & (T1_SIG | T1_VISIT))) { - mqc_setcurctx(mqc, t1_getctxno_zc(flag, orient)); - if (mqc_decode(mqc)) { - mqc_setcurctx(mqc, t1_getctxno_sc(flag)); - v = mqc_decode(mqc) ^ t1_getspb(flag); - *datap = v ? -oneplushalf : oneplushalf; - t1_updateflags(flagsp, v, t1->flags_stride); - } - *flagsp |= T1_VISIT; - } -} /* VSC and BYPASS by Antonin */ - -static INLINE void t1_dec_sigpass_step_mqc_vsc( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int oneplushalf, - int vsc) -{ - int 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))) { - mqc_setcurctx(mqc, t1_getctxno_zc(flag, orient)); - if (mqc_decode(mqc)) { - mqc_setcurctx(mqc, t1_getctxno_sc(flag)); - v = mqc_decode(mqc) ^ t1_getspb(flag); - *datap = v ? -oneplushalf : oneplushalf; - t1_updateflags(flagsp, v, t1->flags_stride); - } - *flagsp |= T1_VISIT; - } -} /* VSC and BYPASS by Antonin */ - -static void t1_enc_sigpass( - opj_t1_t *t1, - int bpno, - int orient, - int *nmsedec, - char type, - int cblksty) -{ - int i, j, k, one, vsc; - *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; - 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); - } - } - } -} - -static void t1_dec_sigpass_raw( - opj_t1_t *t1, - int bpno, - int orient, - int cblksty) -{ - int i, j, k, one, half, oneplushalf, vsc; - 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; - 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 */ - -static void t1_dec_sigpass_mqc( - opj_t1_t *t1, - int bpno, - int orient) -{ - int i, j, k, one, half, oneplushalf; - int *data1 = t1->data; - flag_t *flags1 = &t1->flags[1]; - one = 1 << bpno; - half = one >> 1; - oneplushalf = one | half; - for (k = 0; k < (t1->h & ~3); k += 4) { - for (i = 0; i < t1->w; ++i) { - int *data2 = data1 + i; - flag_t *flags2 = flags1 + i; - flags2 += t1->flags_stride; - t1_dec_sigpass_step_mqc(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - flags2 += t1->flags_stride; - t1_dec_sigpass_step_mqc(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - flags2 += t1->flags_stride; - t1_dec_sigpass_step_mqc(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - flags2 += t1->flags_stride; - 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) { - int *data2 = data1 + i; - flag_t *flags2 = flags1 + i; - for (j = k; j < t1->h; ++j) { - flags2 += t1->flags_stride; - t1_dec_sigpass_step_mqc(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - } - } -} /* VSC and BYPASS by Antonin */ - -static void t1_dec_sigpass_mqc_vsc( - opj_t1_t *t1, - int bpno, - int orient) -{ - int i, j, k, one, half, oneplushalf, vsc; - 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; - 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 */ - -static void t1_enc_refpass_step( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int bpno, - int one, - int *nmsedec, - char type, - int vsc) -{ - int 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 | T1_VISIT)) == T1_SIG) { - *nmsedec += t1_getnmsedec_ref(int_abs(*datap), bpno + T1_NMSEDEC_FRACBITS); - v = int_abs(*datap) & one ? 1 : 0; - mqc_setcurctx(mqc, t1_getctxno_mag(flag)); /* ESSAI */ - if (type == T1_TYPE_RAW) { /* BYPASS/LAZY MODE */ - mqc_bypass_enc(mqc, v); - } else { - mqc_encode(mqc, v); - } - *flagsp |= T1_REFINE; - } -} - -static INLINE void t1_dec_refpass_step_raw( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int poshalf, - int neghalf, - int vsc) -{ - int 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 = raw_decode(raw); - t = v ? poshalf : neghalf; - *datap += *datap < 0 ? -t : t; - *flagsp |= T1_REFINE; - } -} /* VSC and BYPASS by Antonin */ - -static INLINE void t1_dec_refpass_step_mqc( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int poshalf, - int neghalf) -{ - int v, t, flag; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - flag = *flagsp; - if ((flag & (T1_SIG | T1_VISIT)) == T1_SIG) { - mqc_setcurctx(mqc, t1_getctxno_mag(flag)); /* ESSAI */ - v = mqc_decode(mqc); - t = v ? poshalf : neghalf; - *datap += *datap < 0 ? -t : t; - *flagsp |= T1_REFINE; - } -} /* VSC and BYPASS by Antonin */ - -static INLINE void t1_dec_refpass_step_mqc_vsc( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int poshalf, - int neghalf, - int vsc) -{ - int 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) { - mqc_setcurctx(mqc, t1_getctxno_mag(flag)); /* ESSAI */ - v = mqc_decode(mqc); - t = v ? poshalf : neghalf; - *datap += *datap < 0 ? -t : t; - *flagsp |= T1_REFINE; - } -} /* VSC and BYPASS by Antonin */ - -static void t1_enc_refpass( - opj_t1_t *t1, - int bpno, - int *nmsedec, - char type, - int cblksty) -{ - int i, j, k, one, vsc; - *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; - 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); - } - } - } -} - -static void t1_dec_refpass_raw( - opj_t1_t *t1, - int bpno, - int cblksty) -{ - int i, j, k, one, poshalf, neghalf; - int 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; - 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 */ - -static void t1_dec_refpass_mqc( - opj_t1_t *t1, - int bpno) -{ - int i, j, k, one, poshalf, neghalf; - int *data1 = t1->data; - flag_t *flags1 = &t1->flags[1]; - one = 1 << bpno; - poshalf = one >> 1; - neghalf = bpno > 0 ? -poshalf : -1; - for (k = 0; k < (t1->h & ~3); k += 4) { - for (i = 0; i < t1->w; ++i) { - int *data2 = data1 + i; - flag_t *flags2 = flags1 + i; - flags2 += t1->flags_stride; - t1_dec_refpass_step_mqc(t1, flags2, data2, poshalf, neghalf); - data2 += t1->w; - flags2 += t1->flags_stride; - t1_dec_refpass_step_mqc(t1, flags2, data2, poshalf, neghalf); - data2 += t1->w; - flags2 += t1->flags_stride; - t1_dec_refpass_step_mqc(t1, flags2, data2, poshalf, neghalf); - data2 += t1->w; - flags2 += t1->flags_stride; - 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) { - int *data2 = data1 + i; - flag_t *flags2 = flags1 + i; - for (j = k; j < t1->h; ++j) { - flags2 += t1->flags_stride; - t1_dec_refpass_step_mqc(t1, flags2, data2, poshalf, neghalf); - data2 += t1->w; - } - } -} /* VSC and BYPASS by Antonin */ - -static void t1_dec_refpass_mqc_vsc( - opj_t1_t *t1, - int bpno) -{ - int i, j, k, one, poshalf, neghalf; - int 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; - 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 */ - -static void t1_enc_clnpass_step( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int bpno, - int one, - int *nmsedec, - int partial, - int vsc) -{ - int 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 (!(*flagsp & (T1_SIG | T1_VISIT))) { - mqc_setcurctx(mqc, t1_getctxno_zc(flag, orient)); - v = int_abs(*datap) & one ? 1 : 0; - mqc_encode(mqc, v); - if (v) { -LABEL_PARTIAL: - *nmsedec += t1_getnmsedec_sig(int_abs(*datap), bpno + T1_NMSEDEC_FRACBITS); - mqc_setcurctx(mqc, t1_getctxno_sc(flag)); - v = *datap < 0 ? 1 : 0; - mqc_encode(mqc, v ^ t1_getspb(flag)); - t1_updateflags(flagsp, v, t1->flags_stride); - } - } - *flagsp &= ~T1_VISIT; -} - -static void t1_dec_clnpass_step_partial( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int oneplushalf) -{ - int v, flag; - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - OPJ_ARG_NOT_USED(orient); - - flag = *flagsp; - mqc_setcurctx(mqc, t1_getctxno_sc(flag)); - v = mqc_decode(mqc) ^ t1_getspb(flag); - *datap = v ? -oneplushalf : oneplushalf; - t1_updateflags(flagsp, v, t1->flags_stride); - *flagsp &= ~T1_VISIT; -} /* VSC and BYPASS by Antonin */ - -static void t1_dec_clnpass_step( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int oneplushalf) -{ - int v, flag; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - flag = *flagsp; - if (!(flag & (T1_SIG | T1_VISIT))) { - mqc_setcurctx(mqc, t1_getctxno_zc(flag, orient)); - if (mqc_decode(mqc)) { - mqc_setcurctx(mqc, t1_getctxno_sc(flag)); - v = mqc_decode(mqc) ^ t1_getspb(flag); - *datap = v ? -oneplushalf : oneplushalf; - t1_updateflags(flagsp, v, t1->flags_stride); - } - } - *flagsp &= ~T1_VISIT; -} /* VSC and BYPASS by Antonin */ - -static void t1_dec_clnpass_step_vsc( - opj_t1_t *t1, - flag_t *flagsp, - int *datap, - int orient, - int oneplushalf, - int partial, - int vsc) -{ - int 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))) { - mqc_setcurctx(mqc, t1_getctxno_zc(flag, orient)); - if (mqc_decode(mqc)) { -LABEL_PARTIAL: - mqc_setcurctx(mqc, t1_getctxno_sc(flag)); - v = mqc_decode(mqc) ^ t1_getspb(flag); - *datap = v ? -oneplushalf : oneplushalf; - t1_updateflags(flagsp, v, t1->flags_stride); - } - } - *flagsp &= ~T1_VISIT; -} - -static void t1_enc_clnpass( - opj_t1_t *t1, - int bpno, - int orient, - int *nmsedec, - int cblksty) -{ - int i, j, k, one, 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 (int_abs(t1->data[((k + runlen)*t1->w) + i]) & one) - break; - } - mqc_setcurctx(mqc, T1_CTXNO_AGG); - mqc_encode(mqc, runlen != 4); - if (runlen == 4) { - continue; - } - mqc_setcurctx(mqc, T1_CTXNO_UNI); - mqc_encode(mqc, runlen >> 1); - 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; - 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 t1_dec_clnpass( - opj_t1_t *t1, - int bpno, - int orient, - int cblksty) -{ - int i, j, k, one, half, oneplushalf, agg, runlen, vsc; - int 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) { - mqc_setcurctx(mqc, T1_CTXNO_AGG); - if (!mqc_decode(mqc)) { - continue; - } - mqc_setcurctx(mqc, T1_CTXNO_UNI); - runlen = mqc_decode(mqc); - runlen = (runlen << 1) | mqc_decode(mqc); - } else { - runlen = 0; - } - for (j = k + runlen; j < k + 4 && j < t1->h; ++j) { - vsc = (j == k + 3 || j == t1->h - 1) ? 1 : 0; - 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 + runlen), - vsc); - } - } - } - } else { - int *data1 = t1->data; - flag_t *flags1 = &t1->flags[1]; - for (k = 0; k < (t1->h & ~3); k += 4) { - for (i = 0; i < t1->w; ++i) { - int *data2 = data1 + i; - 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) { - mqc_setcurctx(mqc, T1_CTXNO_AGG); - if (!mqc_decode(mqc)) { - continue; - } - mqc_setcurctx(mqc, T1_CTXNO_UNI); - runlen = mqc_decode(mqc); - runlen = (runlen << 1) | mqc_decode(mqc); - flags2 += runlen * t1->flags_stride; - data2 += runlen * t1->w; - for (j = k + runlen; j < k + 4 && j < t1->h; ++j) { - flags2 += t1->flags_stride; - if (agg && (j == k + runlen)) { - t1_dec_clnpass_step_partial(t1, flags2, data2, orient, oneplushalf); - } else { - t1_dec_clnpass_step(t1, flags2, data2, orient, oneplushalf); - } - data2 += t1->w; - } - } else { - flags2 += t1->flags_stride; - t1_dec_clnpass_step(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - flags2 += t1->flags_stride; - t1_dec_clnpass_step(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - flags2 += t1->flags_stride; - t1_dec_clnpass_step(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - flags2 += t1->flags_stride; - 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) { - int *data2 = data1 + i; - flag_t *flags2 = flags1 + i; - for (j = k; j < t1->h; ++j) { - flags2 += t1->flags_stride; - t1_dec_clnpass_step(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - } - } - } - - if (segsym) { - int v = 0; - mqc_setcurctx(mqc, T1_CTXNO_UNI); - v = mqc_decode(mqc); - v = (v << 1) | mqc_decode(mqc); - v = (v << 1) | mqc_decode(mqc); - v = (v << 1) | 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 double t1_getwmsedec( - int nmsedec, - int compno, - int level, - int orient, - int bpno, - int qmfbid, - double stepsize, - int numcomps, - int mct) -{ - double w1, w2, wmsedec; - if (qmfbid == 1) { - w1 = (mct && numcomps==3) ? mct_getnorm(compno) : 1.0; - w2 = dwt_getnorm(level, orient); - } else { /* if (qmfbid == 0) */ - w1 = (mct && numcomps==3) ? mct_getnorm_real(compno) : 1.0; - w2 = dwt_getnorm_real(level, orient); - } - wmsedec = w1 * w2 * stepsize * (1 << bpno); - wmsedec *= wmsedec * nmsedec / 8192.0; - - return wmsedec; -} - -static opj_bool allocate_buffers( - opj_t1_t *t1, - int w, - int h) -{ - int datasize=w * h; - int flagssize; - - if(datasize > t1->datasize){ - opj_aligned_free(t1->data); - t1->data = (int*) opj_aligned_malloc(datasize * sizeof(int)); - if(!t1->data){ - return OPJ_FALSE; - } - t1->datasize=datasize; - } - memset(t1->data,0,datasize * sizeof(int)); - - t1->flags_stride=w+2; - flagssize=t1->flags_stride * (h+2); - - if(flagssize > t1->flagssize){ - opj_aligned_free(t1->flags); - t1->flags = (flag_t*) opj_aligned_malloc(flagssize * sizeof(flag_t)); - if(!t1->flags){ - return OPJ_FALSE; - } - t1->flagssize=flagssize; - } - memset(t1->flags,0,flagssize * sizeof(flag_t)); - - t1->w=w; - t1->h=h; - - return OPJ_TRUE; -} - -/** mod fixed_quality */ -static void t1_encode_cblk( - opj_t1_t *t1, - opj_tcd_cblk_enc_t* cblk, - int orient, - int compno, - int level, - int qmfbid, - double stepsize, - int cblksty, - int numcomps, - int mct, - opj_tcd_tile_t * tile) -{ - double cumwmsedec = 0.0; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - int passno, bpno, passtype; - int nmsedec = 0; - int i, max; - char type = T1_TYPE_MQ; - double tempwmsedec; - - max = 0; - for (i = 0; i < t1->w * t1->h; ++i) { - int tmp = abs(t1->data[i]); - max = int_max(max, tmp); - } - - cblk->numbps = max ? (int_floorlog2(max) + 1) - T1_NMSEDEC_FRACBITS : 0; - - bpno = cblk->numbps - 1; - passtype = 2; - - mqc_resetstates(mqc); - mqc_setstate(mqc, T1_CTXNO_UNI, 0, 46); - mqc_setstate(mqc, T1_CTXNO_AGG, 0, 3); - mqc_setstate(mqc, T1_CTXNO_ZC, 0, 4); - mqc_init_enc(mqc, cblk->data); - - for (passno = 0; bpno >= 0; ++passno) { - opj_tcd_pass_t *pass = &cblk->passes[passno]; - int correction = 3; - type = ((bpno < (cblk->numbps - 4)) && (passtype < 2) && (cblksty & J2K_CCP_CBLKSTY_LAZY)) ? T1_TYPE_RAW : T1_TYPE_MQ; - - switch (passtype) { - case 0: - t1_enc_sigpass(t1, bpno, orient, &nmsedec, type, cblksty); - break; - case 1: - t1_enc_refpass(t1, bpno, &nmsedec, type, cblksty); - break; - case 2: - t1_enc_clnpass(t1, bpno, orient, &nmsedec, cblksty); - /* code switch SEGMARK (i.e. SEGSYM) */ - if (cblksty & J2K_CCP_CBLKSTY_SEGSYM) - mqc_segmark_enc(mqc); - break; - } - - /* fixed_quality */ - tempwmsedec = t1_getwmsedec(nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps, mct); - 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) { - mqc_flush(mqc); - correction = 1; - /* correction = mqc_bypass_flush_enc(); */ - } else { /* correction = mqc_restart_enc(); */ - mqc_flush(mqc); - correction = 1; - } - pass->term = 1; - } else { - if (((bpno < (cblk->numbps - 4) && (passtype > 0)) - || ((bpno == (cblk->numbps - 4)) && (passtype == 2))) && (cblksty & J2K_CCP_CBLKSTY_LAZY)) { - if (type == T1_TYPE_RAW) { - mqc_flush(mqc); - correction = 1; - /* correction = mqc_bypass_flush_enc(); */ - } else { /* correction = mqc_restart_enc(); */ - 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 < (cblk->numbps - 4)) && (passtype < 2) && (cblksty & J2K_CCP_CBLKSTY_LAZY)) ? T1_TYPE_RAW : T1_TYPE_MQ; - if (type == T1_TYPE_RAW) - mqc_bypass_init_enc(mqc); - else - mqc_restart_init_enc(mqc); - } - - pass->distortiondec = cumwmsedec; - pass->rate = mqc_numbytes(mqc) + correction; /* FIXME */ - - /* Code-switch "RESET" */ - if (cblksty & J2K_CCP_CBLKSTY_RESET) - mqc_reset_enc(mqc); - } - - /* Code switch "ERTERM" (i.e. PTERM) */ - if (cblksty & J2K_CCP_CBLKSTY_PTERM) - mqc_erterm_enc(mqc); - else /* Default coding */ if (!(cblksty & J2K_CCP_CBLKSTY_LAZY)) - mqc_flush(mqc); - - cblk->totalpasses = passno; - - for (passno = 0; passnototalpasses; passno++) { - opj_tcd_pass_t *pass = &cblk->passes[passno]; - if (pass->rate > mqc_numbytes(mqc)) - pass->rate = 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); - } -} - -static void t1_decode_cblk( - opj_t1_t *t1, - opj_tcd_cblk_dec_t* cblk, - int orient, - int roishift, - int cblksty) -{ - opj_raw_t *raw = t1->raw; /* RAW component */ - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - int bpno, passtype; - int segno, passno; - char type = T1_TYPE_MQ; /* BYPASS mode */ - - if(!allocate_buffers( - t1, - cblk->x1 - cblk->x0, - cblk->y1 - cblk->y0)) - { - return; - } - - bpno = roishift + cblk->numbps - 1; - passtype = 2; - - mqc_resetstates(mqc); - mqc_setstate(mqc, T1_CTXNO_UNI, 0, 46); - mqc_setstate(mqc, T1_CTXNO_AGG, 0, 3); - mqc_setstate(mqc, T1_CTXNO_ZC, 0, 4); - - for (segno = 0; segno < cblk->numsegs; ++segno) { - opj_tcd_seg_t *seg = &cblk->segs[segno]; - - /* BYPASS mode */ - type = ((bpno <= (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 == NULL){ - continue; - } - if (type == T1_TYPE_RAW) { - raw_init_dec(raw, (*seg->data) + seg->dataindex, seg->len); - } else { - mqc_init_dec(mqc, (*seg->data) + seg->dataindex, seg->len); - } - - for (passno = 0; passno < seg->numpasses; ++passno) { - switch (passtype) { - case 0: - if (type == T1_TYPE_RAW) { - t1_dec_sigpass_raw(t1, bpno+1, orient, cblksty); - } else { - if (cblksty & J2K_CCP_CBLKSTY_VSC) { - t1_dec_sigpass_mqc_vsc(t1, bpno+1, orient); - } else { - t1_dec_sigpass_mqc(t1, bpno+1, orient); - } - } - break; - case 1: - if (type == T1_TYPE_RAW) { - t1_dec_refpass_raw(t1, bpno+1, cblksty); - } else { - if (cblksty & J2K_CCP_CBLKSTY_VSC) { - t1_dec_refpass_mqc_vsc(t1, bpno+1); - } else { - t1_dec_refpass_mqc(t1, bpno+1); - } - } - break; - case 2: - t1_dec_clnpass(t1, bpno+1, orient, cblksty); - break; - } - - if ((cblksty & J2K_CCP_CBLKSTY_RESET) && type == T1_TYPE_MQ) { - mqc_resetstates(mqc); - mqc_setstate(mqc, T1_CTXNO_UNI, 0, 46); - mqc_setstate(mqc, T1_CTXNO_AGG, 0, 3); - mqc_setstate(mqc, T1_CTXNO_ZC, 0, 4); - } - if (++passtype == 3) { - passtype = 0; - bpno--; - } - } - } -} - -/* ----------------------------------------------------------------------- */ - -opj_t1_t* t1_create(opj_common_ptr cinfo) { - opj_t1_t *t1 = (opj_t1_t*) opj_malloc(sizeof(opj_t1_t)); - if(!t1) - return NULL; - - t1->cinfo = cinfo; - /* create MQC and RAW handles */ - t1->mqc = mqc_create(); - t1->raw = raw_create(); - - t1->data=NULL; - t1->flags=NULL; - t1->datasize=0; - t1->flagssize=0; - - return t1; -} - -void t1_destroy(opj_t1_t *t1) { - if(t1) { - /* destroy MQC and RAW handles */ - mqc_destroy(t1->mqc); - raw_destroy(t1->raw); - opj_aligned_free(t1->data); - opj_aligned_free(t1->flags); - opj_free(t1); - } -} - -void t1_encode_cblks( - opj_t1_t *t1, - opj_tcd_tile_t *tile, - opj_tcp_t *tcp) -{ - int 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]; - int tile_w = 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]; - int bandconst = 8192 * 8192 / ((int) 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]; - int* restrict datap; - int* restrict tiledp; - int cblk_w; - int cblk_h; - int i, j; - - int x = cblk->x0 - band->x0; - int 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(!allocate_buffers( - t1, - cblk->x1 - cblk->x0, - cblk->y1 - cblk->y0)) - { - return; - } - - datap=t1->data; - cblk_w = t1->w; - cblk_h = t1->h; - - tiledp=&tilec->data[(y * tile_w) + x]; - if (tccp->qmfbid == 1) { - for (j = 0; j < cblk_h; ++j) { - for (i = 0; i < cblk_w; ++i) { - int 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) { - int tmp = tiledp[(j * tile_w) + i]; - datap[(j * cblk_w) + i] = - fix_mul( - tmp, - bandconst) >> (11 - T1_NMSEDEC_FRACBITS); - } - } - } - - t1_encode_cblk( - t1, - cblk, - band->bandno, - compno, - tilec->numresolutions - 1 - resno, - tccp->qmfbid, - band->stepsize, - tccp->cblksty, - tile->numcomps, - tcp->mct, - tile); - - } /* cblkno */ - } /* precno */ - } /* bandno */ - } /* resno */ - } /* compno */ -} - -void t1_decode_cblks( - opj_t1_t* t1, - opj_tcd_tilecomp_t* tilec, - opj_tccp_t* tccp) -{ - int resno, bandno, precno, cblkno; - - int tile_w = 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]; - - 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]; - int* restrict datap; - int cblk_w, cblk_h; - int x, y; - int i, j; - - t1_decode_cblk( - t1, - cblk, - band->bandno, - tccp->roishift, - tccp->cblksty); - - 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) { - int thresh = 1 << tccp->roishift; - for (j = 0; j < cblk_h; ++j) { - for (i = 0; i < cblk_w; ++i) { - int val = datap[(j * cblk_w) + i]; - int mag = abs(val); - if (mag >= thresh) { - mag >>= tccp->roishift; - datap[(j * cblk_w) + i] = val < 0 ? -mag : mag; - } - } - } - } - - if (tccp->qmfbid == 1) { - int* restrict tiledp = &tilec->data[(y * tile_w) + x]; - for (j = 0; j < cblk_h; ++j) { - for (i = 0; i < cblk_w; ++i) { - int tmp = datap[(j * cblk_w) + i]; - ((int*)tiledp)[(j * tile_w) + i] = tmp / 2; - } - } - } else { /* if (tccp->qmfbid == 0) */ - float* restrict tiledp = (float*) &tilec->data[(y * tile_w) + x]; - for (j = 0; j < cblk_h; ++j) { - float* restrict tiledp2 = tiledp; - for (i = 0; i < cblk_w; ++i) { - float tmp = *datap * band->stepsize; - *tiledp2 = tmp; - datap++; - tiledp2++; - } - tiledp += tile_w; - } - } - opj_free(cblk->data); - opj_free(cblk->segs); - } /* cblkno */ - opj_free(precinct->cblks.dec); - precinct->cblks.dec = NULL; - } /* precno */ - } /* bandno */ - } /* resno */ -} - diff --git a/Source/LibOpenJPEG/t1.h b/Source/LibOpenJPEG/t1.h deleted file mode 100644 index 572ec88..0000000 --- a/Source/LibOpenJPEG/t1.h +++ /dev/null @@ -1,147 +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 short flag_t; - -/** -Tier-1 coding (coding of code-block coefficients) -*/ -typedef struct opj_t1 { - /** codec context */ - opj_common_ptr cinfo; - - /** MQC component */ - opj_mqc_t *mqc; - /** RAW component */ - opj_raw_t *raw; - - int *data; - flag_t *flags; - int w; - int h; - int datasize; - int flagssize; - int flags_stride; -} opj_t1_t; - -#define MACRO_t1_flags(x,y) t1->flags[((x)*(t1->flags_stride))+(y)] - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** -Create a new T1 handle -and initialize the look-up tables of the Tier-1 coder/decoder -@return Returns a new T1 handle if successful, returns NULL otherwise -@see t1_init_luts -*/ -opj_t1_t* t1_create(opj_common_ptr cinfo); -/** -Destroy a previously created T1 handle -@param t1 T1 handle to destroy -*/ -void t1_destroy(opj_t1_t *t1); -/** -Encode the code-blocks of a tile -@param t1 T1 handle -@param tile The tile to encode -@param tcp Tile coding parameters -*/ -void t1_encode_cblks(opj_t1_t *t1, opj_tcd_tile_t *tile, opj_tcp_t *tcp); -/** -Decode the code-blocks of a tile -@param t1 T1 handle -@param tilec The tile to decode -@param tccp Tile coding parameters -*/ -void t1_decode_cblks(opj_t1_t* t1, opj_tcd_tilecomp_t* tilec, opj_tccp_t* tccp); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __T1_H */ diff --git a/Source/LibOpenJPEG/t1_generate_luts.c b/Source/LibOpenJPEG/t1_generate_luts.c deleted file mode 100644 index 3988041..0000000 --- a/Source/LibOpenJPEG/t1_generate_luts.c +++ /dev/null @@ -1,275 +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 - -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 = int_min(((f & (T1_SIG_E | T1_SGN_E)) == - T1_SIG_E) + ((f & (T1_SIG_W | T1_SGN_W)) == T1_SIG_W), - 1) - 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 = int_min(((f & (T1_SIG_N | T1_SGN_N)) == - T1_SIG_N) + ((f & (T1_SIG_S | T1_SGN_S)) == T1_SIG_S), - 1) - 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 = int_min(((f & (T1_SIG_E | T1_SGN_E)) == - T1_SIG_E) + ((f & (T1_SIG_W | T1_SGN_W)) == T1_SIG_W), - 1) - 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 = int_min(((f & (T1_SIG_N | T1_SGN_N)) == - T1_SIG_N) + ((f & (T1_SIG_S | T1_SGN_S)) == T1_SIG_S), - 1) - 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; -} - -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 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]; - - 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 char 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 char 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 char 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] = - 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] = - 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] = - 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] = - int_max(0, - (int) (floor((u * u) * pow(2, T1_NMSEDEC_FRACBITS) + 0.5) / pow(2, T1_NMSEDEC_FRACBITS) * 8192.0)); - } - - printf("static short lut_nmsedec_sig[1 << T1_NMSEDEC_BITS] = {\n "); - dump_array16(lut_nmsedec_sig, 1 << T1_NMSEDEC_BITS); - - printf("static short lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS] = {\n "); - dump_array16(lut_nmsedec_sig0, 1 << T1_NMSEDEC_BITS); - - printf("static short lut_nmsedec_ref[1 << T1_NMSEDEC_BITS] = {\n "); - dump_array16(lut_nmsedec_ref, 1 << T1_NMSEDEC_BITS); - - printf("static short lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS] = {\n "); - dump_array16(lut_nmsedec_ref0, 1 << T1_NMSEDEC_BITS); - - return 0; -} diff --git a/Source/LibOpenJPEG/t1_luts.h b/Source/LibOpenJPEG/t1_luts.h deleted file mode 100644 index e5e33f6..0000000 --- a/Source/LibOpenJPEG/t1_luts.h +++ /dev/null @@ -1,143 +0,0 @@ -/* This file was automatically generated by t1_generate_luts.c */ - -static char 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 char 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 char 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 short 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 short 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 short 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 short 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/Source/LibOpenJPEG/t2.c b/Source/LibOpenJPEG/t2.c deleted file mode 100644 index cae29f0..0000000 --- a/Source/LibOpenJPEG/t2.c +++ /dev/null @@ -1,822 +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 T2 T2 - Implementation of a tier-2 coding */ -/*@{*/ - -/** @name Local static functions */ -/*@{*/ - -static void t2_putcommacode(opj_bio_t *bio, int n); -static int 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 t2_putnumpasses(opj_bio_t *bio, int n); -static int t2_getnumpasses(opj_bio_t *bio); -/** -Encode a packet of a tile to a destination buffer -@param tile Tile for which to write the packets -@param tcp Tile coding parameters -@param pi Packet identity -@param dest Destination buffer -@param len Length of the destination buffer -@param cstr_info Codestream information structure -@param tileno Number of the tile encoded -@return -*/ -static int t2_encode_packet(opj_tcd_tile_t *tile, opj_tcp_t *tcp, opj_pi_iterator_t *pi, unsigned char *dest, int len, opj_codestream_info_t *cstr_info, int tileno); -/** -@param cblk -@param index -@param cblksty -@param first -*/ -static opj_bool t2_init_seg(opj_tcd_cblk_dec_t* cblk, int index, int cblksty, int first); -/** -Decode a packet of a tile from a source buffer -@param t2 T2 handle -@param src Source buffer -@param len Length of the source buffer -@param tile Tile for which to write the packets -@param tcp Tile coding parameters -@param pi Packet identity -@param pack_info Packet information -@return -*/ -static int t2_decode_packet(opj_t2_t* t2, unsigned char *src, int len, opj_tcd_tile_t *tile, - opj_tcp_t *tcp, opj_pi_iterator_t *pi, opj_packet_info_t *pack_info); - -/*@}*/ - -/*@}*/ - -/* ----------------------------------------------------------------------- */ - -/* #define RESTART 0x04 */ - -static void t2_putcommacode(opj_bio_t *bio, int n) { - while (--n >= 0) { - bio_write(bio, 1, 1); - } - bio_write(bio, 0, 1); -} - -static int t2_getcommacode(opj_bio_t *bio) { - int n; - for (n = 0; bio_read(bio, 1); n++) { - ; - } - return n; -} - -static void t2_putnumpasses(opj_bio_t *bio, int n) { - if (n == 1) { - bio_write(bio, 0, 1); - } else if (n == 2) { - bio_write(bio, 2, 2); - } else if (n <= 5) { - bio_write(bio, 0xc | (n - 3), 4); - } else if (n <= 36) { - bio_write(bio, 0x1e0 | (n - 6), 9); - } else if (n <= 164) { - bio_write(bio, 0xff80 | (n - 37), 16); - } -} - -static int t2_getnumpasses(opj_bio_t *bio) { - int n; - if (!bio_read(bio, 1)) - return 1; - if (!bio_read(bio, 1)) - return 2; - if ((n = bio_read(bio, 2)) != 3) - return (3 + n); - if ((n = bio_read(bio, 5)) != 31) - return (6 + n); - return (37 + bio_read(bio, 7)); -} - -static int t2_encode_packet(opj_tcd_tile_t * tile, opj_tcp_t * tcp, opj_pi_iterator_t *pi, unsigned char *dest, int length, opj_codestream_info_t *cstr_info, int tileno) { - int bandno, cblkno; - unsigned char *c = dest; - - int compno = pi->compno; /* component value */ - int resno = pi->resno; /* resolution level value */ - int precno = pi->precno; /* precinct value */ - int layno = pi->layno; /* quality layer value */ - - opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; - opj_tcd_resolution_t *res = &tilec->resolutions[resno]; - - opj_bio_t *bio = NULL; /* BIO component */ - - /* */ - if (tcp->csty & J2K_CP_CSTY_SOP) { - c[0] = 255; - c[1] = 145; - c[2] = 0; - c[3] = 4; - c[4] = (unsigned char)((tile->packno % 65536) / 256); - c[5] = (unsigned char)((tile->packno % 65536) % 256); - c += 6; - } - /* */ - - if (!layno) { - for (bandno = 0; bandno < res->numbands; bandno++) { - opj_tcd_band_t *band = &res->bands[bandno]; - opj_tcd_precinct_t *prc = &band->precincts[precno]; - tgt_reset(prc->incltree); - tgt_reset(prc->imsbtree); - for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { - opj_tcd_cblk_enc_t* cblk = &prc->cblks.enc[cblkno]; - cblk->numpasses = 0; - tgt_setvalue(prc->imsbtree, cblkno, band->numbps - cblk->numbps); - } - } - } - - bio = bio_create(); - bio_init_enc(bio, c, length); - bio_write(bio, 1, 1); /* Empty header bit */ - - /* Writing Packet header */ - for (bandno = 0; bandno < res->numbands; bandno++) { - opj_tcd_band_t *band = &res->bands[bandno]; - 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]; - if (!cblk->numpasses && layer->numpasses) { - tgt_setvalue(prc->incltree, cblkno, layno); - } - } - 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]; - int increment = 0; - int nump = 0; - int len = 0, passno; - /* cblk inclusion bits */ - if (!cblk->numpasses) { - tgt_encode(bio, prc->incltree, cblkno, layno + 1); - } else { - bio_write(bio, layer->numpasses != 0, 1); - } - /* if cblk not included, go to the next cblk */ - if (!layer->numpasses) { - continue; - } - /* if first instance of cblk --> zero bit-planes information */ - if (!cblk->numpasses) { - cblk->numlenbits = 3; - tgt_encode(bio, prc->imsbtree, cblkno, 999); - } - /* number of coding passes included */ - t2_putnumpasses(bio, layer->numpasses); - - /* computation of the increase of the length indicator and insertion in the header */ - for (passno = cblk->numpasses; passno < cblk->numpasses + layer->numpasses; passno++) { - opj_tcd_pass_t *pass = &cblk->passes[passno]; - nump++; - len += pass->len; - if (pass->term || passno == (cblk->numpasses + layer->numpasses) - 1) { - increment = int_max(increment, int_floorlog2(len) + 1 - (cblk->numlenbits + int_floorlog2(nump))); - len = 0; - nump = 0; - } - } - t2_putcommacode(bio, increment); - - /* computation of the new Length indicator */ - cblk->numlenbits += increment; - - /* insertion of the codeword segment length */ - for (passno = cblk->numpasses; passno < cblk->numpasses + layer->numpasses; passno++) { - opj_tcd_pass_t *pass = &cblk->passes[passno]; - nump++; - len += pass->len; - if (pass->term || passno == (cblk->numpasses + layer->numpasses) - 1) { - bio_write(bio, len, cblk->numlenbits + int_floorlog2(nump)); - len = 0; - nump = 0; - } - } - } - } - - if (bio_flush(bio)) { - bio_destroy(bio); - return -999; /* modified to eliminate longjmp !! */ - } - - c += bio_numbytes(bio); - bio_destroy(bio); - - /* */ - if (tcp->csty & J2K_CP_CSTY_EPH) { - c[0] = 255; - c[1] = 146; - c += 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 = (int)(c - dest); - } - /* INDEX >> */ - - /* Writing the packet body */ - - for (bandno = 0; bandno < res->numbands; bandno++) { - opj_tcd_band_t *band = &res->bands[bandno]; - 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]; - if (!layer->numpasses) { - continue; - } - if (c + layer->len > dest + length) { - return -999; - } - - memcpy(c, layer->data, layer->len); - cblk->numpasses += layer->numpasses; - c += 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; - } - } - /* INDEX >> */ - } - } - - return (c - dest); -} - -static opj_bool t2_init_seg(opj_tcd_cblk_dec_t* cblk, int index, int cblksty, int first) { - opj_tcd_seg_t* seg; - opj_tcd_seg_t* segs; - segs = (opj_tcd_seg_t*) opj_realloc(cblk->segs, (index + 1) * sizeof(opj_tcd_seg_t)); - - if (segs == NULL) - { - return OPJ_FALSE; - } - cblk->segs = segs; - - seg = &cblk->segs[index]; - seg->data = NULL; - seg->dataindex = 0; - seg->numpasses = 0; - seg->len = 0; - 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; -} - -static int t2_decode_packet(opj_t2_t* t2, unsigned char *src, int len, opj_tcd_tile_t *tile, - opj_tcp_t *tcp, opj_pi_iterator_t *pi, opj_packet_info_t *pack_info) { - int bandno, cblkno; - unsigned char *c = src; - - opj_cp_t *cp = t2->cp; - - int compno = pi->compno; /* component value */ - int resno = pi->resno; /* resolution level value */ - int precno = pi->precno; /* precinct value */ - int layno = pi->layno; /* quality layer value */ - - opj_tcd_resolution_t* res = &tile->comps[compno].resolutions[resno]; - - unsigned char *hd = NULL; - int present; - - opj_bio_t *bio = NULL; /* BIO component */ - - if (layno == 0) { - for (bandno = 0; bandno < res->numbands; bandno++) { - opj_tcd_band_t *band = &res->bands[bandno]; - opj_tcd_precinct_t *prc = &band->precincts[precno]; - - if ((band->x1-band->x0 == 0)||(band->y1-band->y0 == 0)) continue; - - tgt_reset(prc->incltree); - tgt_reset(prc->imsbtree); - for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { - opj_tcd_cblk_dec_t* cblk = &prc->cblks.dec[cblkno]; - cblk->numsegs = 0; - } - } - } - - /* SOP markers */ - - if (tcp->csty & J2K_CP_CSTY_SOP) { - if ((*c) != 0xff || (*(c + 1) != 0x91)) { - opj_event_msg(t2->cinfo, EVT_WARNING, "Expected SOP marker\n"); - } else { - c += 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 - */ - - bio = bio_create(); - - if (cp->ppm == 1) { /* PPM */ - hd = cp->ppm_data; - bio_init_dec(bio, hd, cp->ppm_len); - } else if (tcp->ppt == 1) { /* PPT */ - hd = tcp->ppt_data; - bio_init_dec(bio, hd, tcp->ppt_len); - } else { /* Normal Case */ - hd = c; - bio_init_dec(bio, hd, src+len-hd); - } - - present = bio_read(bio, 1); - - if (!present) { - bio_inalign(bio); - hd += bio_numbytes(bio); - bio_destroy(bio); - - /* EPH markers */ - - if (tcp->csty & J2K_CP_CSTY_EPH) { - if ((*hd) != 0xff || (*(hd + 1) != 0x92)) { - printf("Error : expected EPH marker\n"); - } else { - hd += 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(pack_info) { - pack_info->end_ph_pos = (int)(c - src); - } - /* INDEX >> */ - - if (cp->ppm == 1) { /* PPM case */ - cp->ppm_len += cp->ppm_data-hd; - cp->ppm_data = hd; - return (c - src); - } - if (tcp->ppt == 1) { /* PPT case */ - tcp->ppt_len+=tcp->ppt_data-hd; - tcp->ppt_data = hd; - return (c - src); - } - - return (hd - src); - } - - for (bandno = 0; bandno < res->numbands; bandno++) { - opj_tcd_band_t *band = &res->bands[bandno]; - opj_tcd_precinct_t *prc = &band->precincts[precno]; - - if ((band->x1-band->x0 == 0)||(band->y1-band->y0 == 0)) continue; - - for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { - int included, increment, n, segno; - opj_tcd_cblk_dec_t* cblk = &prc->cblks.dec[cblkno]; - /* if cblk not yet included before --> inclusion tagtree */ - if (!cblk->numsegs) { - included = tgt_decode(bio, prc->incltree, cblkno, layno + 1); - /* else one bit */ - } else { - included = bio_read(bio, 1); - } - /* if cblk not included */ - if (!included) { - cblk->numnewpasses = 0; - continue; - } - /* if cblk not yet included --> zero-bitplane tagtree */ - if (!cblk->numsegs) { - int i, numimsbs; - for (i = 0; !tgt_decode(bio, prc->imsbtree, cblkno, i); i++) { - ; - } - numimsbs = i - 1; - cblk->numbps = band->numbps - numimsbs; - cblk->numlenbits = 3; - } - /* number of coding passes */ - cblk->numnewpasses = t2_getnumpasses(bio); - increment = t2_getcommacode(bio); - /* length indicator increment */ - cblk->numlenbits += increment; - segno = 0; - if (!cblk->numsegs) { - if (!t2_init_seg(cblk, segno, tcp->tccps[compno].cblksty, 1)) - { - opj_event_msg(t2->cinfo, EVT_ERROR, "Out of memory\n"); - bio_destroy(bio); - return -999; - } - } else { - segno = cblk->numsegs - 1; - if (cblk->segs[segno].numpasses == cblk->segs[segno].maxpasses) { - ++segno; - if (!t2_init_seg(cblk, segno, tcp->tccps[compno].cblksty, 0)) - { - opj_event_msg(t2->cinfo, EVT_ERROR, "Out of memory\n"); - bio_destroy(bio); - return -999; - } - } - } - n = cblk->numnewpasses; - - do { - cblk->segs[segno].numnewpasses = int_min(cblk->segs[segno].maxpasses - cblk->segs[segno].numpasses, n); - cblk->segs[segno].newlen = bio_read(bio, cblk->numlenbits + int_floorlog2(cblk->segs[segno].numnewpasses)); - n -= cblk->segs[segno].numnewpasses; - if (n > 0) { - ++segno; - if (!t2_init_seg(cblk, segno, tcp->tccps[compno].cblksty, 0)) - { - opj_event_msg(t2->cinfo, EVT_ERROR, "Out of memory\n"); - bio_destroy(bio); - return -999; - } - } - } while (n > 0); - } - } - - if (bio_inalign(bio)) { - bio_destroy(bio); - return -999; - } - - hd += bio_numbytes(bio); - bio_destroy(bio); - - /* EPH markers */ - if (tcp->csty & J2K_CP_CSTY_EPH) { - if ((*hd) != 0xff || (*(hd + 1) != 0x92)) { - opj_event_msg(t2->cinfo, EVT_ERROR, "Expected EPH marker\n"); - return -999; - } else { - hd += 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(pack_info) { - pack_info->end_ph_pos = (int)(hd - src); - } - /* INDEX >> */ - - if (cp->ppm==1) { - cp->ppm_len+=cp->ppm_data-hd; - cp->ppm_data = hd; - } else if (tcp->ppt == 1) { - tcp->ppt_len+=tcp->ppt_data-hd; - tcp->ppt_data = hd; - } else { - c=hd; - } - - for (bandno = 0; bandno < res->numbands; bandno++) { - opj_tcd_band_t *band = &res->bands[bandno]; - opj_tcd_precinct_t *prc = &band->precincts[precno]; - - if ((band->x1-band->x0 == 0)||(band->y1-band->y0 == 0)) continue; - - for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { - opj_tcd_cblk_dec_t* cblk = &prc->cblks.dec[cblkno]; - opj_tcd_seg_t *seg = NULL; - if (!cblk->numnewpasses) - continue; - if (!cblk->numsegs) { - seg = &cblk->segs[0]; - cblk->numsegs++; - cblk->len = 0; - } else { - seg = &cblk->segs[cblk->numsegs - 1]; - if (seg->numpasses == seg->maxpasses) { - seg++; - cblk->numsegs++; - } - } - - do { - if (c + seg->newlen > src + len) { - return -999; - } - -#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 ((cblk->len + seg->newlen) > 8192) { - opj_event_msg(t2->cinfo, EVT_WARNING, - "JPWL: segment too long (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", - seg->newlen, cblkno, precno, bandno, resno, compno); - if (!JPWL_ASSUME) { - opj_event_msg(t2->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return -999; - } - seg->newlen = 8192 - cblk->len; - opj_event_msg(t2->cinfo, EVT_WARNING, " - truncating segment to %d\n", seg->newlen); - break; - }; - -#endif /* USE_JPWL */ - - cblk->data = (unsigned char*) opj_realloc(cblk->data, (cblk->len + seg->newlen) * sizeof(unsigned char)); - memcpy(cblk->data + cblk->len, c, seg->newlen); - if (seg->numpasses == 0) { - seg->data = &cblk->data; - seg->dataindex = cblk->len; - } - c += seg->newlen; - cblk->len += seg->newlen; - seg->len += seg->newlen; - seg->numpasses += seg->numnewpasses; - cblk->numnewpasses -= seg->numnewpasses; - if (cblk->numnewpasses > 0) { - seg++; - cblk->numsegs++; - } - } while (cblk->numnewpasses > 0); - } - } - - return (c - src); -} - -/* ----------------------------------------------------------------------- */ - -int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlayers, unsigned char *dest, int len, opj_codestream_info_t *cstr_info,int tpnum, int tppos,int pino, J2K_T2_MODE t2_mode, int cur_totnum_tp){ - unsigned char *c = dest; - int e = 0; - int compno; - opj_pi_iterator_t *pi = NULL; - int poc; - opj_image_t *image = t2->image; - opj_cp_t *cp = t2->cp; - opj_tcp_t *tcp = &cp->tcps[tileno]; - int pocno = cp->cinema == CINEMA4K_24? 2: 1; - int maxcomp = cp->max_comp_size > 0 ? image->numcomps : 1; - - pi = pi_initialise_encode(image, cp, tileno, t2_mode); - if(!pi) { - /* TODO: throw an error */ - return -999; - } - - if(t2_mode == THRESH_CALC ){ /* Calculating threshold */ - for(compno = 0; compno < maxcomp; compno++ ){ - for(poc = 0; poc < pocno ; poc++){ - int comp_len = 0; - int tpnum = compno; - if (pi_create_encode(pi, cp,tileno,poc,tpnum,tppos,t2_mode,cur_totnum_tp)) { - opj_event_msg(t2->cinfo, EVT_ERROR, "Error initializing Packet Iterator\n"); - pi_destroy(pi, cp, tileno); - return -999; - } - while (pi_next(&pi[poc])) { - if (pi[poc].layno < maxlayers) { - e = t2_encode_packet(tile, &cp->tcps[tileno], &pi[poc], c, dest + len - c, cstr_info, tileno); - comp_len = comp_len + e; - if (e == -999) { - break; - } else { - c += e; - } - } - } - if (e == -999) break; - if (cp->max_comp_size){ - if (comp_len > cp->max_comp_size){ - e = -999; - break; - } - } - } - if (e == -999) break; - } - }else{ /* t2_mode == FINAL_PASS */ - pi_create_encode(pi, cp,tileno,pino,tpnum,tppos,t2_mode,cur_totnum_tp); - while (pi_next(&pi[pino])) { - if (pi[pino].layno < maxlayers) { - e = t2_encode_packet(tile, &cp->tcps[tileno], &pi[pino], c, dest + len - c, cstr_info, tileno); - if (e == -999) { - break; - } else { - c += e; - } - /* INDEX >> */ - if(cstr_info) { - if(cstr_info->index_write) { - opj_tile_info_t *info_TL = &cstr_info->tile[tileno]; - 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 = ((cp->tp_on | 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 + e - 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 */ - tile->packno++; - } - } - } - - pi_destroy(pi, cp, tileno); - - if (e == -999) { - return e; - } - - return (c - dest); -} - -int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno, opj_tcd_tile_t *tile, opj_codestream_info_t *cstr_info) { - unsigned char *c = src; - opj_pi_iterator_t *pi; - int pino, e = 0; - int n = 0, curtp = 0; - int tp_start_packno; - - opj_image_t *image = t2->image; - opj_cp_t *cp = t2->cp; - - /* create a packet iterator */ - pi = pi_create_decode(image, cp, tileno); - if(!pi) { - /* TODO: throw an error */ - return -999; - } - - tp_start_packno = 0; - - for (pino = 0; pino <= cp->tcps[tileno].numpocs; pino++) { - while (pi_next(&pi[pino])) { - if ((cp->layer==0) || (cp->layer>=((pi[pino].layno)+1))) { - opj_packet_info_t *pack_info; - if (cstr_info) - pack_info = &cstr_info->tile[tileno].packet[cstr_info->packno]; - else - pack_info = NULL; - e = t2_decode_packet(t2, c, src + len - c, tile, &cp->tcps[tileno], &pi[pino], pack_info); - } else { - e = 0; - } - if(e == -999) - { - pi_destroy(pi, cp, tileno); - return -999; - } - /* progression in resolution */ - image->comps[pi[pino].compno].resno_decoded = - (e > 0) ? - int_max(pi[pino].resno, image->comps[pi[pino].compno].resno_decoded) - : image->comps[pi[pino].compno].resno_decoded; - n++; - - /* INDEX >> */ - if(cstr_info) { - opj_tile_info_t *info_TL = &cstr_info->tile[tileno]; - 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 if (info_TL->packet[cstr_info->packno-1].end_pos >= (int)cstr_info->tile[tileno].tp[curtp].tp_end_pos){ /* New tile part*/ - info_TL->tp[curtp].tp_numpacks = cstr_info->packno - tp_start_packno; /* Number of packets in previous tile-part*/ - info_TL->tp[curtp].tp_start_pack = tp_start_packno; - tp_start_packno = cstr_info->packno; - curtp++; - info_PK->start_pos = cstr_info->tile[tileno].tp[curtp].tp_end_header+1; - } else { - info_PK->start_pos = (cp->tp_on && 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 + e - 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 */ - - if (e == -999) { /* ADD */ - break; - } else { - c += e; - } - } - } - /* INDEX >> */ - if(cstr_info) { - cstr_info->tile[tileno].tp[curtp].tp_numpacks = cstr_info->packno - tp_start_packno; /* Number of packets in last tile-part*/ - cstr_info->tile[tileno].tp[curtp].tp_start_pack = tp_start_packno; - } - /* << INDEX */ - - /* don't forget to release pi */ - pi_destroy(pi, cp, tileno); - - if (e == -999) { - return e; - } - - return (c - src); -} - -/* ----------------------------------------------------------------------- */ - -opj_t2_t* t2_create(opj_common_ptr cinfo, opj_image_t *image, opj_cp_t *cp) { - /* create the tcd structure */ - opj_t2_t *t2 = (opj_t2_t*)opj_malloc(sizeof(opj_t2_t)); - if(!t2) return NULL; - t2->cinfo = cinfo; - t2->image = image; - t2->cp = cp; - - return t2; -} - -void t2_destroy(opj_t2_t *t2) { - if(t2) { - opj_free(t2); - } -} - - - - - diff --git a/Source/LibOpenJPEG/t2.h b/Source/LibOpenJPEG/t2.h deleted file mode 100644 index 2151ba6..0000000 --- a/Source/LibOpenJPEG/t2.h +++ /dev/null @@ -1,105 +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 __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 { - /** codec context */ - opj_common_ptr cinfo; - - /** 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 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 -@param t2_mode If == 0 In Threshold calculation ,If == 1 Final pass -@param cur_totnum_tp The total number of tile parts in the current tile -*/ -int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlayers, unsigned char *dest, int len, opj_codestream_info_t *cstr_info,int tpnum, int tppos,int pino,J2K_T2_MODE t2_mode,int cur_totnum_tp); -/** -Decode the packets of a tile from a source buffer -@param t2 T2 handle -@param src the source buffer -@param len length of the source buffer -@param tileno number that identifies the tile for which to decode the packets -@param tile tile for which to decode the packets -@param cstr_info Codestream information structure - */ -int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno, opj_tcd_tile_t *tile, opj_codestream_info_t *cstr_info); - -/** -Create a T2 handle -@param cinfo Codec context info -@param image Source or destination image -@param cp Image coding parameters -@return Returns a new T2 handle if successful, returns NULL otherwise -*/ -opj_t2_t* t2_create(opj_common_ptr cinfo, opj_image_t *image, opj_cp_t *cp); -/** -Destroy a T2 handle -@param t2 T2 handle to destroy -*/ -void t2_destroy(opj_t2_t *t2); - -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __T2_H */ diff --git a/Source/LibOpenJPEG/tcd.c b/Source/LibOpenJPEG/tcd.c deleted file mode 100644 index ee05205..0000000 --- a/Source/LibOpenJPEG/tcd.c +++ /dev/null @@ -1,1574 +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. - */ - -#define _ISOC99_SOURCE /* lrintf is C99 */ -#include "opj_includes.h" - -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"); -} - -/* ----------------------------------------------------------------------- */ - -/** -Create a new TCD handle -*/ -opj_tcd_t* tcd_create(opj_common_ptr cinfo) { - /* create the tcd structure */ - opj_tcd_t *tcd = (opj_tcd_t*)opj_malloc(sizeof(opj_tcd_t)); - if(!tcd) return NULL; - tcd->cinfo = cinfo; - tcd->tcd_image = (opj_tcd_image_t*)opj_malloc(sizeof(opj_tcd_image_t)); - if(!tcd->tcd_image) { - opj_free(tcd); - return NULL; - } - - return tcd; -} - -/** -Destroy a previously created TCD handle -*/ -void tcd_destroy(opj_tcd_t *tcd) { - if(tcd) { - opj_free(tcd->tcd_image); - opj_free(tcd); - } -} - -/* ----------------------------------------------------------------------- */ - -void tcd_malloc_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int curtileno) { - int tileno, compno, resno, bandno, precno, cblkno; - - tcd->image = image; - tcd->cp = cp; - tcd->tcd_image->tw = cp->tw; - tcd->tcd_image->th = cp->th; - tcd->tcd_image->tiles = (opj_tcd_tile_t *) opj_malloc(sizeof(opj_tcd_tile_t)); - - for (tileno = 0; tileno < 1; tileno++) { - opj_tcp_t *tcp = &cp->tcps[curtileno]; - int j; - - /* cfr p59 ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */ - int p = curtileno % cp->tw; /* si numerotation matricielle .. */ - int q = curtileno / cp->tw; /* .. coordonnees de la tile (q,p) q pour ligne et p pour colonne */ - - /* opj_tcd_tile_t *tile=&tcd->tcd_image->tiles[tileno]; */ - opj_tcd_tile_t *tile = tcd->tcd_image->tiles; - - /* 4 borders of the tile rescale on the image if necessary */ - tile->x0 = int_max(cp->tx0 + p * cp->tdx, image->x0); - tile->y0 = int_max(cp->ty0 + q * cp->tdy, image->y0); - tile->x1 = int_min(cp->tx0 + (p + 1) * cp->tdx, image->x1); - tile->y1 = int_min(cp->ty0 + (q + 1) * cp->tdy, image->y1); - tile->numcomps = image->numcomps; - /* tile->PPT=image->PPT; */ - - /* Modification of the RATE >> */ - for (j = 0; j < tcp->numlayers; j++) { - tcp->rates[j] = tcp->rates[j] ? - cp->tp_on ? - (((float) (tile->numcomps - * (tile->x1 - tile->x0) - * (tile->y1 - tile->y0) - * image->comps[0].prec)) - /(tcp->rates[j] * 8 * image->comps[0].dx * image->comps[0].dy)) - (((tcd->cur_totnum_tp - 1) * 14 )/ tcp->numlayers) - : - ((float) (tile->numcomps - * (tile->x1 - tile->x0) - * (tile->y1 - tile->y0) - * image->comps[0].prec))/ - (tcp->rates[j] * 8 * image->comps[0].dx * image->comps[0].dy) - : 0; - - if (tcp->rates[j]) { - if (j && tcp->rates[j] < tcp->rates[j - 1] + 10) { - tcp->rates[j] = tcp->rates[j - 1] + 20; - } else { - if (!j && tcp->rates[j] < 30) - tcp->rates[j] = 30; - } - - if(j == (tcp->numlayers-1)){ - tcp->rates[j] = tcp->rates[j]- 2; - } - } - } - /* << Modification of the RATE */ - - tile->comps = (opj_tcd_tilecomp_t *) opj_malloc(image->numcomps * sizeof(opj_tcd_tilecomp_t)); - for (compno = 0; compno < tile->numcomps; compno++) { - opj_tccp_t *tccp = &tcp->tccps[compno]; - - opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; - - /* border of each tile component (global) */ - tilec->x0 = int_ceildiv(tile->x0, image->comps[compno].dx); - tilec->y0 = int_ceildiv(tile->y0, image->comps[compno].dy); - tilec->x1 = int_ceildiv(tile->x1, image->comps[compno].dx); - tilec->y1 = int_ceildiv(tile->y1, image->comps[compno].dy); - - tilec->data = (int *) opj_aligned_malloc((tilec->x1 - tilec->x0) * (tilec->y1 - tilec->y0) * sizeof(int)); - tilec->numresolutions = tccp->numresolutions; - - tilec->resolutions = (opj_tcd_resolution_t *) opj_malloc(tilec->numresolutions * sizeof(opj_tcd_resolution_t)); - - for (resno = 0; resno < tilec->numresolutions; resno++) { - int pdx, pdy; - int levelno = tilec->numresolutions - 1 - resno; - int tlprcxstart, tlprcystart, brprcxend, brprcyend; - int tlcbgxstart, tlcbgystart, brcbgxend, brcbgyend; - int cbgwidthexpn, cbgheightexpn; - int cblkwidthexpn, cblkheightexpn; - - opj_tcd_resolution_t *res = &tilec->resolutions[resno]; - - /* border for each resolution level (global) */ - res->x0 = int_ceildivpow2(tilec->x0, levelno); - res->y0 = int_ceildivpow2(tilec->y0, levelno); - res->x1 = int_ceildivpow2(tilec->x1, levelno); - res->y1 = int_ceildivpow2(tilec->y1, levelno); - - res->numbands = resno == 0 ? 1 : 3; - /* p. 35, table A-23, ISO/IEC FDIS154444-1 : 2000 (18 august 2000) */ - if (tccp->csty & J2K_CCP_CSTY_PRT) { - pdx = tccp->prcw[resno]; - pdy = tccp->prch[resno]; - } else { - pdx = 15; - pdy = 15; - } - /* p. 64, B.6, ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */ - tlprcxstart = int_floordivpow2(res->x0, pdx) << pdx; - tlprcystart = int_floordivpow2(res->y0, pdy) << pdy; - - brprcxend = int_ceildivpow2(res->x1, pdx) << pdx; - brprcyend = int_ceildivpow2(res->y1, pdy) << pdy; - - res->pw = (brprcxend - tlprcxstart) >> pdx; - res->ph = (brprcyend - tlprcystart) >> pdy; - - if (resno == 0) { - tlcbgxstart = tlprcxstart; - tlcbgystart = tlprcystart; - brcbgxend = brprcxend; - brcbgyend = brprcyend; - cbgwidthexpn = pdx; - cbgheightexpn = pdy; - } else { - tlcbgxstart = int_ceildivpow2(tlprcxstart, 1); - tlcbgystart = int_ceildivpow2(tlprcystart, 1); - brcbgxend = int_ceildivpow2(brprcxend, 1); - brcbgyend = int_ceildivpow2(brprcyend, 1); - cbgwidthexpn = pdx - 1; - cbgheightexpn = pdy - 1; - } - - cblkwidthexpn = int_min(tccp->cblkw, cbgwidthexpn); - cblkheightexpn = int_min(tccp->cblkh, cbgheightexpn); - - for (bandno = 0; bandno < res->numbands; bandno++) { - int x0b, y0b, i; - int gain, numbps; - opj_stepsize_t *ss = NULL; - - opj_tcd_band_t *band = &res->bands[bandno]; - - band->bandno = resno == 0 ? 0 : bandno + 1; - x0b = (band->bandno == 1) || (band->bandno == 3) ? 1 : 0; - y0b = (band->bandno == 2) || (band->bandno == 3) ? 1 : 0; - - if (band->bandno == 0) { - /* band border (global) */ - band->x0 = int_ceildivpow2(tilec->x0, levelno); - band->y0 = int_ceildivpow2(tilec->y0, levelno); - band->x1 = int_ceildivpow2(tilec->x1, levelno); - band->y1 = int_ceildivpow2(tilec->y1, levelno); - } else { - /* band border (global) */ - band->x0 = int_ceildivpow2(tilec->x0 - (1 << levelno) * x0b, levelno + 1); - band->y0 = int_ceildivpow2(tilec->y0 - (1 << levelno) * y0b, levelno + 1); - band->x1 = int_ceildivpow2(tilec->x1 - (1 << levelno) * x0b, levelno + 1); - band->y1 = int_ceildivpow2(tilec->y1 - (1 << levelno) * y0b, levelno + 1); - } - - ss = &tccp->stepsizes[resno == 0 ? 0 : 3 * (resno - 1) + bandno + 1]; - gain = tccp->qmfbid == 0 ? dwt_getgain_real(band->bandno) : dwt_getgain(band->bandno); - numbps = image->comps[compno].prec + gain; - - band->stepsize = (float)((1.0 + ss->mant / 2048.0) * pow(2.0, numbps - ss->expn)); - band->numbps = ss->expn + tccp->numgbits - 1; /* WHY -1 ? */ - - band->precincts = (opj_tcd_precinct_t *) opj_malloc(3 * res->pw * res->ph * sizeof(opj_tcd_precinct_t)); - - for (i = 0; i < res->pw * res->ph * 3; i++) { - band->precincts[i].imsbtree = NULL; - band->precincts[i].incltree = NULL; - band->precincts[i].cblks.enc = NULL; - } - - for (precno = 0; precno < res->pw * res->ph; precno++) { - int tlcblkxstart, tlcblkystart, brcblkxend, brcblkyend; - - int cbgxstart = tlcbgxstart + (precno % res->pw) * (1 << cbgwidthexpn); - int cbgystart = tlcbgystart + (precno / res->pw) * (1 << cbgheightexpn); - int cbgxend = cbgxstart + (1 << cbgwidthexpn); - int cbgyend = cbgystart + (1 << cbgheightexpn); - - opj_tcd_precinct_t *prc = &band->precincts[precno]; - - /* precinct size (global) */ - prc->x0 = int_max(cbgxstart, band->x0); - prc->y0 = int_max(cbgystart, band->y0); - prc->x1 = int_min(cbgxend, band->x1); - prc->y1 = int_min(cbgyend, band->y1); - - tlcblkxstart = int_floordivpow2(prc->x0, cblkwidthexpn) << cblkwidthexpn; - tlcblkystart = int_floordivpow2(prc->y0, cblkheightexpn) << cblkheightexpn; - brcblkxend = int_ceildivpow2(prc->x1, cblkwidthexpn) << cblkwidthexpn; - brcblkyend = int_ceildivpow2(prc->y1, cblkheightexpn) << cblkheightexpn; - prc->cw = (brcblkxend - tlcblkxstart) >> cblkwidthexpn; - prc->ch = (brcblkyend - tlcblkystart) >> cblkheightexpn; - - prc->cblks.enc = (opj_tcd_cblk_enc_t*) opj_calloc((prc->cw * prc->ch), sizeof(opj_tcd_cblk_enc_t)); - prc->incltree = tgt_create(prc->cw, prc->ch); - prc->imsbtree = tgt_create(prc->cw, prc->ch); - - for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { - int cblkxstart = tlcblkxstart + (cblkno % prc->cw) * (1 << cblkwidthexpn); - int cblkystart = tlcblkystart + (cblkno / prc->cw) * (1 << cblkheightexpn); - int cblkxend = cblkxstart + (1 << cblkwidthexpn); - int cblkyend = cblkystart + (1 << cblkheightexpn); - - opj_tcd_cblk_enc_t* cblk = &prc->cblks.enc[cblkno]; - - /* code-block size (global) */ - cblk->x0 = int_max(cblkxstart, prc->x0); - cblk->y0 = int_max(cblkystart, prc->y0); - cblk->x1 = int_min(cblkxend, prc->x1); - cblk->y1 = int_min(cblkyend, prc->y1); - cblk->data = (unsigned char*) opj_calloc(9728+2, sizeof(unsigned char)); - /* FIXME: mqc_init_enc and mqc_byteout underrun the buffer if we don't do this. Why? */ - cblk->data[0] = 0; - cblk->data[1] = 0; - cblk->data += 2; - cblk->layers = (opj_tcd_layer_t*) opj_calloc(100, sizeof(opj_tcd_layer_t)); - cblk->passes = (opj_tcd_pass_t*) opj_calloc(100, sizeof(opj_tcd_pass_t)); - } - } - } - } - } - } - - /* tcd_dump(stdout, tcd, &tcd->tcd_image); */ -} - -void tcd_free_encode(opj_tcd_t *tcd) { - int tileno, compno, resno, bandno, precno, cblkno; - - for (tileno = 0; tileno < 1; tileno++) { - opj_tcd_tile_t *tile = tcd->tcd_image->tiles; - - for (compno = 0; compno < tile->numcomps; compno++) { - opj_tcd_tilecomp_t *tilec = &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]; - - if (prc->incltree != NULL) { - tgt_destroy(prc->incltree); - prc->incltree = NULL; - } - if (prc->imsbtree != NULL) { - tgt_destroy(prc->imsbtree); - prc->imsbtree = NULL; - } - for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { - opj_free(prc->cblks.enc[cblkno].data - 2); - opj_free(prc->cblks.enc[cblkno].layers); - opj_free(prc->cblks.enc[cblkno].passes); - } - opj_free(prc->cblks.enc); - } /* for (precno */ - opj_free(band->precincts); - band->precincts = NULL; - } /* for (bandno */ - } /* for (resno */ - opj_free(tilec->resolutions); - tilec->resolutions = NULL; - } /* for (compno */ - opj_free(tile->comps); - tile->comps = NULL; - } /* for (tileno */ - opj_free(tcd->tcd_image->tiles); - tcd->tcd_image->tiles = NULL; -} - -void tcd_init_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int curtileno) { - int tileno, compno, resno, bandno, precno, cblkno; - - for (tileno = 0; tileno < 1; tileno++) { - opj_tcp_t *tcp = &cp->tcps[curtileno]; - int j; - /* cfr p59 ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */ - int p = curtileno % cp->tw; - int q = curtileno / cp->tw; - - opj_tcd_tile_t *tile = tcd->tcd_image->tiles; - - /* 4 borders of the tile rescale on the image if necessary */ - tile->x0 = int_max(cp->tx0 + p * cp->tdx, image->x0); - tile->y0 = int_max(cp->ty0 + q * cp->tdy, image->y0); - tile->x1 = int_min(cp->tx0 + (p + 1) * cp->tdx, image->x1); - tile->y1 = int_min(cp->ty0 + (q + 1) * cp->tdy, image->y1); - - tile->numcomps = image->numcomps; - /* tile->PPT=image->PPT; */ - - /* Modification of the RATE >> */ - for (j = 0; j < tcp->numlayers; j++) { - tcp->rates[j] = tcp->rates[j] ? - cp->tp_on ? - (((float) (tile->numcomps - * (tile->x1 - tile->x0) - * (tile->y1 - tile->y0) - * image->comps[0].prec)) - /(tcp->rates[j] * 8 * image->comps[0].dx * image->comps[0].dy)) - (((tcd->cur_totnum_tp - 1) * 14 )/ tcp->numlayers) - : - ((float) (tile->numcomps - * (tile->x1 - tile->x0) - * (tile->y1 - tile->y0) - * image->comps[0].prec))/ - (tcp->rates[j] * 8 * image->comps[0].dx * image->comps[0].dy) - : 0; - - if (tcp->rates[j]) { - if (j && tcp->rates[j] < tcp->rates[j - 1] + 10) { - tcp->rates[j] = tcp->rates[j - 1] + 20; - } else { - if (!j && tcp->rates[j] < 30) - tcp->rates[j] = 30; - } - } - } - /* << Modification of the RATE */ - - /* tile->comps=(opj_tcd_tilecomp_t*)opj_realloc(tile->comps,image->numcomps*sizeof(opj_tcd_tilecomp_t)); */ - for (compno = 0; compno < tile->numcomps; compno++) { - opj_tccp_t *tccp = &tcp->tccps[compno]; - - opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; - - /* border of each tile component (global) */ - tilec->x0 = int_ceildiv(tile->x0, image->comps[compno].dx); - tilec->y0 = int_ceildiv(tile->y0, image->comps[compno].dy); - tilec->x1 = int_ceildiv(tile->x1, image->comps[compno].dx); - tilec->y1 = int_ceildiv(tile->y1, image->comps[compno].dy); - - tilec->data = (int *) opj_aligned_malloc((tilec->x1 - tilec->x0) * (tilec->y1 - tilec->y0) * sizeof(int)); - tilec->numresolutions = tccp->numresolutions; - /* tilec->resolutions=(opj_tcd_resolution_t*)opj_realloc(tilec->resolutions,tilec->numresolutions*sizeof(opj_tcd_resolution_t)); */ - for (resno = 0; resno < tilec->numresolutions; resno++) { - int pdx, pdy; - - int levelno = tilec->numresolutions - 1 - resno; - int tlprcxstart, tlprcystart, brprcxend, brprcyend; - int tlcbgxstart, tlcbgystart, brcbgxend, brcbgyend; - int cbgwidthexpn, cbgheightexpn; - int cblkwidthexpn, cblkheightexpn; - - opj_tcd_resolution_t *res = &tilec->resolutions[resno]; - - /* border for each resolution level (global) */ - res->x0 = int_ceildivpow2(tilec->x0, levelno); - res->y0 = int_ceildivpow2(tilec->y0, levelno); - res->x1 = int_ceildivpow2(tilec->x1, levelno); - res->y1 = int_ceildivpow2(tilec->y1, levelno); - res->numbands = resno == 0 ? 1 : 3; - - /* p. 35, table A-23, ISO/IEC FDIS154444-1 : 2000 (18 august 2000) */ - if (tccp->csty & J2K_CCP_CSTY_PRT) { - pdx = tccp->prcw[resno]; - pdy = tccp->prch[resno]; - } else { - pdx = 15; - pdy = 15; - } - /* p. 64, B.6, ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */ - tlprcxstart = int_floordivpow2(res->x0, pdx) << pdx; - tlprcystart = int_floordivpow2(res->y0, pdy) << pdy; - brprcxend = int_ceildivpow2(res->x1, pdx) << pdx; - brprcyend = int_ceildivpow2(res->y1, pdy) << pdy; - - res->pw = (brprcxend - tlprcxstart) >> pdx; - res->ph = (brprcyend - tlprcystart) >> pdy; - - if (resno == 0) { - tlcbgxstart = tlprcxstart; - tlcbgystart = tlprcystart; - brcbgxend = brprcxend; - brcbgyend = brprcyend; - cbgwidthexpn = pdx; - cbgheightexpn = pdy; - } else { - tlcbgxstart = int_ceildivpow2(tlprcxstart, 1); - tlcbgystart = int_ceildivpow2(tlprcystart, 1); - brcbgxend = int_ceildivpow2(brprcxend, 1); - brcbgyend = int_ceildivpow2(brprcyend, 1); - cbgwidthexpn = pdx - 1; - cbgheightexpn = pdy - 1; - } - - cblkwidthexpn = int_min(tccp->cblkw, cbgwidthexpn); - cblkheightexpn = int_min(tccp->cblkh, cbgheightexpn); - - for (bandno = 0; bandno < res->numbands; bandno++) { - int x0b, y0b; - int gain, numbps; - opj_stepsize_t *ss = NULL; - - opj_tcd_band_t *band = &res->bands[bandno]; - - band->bandno = resno == 0 ? 0 : bandno + 1; - x0b = (band->bandno == 1) || (band->bandno == 3) ? 1 : 0; - y0b = (band->bandno == 2) || (band->bandno == 3) ? 1 : 0; - - if (band->bandno == 0) { - /* band border */ - band->x0 = int_ceildivpow2(tilec->x0, levelno); - band->y0 = int_ceildivpow2(tilec->y0, levelno); - band->x1 = int_ceildivpow2(tilec->x1, levelno); - band->y1 = int_ceildivpow2(tilec->y1, levelno); - } else { - band->x0 = int_ceildivpow2(tilec->x0 - (1 << levelno) * x0b, levelno + 1); - band->y0 = int_ceildivpow2(tilec->y0 - (1 << levelno) * y0b, levelno + 1); - band->x1 = int_ceildivpow2(tilec->x1 - (1 << levelno) * x0b, levelno + 1); - band->y1 = int_ceildivpow2(tilec->y1 - (1 << levelno) * y0b, levelno + 1); - } - - ss = &tccp->stepsizes[resno == 0 ? 0 : 3 * (resno - 1) + bandno + 1]; - gain = tccp->qmfbid == 0 ? dwt_getgain_real(band->bandno) : dwt_getgain(band->bandno); - numbps = image->comps[compno].prec + gain; - band->stepsize = (float)((1.0 + ss->mant / 2048.0) * pow(2.0, numbps - ss->expn)); - band->numbps = ss->expn + tccp->numgbits - 1; /* WHY -1 ? */ - - for (precno = 0; precno < res->pw * res->ph; precno++) { - int tlcblkxstart, tlcblkystart, brcblkxend, brcblkyend; - - int cbgxstart = tlcbgxstart + (precno % res->pw) * (1 << cbgwidthexpn); - int cbgystart = tlcbgystart + (precno / res->pw) * (1 << cbgheightexpn); - int cbgxend = cbgxstart + (1 << cbgwidthexpn); - int cbgyend = cbgystart + (1 << cbgheightexpn); - - opj_tcd_precinct_t *prc = &band->precincts[precno]; - - /* precinct size (global) */ - prc->x0 = int_max(cbgxstart, band->x0); - prc->y0 = int_max(cbgystart, band->y0); - prc->x1 = int_min(cbgxend, band->x1); - prc->y1 = int_min(cbgyend, band->y1); - - tlcblkxstart = int_floordivpow2(prc->x0, cblkwidthexpn) << cblkwidthexpn; - tlcblkystart = int_floordivpow2(prc->y0, cblkheightexpn) << cblkheightexpn; - brcblkxend = int_ceildivpow2(prc->x1, cblkwidthexpn) << cblkwidthexpn; - brcblkyend = int_ceildivpow2(prc->y1, cblkheightexpn) << cblkheightexpn; - prc->cw = (brcblkxend - tlcblkxstart) >> cblkwidthexpn; - prc->ch = (brcblkyend - tlcblkystart) >> cblkheightexpn; - - opj_free(prc->cblks.enc); - prc->cblks.enc = (opj_tcd_cblk_enc_t*) opj_calloc(prc->cw * prc->ch, sizeof(opj_tcd_cblk_enc_t)); - - if (prc->incltree != NULL) { - tgt_destroy(prc->incltree); - } - if (prc->imsbtree != NULL) { - tgt_destroy(prc->imsbtree); - } - - prc->incltree = tgt_create(prc->cw, prc->ch); - prc->imsbtree = tgt_create(prc->cw, prc->ch); - - for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { - int cblkxstart = tlcblkxstart + (cblkno % prc->cw) * (1 << cblkwidthexpn); - int cblkystart = tlcblkystart + (cblkno / prc->cw) * (1 << cblkheightexpn); - int cblkxend = cblkxstart + (1 << cblkwidthexpn); - int cblkyend = cblkystart + (1 << cblkheightexpn); - - opj_tcd_cblk_enc_t* cblk = &prc->cblks.enc[cblkno]; - - /* code-block size (global) */ - cblk->x0 = int_max(cblkxstart, prc->x0); - cblk->y0 = int_max(cblkystart, prc->y0); - cblk->x1 = int_min(cblkxend, prc->x1); - cblk->y1 = int_min(cblkyend, prc->y1); - cblk->data = (unsigned char*) opj_calloc(8192+2, sizeof(unsigned char)); - /* FIXME: mqc_init_enc and mqc_byteout underrun the buffer if we don't do this. Why? */ - cblk->data[0] = 0; - cblk->data[1] = 0; - cblk->data += 2; - cblk->layers = (opj_tcd_layer_t*) opj_calloc(100, sizeof(opj_tcd_layer_t)); - cblk->passes = (opj_tcd_pass_t*) opj_calloc(100, sizeof(opj_tcd_pass_t)); - } - } /* precno */ - } /* bandno */ - } /* resno */ - } /* compno */ - } /* tileno */ - - /* tcd_dump(stdout, tcd, &tcd->tcd_image); */ -} - -void tcd_malloc_decode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp) { - int i, j, tileno, p, q; - unsigned int x0 = 0, y0 = 0, x1 = 0, y1 = 0, w, h; - - tcd->image = image; - tcd->tcd_image->tw = cp->tw; - tcd->tcd_image->th = cp->th; - tcd->tcd_image->tiles = (opj_tcd_tile_t *) opj_calloc(cp->tw * cp->th, sizeof(opj_tcd_tile_t)); - - /* - Allocate place to store the decoded data = final image - Place limited by the tile really present in the codestream - */ - - for (j = 0; j < cp->tileno_size; j++) { - opj_tcd_tile_t *tile; - - tileno = cp->tileno[j]; - tile = &(tcd->tcd_image->tiles[cp->tileno[tileno]]); - tile->numcomps = image->numcomps; - tile->comps = (opj_tcd_tilecomp_t*) opj_calloc(image->numcomps, sizeof(opj_tcd_tilecomp_t)); - } - - for (i = 0; i < image->numcomps; i++) { - for (j = 0; j < cp->tileno_size; j++) { - opj_tcd_tile_t *tile; - opj_tcd_tilecomp_t *tilec; - - /* cfr p59 ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */ - - tileno = cp->tileno[j]; - - tile = &(tcd->tcd_image->tiles[cp->tileno[tileno]]); - tilec = &tile->comps[i]; - - p = tileno % cp->tw; /* si numerotation matricielle .. */ - q = tileno / cp->tw; /* .. coordonnees de la tile (q,p) q pour ligne et p pour colonne */ - - /* 4 borders of the tile rescale on the image if necessary */ - tile->x0 = int_max(cp->tx0 + p * cp->tdx, image->x0); - tile->y0 = int_max(cp->ty0 + q * cp->tdy, image->y0); - tile->x1 = int_min(cp->tx0 + (p + 1) * cp->tdx, image->x1); - tile->y1 = int_min(cp->ty0 + (q + 1) * cp->tdy, image->y1); - - tilec->x0 = int_ceildiv(tile->x0, image->comps[i].dx); - tilec->y0 = int_ceildiv(tile->y0, image->comps[i].dy); - tilec->x1 = int_ceildiv(tile->x1, image->comps[i].dx); - tilec->y1 = int_ceildiv(tile->y1, image->comps[i].dy); - - x0 = j == 0 ? tilec->x0 : int_min(x0, (unsigned int) tilec->x0); - y0 = j == 0 ? tilec->y0 : int_min(y0, (unsigned int) tilec->y0); - x1 = j == 0 ? tilec->x1 : int_max(x1, (unsigned int) tilec->x1); - y1 = j == 0 ? tilec->y1 : int_max(y1, (unsigned int) tilec->y1); - } - - w = int_ceildivpow2(x1 - x0, image->comps[i].factor); - h = int_ceildivpow2(y1 - y0, image->comps[i].factor); - - image->comps[i].w = w; - image->comps[i].h = h; - image->comps[i].x0 = x0; - image->comps[i].y0 = y0; - } -} - -void tcd_malloc_decode_tile(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int tileno, opj_codestream_info_t *cstr_info) { - int compno, resno, bandno, precno, cblkno; - opj_tcp_t *tcp; - opj_tcd_tile_t *tile; - - OPJ_ARG_NOT_USED(cstr_info); - - tcd->cp = cp; - - tcp = &(cp->tcps[cp->tileno[tileno]]); - tile = &(tcd->tcd_image->tiles[cp->tileno[tileno]]); - - tileno = cp->tileno[tileno]; - - for (compno = 0; compno < tile->numcomps; compno++) { - opj_tccp_t *tccp = &tcp->tccps[compno]; - opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; - - if (tccp->numresolutions <= 0) - { - cp->tileno[tileno] = -1; - return; - } - - /* border of each tile component (global) */ - tilec->x0 = int_ceildiv(tile->x0, image->comps[compno].dx); - tilec->y0 = int_ceildiv(tile->y0, image->comps[compno].dy); - tilec->x1 = int_ceildiv(tile->x1, image->comps[compno].dx); - tilec->y1 = int_ceildiv(tile->y1, image->comps[compno].dy); - - tilec->numresolutions = tccp->numresolutions; - tilec->resolutions = (opj_tcd_resolution_t *) opj_malloc(tilec->numresolutions * sizeof(opj_tcd_resolution_t)); - - for (resno = 0; resno < tilec->numresolutions; resno++) { - int pdx, pdy; - int levelno = tilec->numresolutions - 1 - resno; - int tlprcxstart, tlprcystart, brprcxend, brprcyend; - int tlcbgxstart, tlcbgystart, brcbgxend, brcbgyend; - int cbgwidthexpn, cbgheightexpn; - int cblkwidthexpn, cblkheightexpn; - - opj_tcd_resolution_t *res = &tilec->resolutions[resno]; - - /* border for each resolution level (global) */ - res->x0 = int_ceildivpow2(tilec->x0, levelno); - res->y0 = int_ceildivpow2(tilec->y0, levelno); - res->x1 = int_ceildivpow2(tilec->x1, levelno); - res->y1 = int_ceildivpow2(tilec->y1, levelno); - res->numbands = resno == 0 ? 1 : 3; - - /* p. 35, table A-23, ISO/IEC FDIS154444-1 : 2000 (18 august 2000) */ - if (tccp->csty & J2K_CCP_CSTY_PRT) { - pdx = tccp->prcw[resno]; - pdy = tccp->prch[resno]; - } else { - pdx = 15; - pdy = 15; - } - - /* p. 64, B.6, ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */ - tlprcxstart = int_floordivpow2(res->x0, pdx) << pdx; - tlprcystart = int_floordivpow2(res->y0, pdy) << pdy; - brprcxend = int_ceildivpow2(res->x1, pdx) << pdx; - brprcyend = int_ceildivpow2(res->y1, pdy) << pdy; - - res->pw = (res->x0 == res->x1) ? 0 : ((brprcxend - tlprcxstart) >> pdx); - res->ph = (res->y0 == res->y1) ? 0 : ((brprcyend - tlprcystart) >> pdy); - - if (resno == 0) { - tlcbgxstart = tlprcxstart; - tlcbgystart = tlprcystart; - brcbgxend = brprcxend; - brcbgyend = brprcyend; - cbgwidthexpn = pdx; - cbgheightexpn = pdy; - } else { - tlcbgxstart = int_ceildivpow2(tlprcxstart, 1); - tlcbgystart = int_ceildivpow2(tlprcystart, 1); - brcbgxend = int_ceildivpow2(brprcxend, 1); - brcbgyend = int_ceildivpow2(brprcyend, 1); - cbgwidthexpn = pdx - 1; - cbgheightexpn = pdy - 1; - } - - cblkwidthexpn = int_min(tccp->cblkw, cbgwidthexpn); - cblkheightexpn = int_min(tccp->cblkh, cbgheightexpn); - - for (bandno = 0; bandno < res->numbands; bandno++) { - int x0b, y0b; - int gain, numbps; - opj_stepsize_t *ss = NULL; - - opj_tcd_band_t *band = &res->bands[bandno]; - band->bandno = resno == 0 ? 0 : bandno + 1; - x0b = (band->bandno == 1) || (band->bandno == 3) ? 1 : 0; - y0b = (band->bandno == 2) || (band->bandno == 3) ? 1 : 0; - - if (band->bandno == 0) { - /* band border (global) */ - band->x0 = int_ceildivpow2(tilec->x0, levelno); - band->y0 = int_ceildivpow2(tilec->y0, levelno); - band->x1 = int_ceildivpow2(tilec->x1, levelno); - band->y1 = int_ceildivpow2(tilec->y1, levelno); - } else { - /* band border (global) */ - band->x0 = int_ceildivpow2(tilec->x0 - (1 << levelno) * x0b, levelno + 1); - band->y0 = int_ceildivpow2(tilec->y0 - (1 << levelno) * y0b, levelno + 1); - band->x1 = int_ceildivpow2(tilec->x1 - (1 << levelno) * x0b, levelno + 1); - band->y1 = int_ceildivpow2(tilec->y1 - (1 << levelno) * y0b, levelno + 1); - } - - ss = &tccp->stepsizes[resno == 0 ? 0 : 3 * (resno - 1) + bandno + 1]; - gain = tccp->qmfbid == 0 ? dwt_getgain_real(band->bandno) : dwt_getgain(band->bandno); - numbps = image->comps[compno].prec + gain; - band->stepsize = (float)(((1.0 + ss->mant / 2048.0) * pow(2.0, numbps - ss->expn)) * 0.5); - band->numbps = ss->expn + tccp->numgbits - 1; /* WHY -1 ? */ - - band->precincts = (opj_tcd_precinct_t *) opj_malloc(res->pw * res->ph * sizeof(opj_tcd_precinct_t)); - - for (precno = 0; precno < res->pw * res->ph; precno++) { - int tlcblkxstart, tlcblkystart, brcblkxend, brcblkyend; - int cbgxstart = tlcbgxstart + (precno % res->pw) * (1 << cbgwidthexpn); - int cbgystart = tlcbgystart + (precno / res->pw) * (1 << cbgheightexpn); - int cbgxend = cbgxstart + (1 << cbgwidthexpn); - int cbgyend = cbgystart + (1 << cbgheightexpn); - - opj_tcd_precinct_t *prc = &band->precincts[precno]; - /* precinct size (global) */ - prc->x0 = int_max(cbgxstart, band->x0); - prc->y0 = int_max(cbgystart, band->y0); - prc->x1 = int_min(cbgxend, band->x1); - prc->y1 = int_min(cbgyend, band->y1); - - tlcblkxstart = int_floordivpow2(prc->x0, cblkwidthexpn) << cblkwidthexpn; - tlcblkystart = int_floordivpow2(prc->y0, cblkheightexpn) << cblkheightexpn; - brcblkxend = int_ceildivpow2(prc->x1, cblkwidthexpn) << cblkwidthexpn; - brcblkyend = int_ceildivpow2(prc->y1, cblkheightexpn) << cblkheightexpn; - prc->cw = (brcblkxend - tlcblkxstart) >> cblkwidthexpn; - prc->ch = (brcblkyend - tlcblkystart) >> cblkheightexpn; - - prc->cblks.dec = (opj_tcd_cblk_dec_t*) opj_malloc(prc->cw * prc->ch * sizeof(opj_tcd_cblk_dec_t)); - - prc->incltree = tgt_create(prc->cw, prc->ch); - prc->imsbtree = tgt_create(prc->cw, prc->ch); - - for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { - int cblkxstart = tlcblkxstart + (cblkno % prc->cw) * (1 << cblkwidthexpn); - int cblkystart = tlcblkystart + (cblkno / prc->cw) * (1 << cblkheightexpn); - int cblkxend = cblkxstart + (1 << cblkwidthexpn); - int cblkyend = cblkystart + (1 << cblkheightexpn); - - opj_tcd_cblk_dec_t* cblk = &prc->cblks.dec[cblkno]; - cblk->data = NULL; - cblk->segs = NULL; - /* code-block size (global) */ - cblk->x0 = int_max(cblkxstart, prc->x0); - cblk->y0 = int_max(cblkystart, prc->y0); - cblk->x1 = int_min(cblkxend, prc->x1); - cblk->y1 = int_min(cblkyend, prc->y1); - cblk->numsegs = 0; - } - } /* precno */ - } /* bandno */ - } /* resno */ - } /* compno */ - /* tcd_dump(stdout, tcd, &tcd->tcd_image); */ -} - -void tcd_makelayer_fixed(opj_tcd_t *tcd, int layno, int final) { - int compno, resno, bandno, precno, cblkno; - int value; /*, matrice[tcd_tcp->numlayers][tcd_tile->comps[0].numresolutions][3]; */ - int matrice[10][10][3]; - int i, j, k; - - opj_cp_t *cp = tcd->cp; - opj_tcd_tile_t *tcd_tile = tcd->tcd_tile; - opj_tcp_t *tcd_tcp = tcd->tcp; - - /*matrice=(int*)opj_malloc(tcd_tcp->numlayers*tcd_tile->comps[0].numresolutions*3*sizeof(int)); */ - - 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] = - (int) (cp->matrice[i * tilec->numresolutions * 3 + j * 3 + k] - * (float) (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]; - int n; - int imsb = 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 * value - 2 + cblk->numpassesinlayers; - } else { - n = cblk->numpassesinlayers; - } - } else { - n = 3 * 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; - } - } - } - } - } -} - -void tcd_rateallocate_fixed(opj_tcd_t *tcd) { - int layno; - for (layno = 0; layno < tcd->tcp->numlayers; layno++) { - tcd_makelayer_fixed(tcd, layno, 1); - } -} - -void tcd_makelayer(opj_tcd_t *tcd, int layno, double thresh, int final) { - int compno, resno, bandno, precno, cblkno, passno; - - opj_tcd_tile_t *tcd_tile = tcd->tcd_tile; - - 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]; - - int n; - if (layno == 0) { - cblk->numpassesinlayers = 0; - } - n = cblk->numpassesinlayers; - for (passno = cblk->numpassesinlayers; passno < cblk->totalpasses; passno++) { - int dr; - double 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; - } - } - } - } - } -} - -opj_bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_codestream_info_t *cstr_info) { - int compno, resno, bandno, precno, cblkno, passno, layno; - double min, max; - double cumdisto[100]; /* fixed_quality */ - const double K = 1; /* 1.1; fixed_quality */ - double maxSE = 0; - - opj_cp_t *cp = tcd->cp; - opj_tcd_tile_t *tcd_tile = tcd->tcd_tile; - 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]; - int dr; - double dd, rdslope; - if (passno == 0) { - dr = pass->rate; - dd = pass->distortiondec; - } else { - dr = 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 += (((double)(1 << tcd->image->comps[compno].prec) - 1.0) - * ((double)(1 << tcd->image->comps[compno].prec) -1.0)) - * ((double)(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 = (double *) opj_malloc(tcd_tcp->numlayers * sizeof(double)); - } - - for (layno = 0; layno < tcd_tcp->numlayers; layno++) { - double lo = min; - double hi = max; - int success = 0; - int maxlen = tcd_tcp->rates[layno] ? int_min(((int) ceil(tcd_tcp->rates[layno])), len) : len; - double goodthresh = 0; - double stable_thresh = 0; - int i; - double distotarget; /* fixed_quality */ - - /* fixed_quality */ - distotarget = tcd_tile->distotile - ((K * maxSE) / pow((float)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->disto_alloc==1) && (tcd_tcp->rates[layno]>0)) || ((cp->fixed_quality==1) && (tcd_tcp->distoratio[layno]>0))) { - opj_t2_t *t2 = t2_create(tcd->cinfo, tcd->image, cp); - double thresh = 0; - - for (i = 0; i < 128; i++) { - int l = 0; - double distoachieved = 0; /* fixed_quality */ - thresh = (lo + hi) / 2; - - tcd_makelayer(tcd, layno, thresh, 0); - - if (cp->fixed_quality) { /* fixed_quality */ - if(cp->cinema){ - l = t2_encode_packets(t2,tcd->tcd_tileno, tcd_tile, layno + 1, dest, maxlen, cstr_info,tcd->cur_tp_num,tcd->tp_pos,tcd->cur_pino,THRESH_CALC, tcd->cur_totnum_tp); - if (l == -999) { - 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 { - l = t2_encode_packets(t2, tcd->tcd_tileno, tcd_tile, layno + 1, dest, maxlen, cstr_info,tcd->cur_tp_num,tcd->tp_pos,tcd->cur_pino,THRESH_CALC, tcd->cur_totnum_tp); - /* TODO: what to do with l ??? seek / tell ??? */ - /* opj_event_msg(tcd->cinfo, EVT_INFO, "rate alloc: len=%d, max=%d\n", l, maxlen); */ - if (l == -999) { - lo = thresh; - continue; - } - hi = thresh; - stable_thresh = thresh; - } - } - success = 1; - goodthresh = stable_thresh == 0? thresh : stable_thresh; - t2_destroy(t2); - } else { - success = 1; - goodthresh = min; - } - - if (!success) { - return OPJ_FALSE; - } - - if(cstr_info) { /* Threshold for Marcela Index */ - cstr_info->tile[tcd->tcd_tileno].thresh[layno] = goodthresh; - } - 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; -} - -int tcd_encode_tile(opj_tcd_t *tcd, int tileno, unsigned char *dest, int len, opj_codestream_info_t *cstr_info) { - int compno; - int l, i, numpacks = 0; - opj_tcd_tile_t *tile = NULL; - opj_tcp_t *tcd_tcp = NULL; - opj_cp_t *cp = NULL; - - opj_tcp_t *tcp = &tcd->cp->tcps[0]; - opj_tccp_t *tccp = &tcp->tccps[0]; - opj_image_t *image = tcd->image; - - opj_t1_t *t1 = NULL; /* T1 component */ - opj_t2_t *t2 = NULL; /* T2 component */ - - tcd->tcd_tileno = tileno; - tcd->tcd_tile = tcd->tcd_image->tiles; - tcd->tcp = &tcd->cp->tcps[tileno]; - - tile = tcd->tcd_tile; - tcd_tcp = tcd->tcp; - cp = tcd->cp; - - if(tcd->cur_tp_num == 0){ - tcd->encoding_time = opj_clock(); /* time needed to encode a tile */ - /* INDEX >> "Precinct_nb_X et Precinct_nb_Y" */ - if(cstr_info) { - opj_tcd_tilecomp_t *tilec_idx = &tile->comps[0]; /* based on component 0 */ - for (i = 0; i < tilec_idx->numresolutions; i++) { - opj_tcd_resolution_t *res_idx = &tilec_idx->resolutions[i]; - - cstr_info->tile[tileno].pw[i] = res_idx->pw; - cstr_info->tile[tileno].ph[i] = res_idx->ph; - - numpacks += res_idx->pw * res_idx->ph; - - cstr_info->tile[tileno].pdx[i] = tccp->prcw[i]; - cstr_info->tile[tileno].pdy[i] = tccp->prch[i]; - } - cstr_info->tile[tileno].packet = (opj_packet_info_t*) opj_calloc(cstr_info->numcomps * cstr_info->numlayers * numpacks, sizeof(opj_packet_info_t)); - } - /* << INDEX */ - - /*---------------TILE-------------------*/ - - for (compno = 0; compno < tile->numcomps; compno++) { - int x, y; - - int adjust = image->comps[compno].sgnd ? 0 : 1 << (image->comps[compno].prec - 1); - int offset_x = int_ceildiv(image->x0, image->comps[compno].dx); - int offset_y = int_ceildiv(image->y0, image->comps[compno].dy); - - opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; - int tw = tilec->x1 - tilec->x0; - int w = int_ceildiv(image->x1 - image->x0, image->comps[compno].dx); - - /* extract tile data */ - - if (tcd_tcp->tccps[compno].qmfbid == 1) { - for (y = tilec->y0; y < tilec->y1; y++) { - /* start of the src tile scanline */ - int *data = &image->comps[compno].data[(tilec->x0 - offset_x) + (y - offset_y) * w]; - /* start of the dst tile scanline */ - int *tile_data = &tilec->data[(y - tilec->y0) * tw]; - for (x = tilec->x0; x < tilec->x1; x++) { - *tile_data++ = *data++ - adjust; - } - } - } else if (tcd_tcp->tccps[compno].qmfbid == 0) { - for (y = tilec->y0; y < tilec->y1; y++) { - /* start of the src tile scanline */ - int *data = &image->comps[compno].data[(tilec->x0 - offset_x) + (y - offset_y) * w]; - /* start of the dst tile scanline */ - int *tile_data = &tilec->data[(y - tilec->y0) * tw]; - for (x = tilec->x0; x < tilec->x1; x++) { - *tile_data++ = (*data++ - adjust) << 11; - } - - } - } - } - - /*----------------MCT-------------------*/ - if (tcd_tcp->mct) { - int samples = (tile->comps[0].x1 - tile->comps[0].x0) * (tile->comps[0].y1 - tile->comps[0].y0); - if (tcd_tcp->tccps[0].qmfbid == 0) { - mct_encode_real(tile->comps[0].data, tile->comps[1].data, tile->comps[2].data, samples); - } else { - mct_encode(tile->comps[0].data, tile->comps[1].data, tile->comps[2].data, samples); - } - } - - /*----------------DWT---------------------*/ - - for (compno = 0; compno < tile->numcomps; compno++) { - opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; - if (tcd_tcp->tccps[compno].qmfbid == 1) { - dwt_encode(tilec); - } else if (tcd_tcp->tccps[compno].qmfbid == 0) { - dwt_encode_real(tilec); - } - } - - /*------------------TIER1-----------------*/ - t1 = t1_create(tcd->cinfo); - t1_encode_cblks(t1, tile, tcd_tcp); - t1_destroy(t1); - - /*-----------RATE-ALLOCATE------------------*/ - - /* INDEX */ - if(cstr_info) { - cstr_info->index_write = 0; - } - if (cp->disto_alloc || cp->fixed_quality) { /* fixed_quality */ - /* Normal Rate/distortion allocation */ - tcd_rateallocate(tcd, dest, len, cstr_info); - } else { - /* Fixed layer allocation */ - tcd_rateallocate_fixed(tcd); - } - } - /*--------------TIER2------------------*/ - - /* INDEX */ - if(cstr_info) { - cstr_info->index_write = 1; - } - - t2 = t2_create(tcd->cinfo, image, cp); - l = t2_encode_packets(t2,tileno, tile, tcd_tcp->numlayers, dest, len, cstr_info,tcd->tp_num,tcd->tp_pos,tcd->cur_pino,FINAL_PASS,tcd->cur_totnum_tp); - t2_destroy(t2); - - /*---------------CLEAN-------------------*/ - - - if(tcd->cur_tp_num == tcd->cur_totnum_tp - 1){ - tcd->encoding_time = opj_clock() - tcd->encoding_time; - opj_event_msg(tcd->cinfo, EVT_INFO, "- tile encoded in %f s\n", tcd->encoding_time); - - /* cleaning memory */ - for (compno = 0; compno < tile->numcomps; compno++) { - opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; - opj_aligned_free(tilec->data); - } - } - - return l; -} - -opj_bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno, opj_codestream_info_t *cstr_info) { - int l; - int compno; - int eof = 0; - double tile_time, t1_time, dwt_time; - opj_tcd_tile_t *tile = NULL; - - opj_t1_t *t1 = NULL; /* T1 component */ - opj_t2_t *t2 = NULL; /* T2 component */ - - tcd->tcd_tileno = tileno; - tcd->tcd_tile = &(tcd->tcd_image->tiles[tileno]); - tcd->tcp = &(tcd->cp->tcps[tileno]); - tile = tcd->tcd_tile; - - tile_time = opj_clock(); /* time needed to decode a tile */ - opj_event_msg(tcd->cinfo, EVT_INFO, "tile %d of %d\n", tileno + 1, tcd->cp->tw * tcd->cp->th); - - /* INDEX >> */ - if(cstr_info) { - int resno, compno, numprec = 0; - for (compno = 0; compno < cstr_info->numcomps; compno++) { - opj_tcp_t *tcp = &tcd->cp->tcps[0]; - opj_tccp_t *tccp = &tcp->tccps[compno]; - opj_tcd_tilecomp_t *tilec_idx = &tile->comps[compno]; - for (resno = 0; resno < tilec_idx->numresolutions; resno++) { - opj_tcd_resolution_t *res_idx = &tilec_idx->resolutions[resno]; - cstr_info->tile[tileno].pw[resno] = res_idx->pw; - cstr_info->tile[tileno].ph[resno] = res_idx->ph; - numprec += res_idx->pw * res_idx->ph; - if (tccp->csty & J2K_CP_CSTY_PRT) { - cstr_info->tile[tileno].pdx[resno] = tccp->prcw[resno]; - cstr_info->tile[tileno].pdy[resno] = tccp->prch[resno]; - } - else { - cstr_info->tile[tileno].pdx[resno] = 15; - cstr_info->tile[tileno].pdy[resno] = 15; - } - } - } - cstr_info->tile[tileno].packet = (opj_packet_info_t *) opj_malloc(cstr_info->numlayers * numprec * sizeof(opj_packet_info_t)); - cstr_info->packno = 0; - } - /* << INDEX */ - - /*--------------TIER2------------------*/ - - t2 = t2_create(tcd->cinfo, tcd->image, tcd->cp); - l = t2_decode_packets(t2, src, len, tileno, tile, cstr_info); - t2_destroy(t2); - - if (l == -999) { - eof = 1; - opj_event_msg(tcd->cinfo, EVT_ERROR, "tcd_decode: incomplete bistream\n"); - } - - /*------------------TIER1-----------------*/ - - t1_time = opj_clock(); /* time needed to decode a tile */ - t1 = t1_create(tcd->cinfo); - if (t1 == NULL) - { - opj_event_msg(tcd->cinfo, EVT_ERROR, "Out of memory\n"); - t1_destroy(t1); - return OPJ_FALSE; - } - - for (compno = 0; compno < tile->numcomps; ++compno) { - opj_tcd_tilecomp_t* tilec = &tile->comps[compno]; - /* The +3 is headroom required by the vectorized DWT */ - tilec->data = (int*) opj_aligned_malloc((((tilec->x1 - tilec->x0) * (tilec->y1 - tilec->y0))+3) * sizeof(int)); - if (tilec->data == NULL) - { - opj_event_msg(tcd->cinfo, EVT_ERROR, "Out of memory\n"); - return OPJ_FALSE; - } - - t1_decode_cblks(t1, tilec, &tcd->tcp->tccps[compno]); - } - t1_destroy(t1); - t1_time = opj_clock() - t1_time; - opj_event_msg(tcd->cinfo, EVT_INFO, "- tiers-1 took %f s\n", t1_time); - - /*----------------DWT---------------------*/ - - dwt_time = opj_clock(); /* time needed to decode a tile */ - for (compno = 0; compno < tile->numcomps; compno++) { - opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; - int numres2decode; - - if (tcd->cp->reduce != 0) { - if ( tile->comps[compno].numresolutions < ( tcd->cp->reduce - 1 ) ) { - opj_event_msg(tcd->cinfo, EVT_ERROR, "Error decoding tile. The number of resolutions to remove [%d+1] is higher than the number " - " of resolutions in the original codestream [%d]\nModify the cp_reduce parameter.\n", tcd->cp->reduce, tile->comps[compno].numresolutions); - return OPJ_FALSE; - } - else { - tcd->image->comps[compno].resno_decoded = - tile->comps[compno].numresolutions - tcd->cp->reduce - 1; - } - } - - numres2decode = tcd->image->comps[compno].resno_decoded + 1; - if(numres2decode > 0){ - if (tcd->tcp->tccps[compno].qmfbid == 1) { - dwt_decode(tilec, numres2decode); - } else { - dwt_decode_real(tilec, numres2decode); - } - } - } - dwt_time = opj_clock() - dwt_time; - opj_event_msg(tcd->cinfo, EVT_INFO, "- dwt took %f s\n", dwt_time); - - /*----------------MCT-------------------*/ - - if (tcd->tcp->mct) { - int n = (tile->comps[0].x1 - tile->comps[0].x0) * (tile->comps[0].y1 - tile->comps[0].y0); - - if (tile->numcomps >= 3 ){ - if (tcd->tcp->tccps[0].qmfbid == 1) { - mct_decode( - tile->comps[0].data, - tile->comps[1].data, - tile->comps[2].data, - n); - } else { - mct_decode_real( - (float*)tile->comps[0].data, - (float*)tile->comps[1].data, - (float*)tile->comps[2].data, - n); - } - } else{ - opj_event_msg(tcd->cinfo, EVT_WARNING,"Number of components (%d) is inconsistent with a MCT. Skip the MCT step.\n",tile->numcomps); - } - } - - /*---------------TILE-------------------*/ - - for (compno = 0; compno < tile->numcomps; ++compno) { - opj_tcd_tilecomp_t* tilec = &tile->comps[compno]; - opj_image_comp_t* imagec = &tcd->image->comps[compno]; - opj_tcd_resolution_t* res = &tilec->resolutions[imagec->resno_decoded]; - int adjust = imagec->sgnd ? 0 : 1 << (imagec->prec - 1); - int min = imagec->sgnd ? -(1 << (imagec->prec - 1)) : 0; - int max = imagec->sgnd ? (1 << (imagec->prec - 1)) - 1 : (1 << imagec->prec) - 1; - - int tw = tilec->x1 - tilec->x0; - int w = imagec->w; - - int offset_x = int_ceildivpow2(imagec->x0, imagec->factor); - int offset_y = int_ceildivpow2(imagec->y0, imagec->factor); - - int i, j; - if(!imagec->data){ - imagec->data = (int*) opj_malloc(imagec->w * imagec->h * sizeof(int)); - } - if (!imagec->data) - { - opj_event_msg(tcd->cinfo, EVT_ERROR, "Out of memory\n"); - return OPJ_FALSE; - } - if(tcd->tcp->tccps[compno].qmfbid == 1) { - for(j = res->y0; j < res->y1; ++j) { - for(i = res->x0; i < res->x1; ++i) { - int v = tilec->data[i - res->x0 + (j - res->y0) * tw]; - v += adjust; - imagec->data[(i - offset_x) + (j - offset_y) * w] = int_clamp(v, min, max); - } - } - }else{ - for(j = res->y0; j < res->y1; ++j) { - for(i = res->x0; i < res->x1; ++i) { - float tmp = ((float*)tilec->data)[i - res->x0 + (j - res->y0) * tw]; - int v = lrintf(tmp); - v += adjust; - imagec->data[(i - offset_x) + (j - offset_y) * w] = int_clamp(v, min, max); - } - } - } - opj_aligned_free(tilec->data); - } - - tile_time = opj_clock() - tile_time; /* time needed to decode a tile */ - opj_event_msg(tcd->cinfo, EVT_INFO, "- tile decoded in %f s\n", tile_time); - - if (eof) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -void tcd_free_decode(opj_tcd_t *tcd) { - opj_tcd_image_t *tcd_image = tcd->tcd_image; - int i = 0; - for (i = 0; i < tcd_image->tw * tcd_image->th; i++) - { - tcd_free_decode_tile(tcd, i); - } - - opj_free(tcd_image->tiles); -} - -void tcd_free_decode_tile(opj_tcd_t *tcd, int tileno) { - int compno,resno,bandno,precno,cblkno; - - opj_tcd_image_t *tcd_image = tcd->tcd_image; - - opj_tcd_tile_t *tile = &tcd_image->tiles[tileno]; - if (tile->comps != NULL) { - for (compno = 0; compno < tile->numcomps; compno++) { - opj_tcd_tilecomp_t *tilec = &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->ph * res->pw; precno++) { - opj_tcd_precinct_t *prec = &band->precincts[precno]; - if (prec->cblks.dec != NULL) { - for (cblkno = 0; cblkno < prec->cw * prec->ch; ++cblkno) { - opj_tcd_cblk_dec_t* cblk = &prec->cblks.dec[cblkno]; - opj_free(cblk->data); - opj_free(cblk->segs); - } - opj_free(prec->cblks.dec); - } - if (prec->imsbtree != NULL) tgt_destroy(prec->imsbtree); - if (prec->incltree != NULL) tgt_destroy(prec->incltree); - - - } - opj_free(band->precincts); - } - } - opj_free(tilec->resolutions); - } - opj_free(tile->comps); - tile->comps = NULL; - } -} - - - diff --git a/Source/LibOpenJPEG/tcd.h b/Source/LibOpenJPEG/tcd.h deleted file mode 100644 index e3f93ad..0000000 --- a/Source/LibOpenJPEG/tcd.h +++ /dev/null @@ -1,286 +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 __TCD_H -#define __TCD_H -/** -@file tcd.h -@brief Implementation of a tile coder/decoder (TCD) - -The functions in TCD.C have for goal to encode or decode each tile independently from -each other. The functions in TCD.C are used by some function in J2K.C. -*/ - -/** @defgroup TCD TCD - Implementation of a tile coder/decoder */ -/*@{*/ - -/** -FIXME: documentation -*/ -typedef struct opj_tcd_seg { - unsigned char** data; - int dataindex; - int numpasses; - int len; - int maxpasses; - int numnewpasses; - int newlen; -} opj_tcd_seg_t; - -/** -FIXME: documentation -*/ -typedef struct opj_tcd_pass { - int rate; - double distortiondec; - int term, len; -} opj_tcd_pass_t; - -/** -FIXME: documentation -*/ -typedef struct opj_tcd_layer { - int numpasses; /* Number of passes in the layer */ - int len; /* len of information */ - double disto; /* add for index (Cfr. Marcela) */ - unsigned char *data; /* data */ -} opj_tcd_layer_t; - -/** -FIXME: documentation -*/ -typedef struct opj_tcd_cblk_enc { - unsigned char* data; /* Data */ - opj_tcd_layer_t* layers; /* layer information */ - opj_tcd_pass_t* passes; /* information about the passes */ - int x0, y0, x1, y1; /* dimension of the code-blocks : left upper corner (x0, y0) right low corner (x1,y1) */ - int numbps; - int numlenbits; - int numpasses; /* number of pass already done for the code-blocks */ - int numpassesinlayers; /* number of passes in the layer */ - int totalpasses; /* total number of passes */ -} opj_tcd_cblk_enc_t; - -typedef struct opj_tcd_cblk_dec { - unsigned char* data; /* Data */ - opj_tcd_seg_t* segs; /* segments informations */ - int x0, y0, x1, y1; /* dimension of the code-blocks : left upper corner (x0, y0) right low corner (x1,y1) */ - int numbps; - int numlenbits; - int len; /* length */ - int numnewpasses; /* number of pass added to the code-blocks */ - int numsegs; /* number of segments */ -} opj_tcd_cblk_dec_t; - -/** -FIXME: documentation -*/ -typedef struct opj_tcd_precinct { - int x0, y0, x1, y1; /* dimension of the precinct : left upper corner (x0, y0) right low corner (x1,y1) */ - int cw, ch; /* number of precinct in width and heigth */ - union{ /* code-blocks informations */ - opj_tcd_cblk_enc_t* enc; - opj_tcd_cblk_dec_t* dec; - } cblks; - opj_tgt_tree_t *incltree; /* inclusion tree */ - opj_tgt_tree_t *imsbtree; /* IMSB tree */ -} opj_tcd_precinct_t; - -/** -FIXME: documentation -*/ -typedef struct opj_tcd_band { - int x0, y0, x1, y1; /* dimension of the subband : left upper corner (x0, y0) right low corner (x1,y1) */ - int bandno; - opj_tcd_precinct_t *precincts; /* precinct information */ - int numbps; - float stepsize; -} opj_tcd_band_t; - -/** -FIXME: documentation -*/ -typedef struct opj_tcd_resolution { - int x0, y0, x1, y1; /* dimension of the resolution level : left upper corner (x0, y0) right low corner (x1,y1) */ - int pw, ph; - int numbands; /* number sub-band for the resolution level */ - opj_tcd_band_t bands[3]; /* subband information */ -} opj_tcd_resolution_t; - -/** -FIXME: documentation -*/ -typedef struct opj_tcd_tilecomp { - int x0, y0, x1, y1; /* dimension of component : left upper corner (x0, y0) right low corner (x1,y1) */ - int numresolutions; /* number of resolutions level */ - opj_tcd_resolution_t *resolutions; /* resolutions information */ - int *data; /* data of the component */ - int numpix; /* add fixed_quality */ -} opj_tcd_tilecomp_t; - -/** -FIXME: documentation -*/ -typedef struct opj_tcd_tile { - int x0, y0, x1, y1; /* dimension of the tile : left upper corner (x0, y0) right low corner (x1,y1) */ - int numcomps; /* number of components in tile */ - opj_tcd_tilecomp_t *comps; /* Components information */ - int numpix; /* add fixed_quality */ - double distotile; /* add fixed_quality */ - double distolayer[100]; /* add fixed_quality */ - /** packet number */ - int packno; -} opj_tcd_tile_t; - -/** -FIXME: documentation -*/ -typedef struct opj_tcd_image { - int tw, th; /* number of tiles in width and heigth */ - opj_tcd_tile_t *tiles; /* Tiles information */ -} opj_tcd_image_t; - -/** -Tile coder/decoder -*/ -typedef struct opj_tcd { - /** Position of the tilepart flag in Progression order*/ - int tp_pos; - /** Tile part number*/ - int tp_num; - /** Current tile part number*/ - int cur_tp_num; - /** Total number of tileparts of the current tile*/ - int cur_totnum_tp; - /** Current Packet iterator number */ - int cur_pino; - /** codec context */ - opj_common_ptr cinfo; - - /** info on each image tile */ - opj_tcd_image_t *tcd_image; - /** image */ - opj_image_t *image; - /** coding parameters */ - opj_cp_t *cp; - /** pointer to the current encoded/decoded tile */ - opj_tcd_tile_t *tcd_tile; - /** coding/decoding parameters common to all tiles */ - opj_tcp_t *tcp; - /** current encoded/decoded tile */ - int tcd_tileno; - /** Time taken to encode a tile*/ - double encoding_time; -} opj_tcd_t; - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ - -/** -Dump the content of a tcd structure -*/ -void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t *img); -/** -Create a new TCD handle -@param cinfo Codec context info -@return Returns a new TCD handle if successful returns NULL otherwise -*/ -opj_tcd_t* tcd_create(opj_common_ptr cinfo); -/** -Destroy a previously created TCD handle -@param tcd TCD handle to destroy -*/ -void tcd_destroy(opj_tcd_t *tcd); -/** -Initialize the tile coder (allocate the memory) -@param tcd TCD handle -@param image Raw image -@param cp Coding parameters -@param curtileno Number that identifies the tile that will be encoded -*/ -void tcd_malloc_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int curtileno); -/** -Free the memory allocated for encoding -@param tcd TCD handle -*/ -void tcd_free_encode(opj_tcd_t *tcd); -/** -Initialize the tile coder (reuses the memory allocated by tcd_malloc_encode) -@param tcd TCD handle -@param image Raw image -@param cp Coding parameters -@param curtileno Number that identifies the tile that will be encoded -*/ -void tcd_init_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int curtileno); -/** -Initialize the tile decoder -@param tcd TCD handle -@param image Raw image -@param cp Coding parameters -*/ -void tcd_malloc_decode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp); -void tcd_malloc_decode_tile(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int tileno, opj_codestream_info_t *cstr_info); -void tcd_makelayer_fixed(opj_tcd_t *tcd, int layno, int final); -void tcd_rateallocate_fixed(opj_tcd_t *tcd); -void tcd_makelayer(opj_tcd_t *tcd, int layno, double thresh, int final); -opj_bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_codestream_info_t *cstr_info); -/** -Encode a tile from the raw image into a buffer -@param tcd TCD handle -@param tileno Number that identifies one of the tiles to be encoded -@param dest Destination buffer -@param len Length of destination buffer -@param cstr_info Codestream information structure -@return -*/ -int tcd_encode_tile(opj_tcd_t *tcd, int tileno, unsigned char *dest, int len, opj_codestream_info_t *cstr_info); -/** -Decode a tile from a buffer into a raw image -@param tcd TCD handle -@param src Source buffer -@param len Length of source buffer -@param tileno Number that identifies one of the tiles to be decoded -@param cstr_info Codestream information structure -*/ -opj_bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno, opj_codestream_info_t *cstr_info); -/** -Free the memory allocated for decoding -@param tcd TCD handle -*/ -void tcd_free_decode(opj_tcd_t *tcd); -void tcd_free_decode_tile(opj_tcd_t *tcd, int tileno); - -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __TCD_H */ diff --git a/Source/LibOpenJPEG/tgt.c b/Source/LibOpenJPEG/tgt.c deleted file mode 100644 index a5dbcd3..0000000 --- a/Source/LibOpenJPEG/tgt.c +++ /dev/null @@ -1,213 +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" - -/* -========================================================== - Tag-tree coder interface -========================================================== -*/ - -opj_tgt_tree_t *tgt_create(int numleafsh, int numleafsv) { - int nplh[32]; - int nplv[32]; - opj_tgt_node_t *node = NULL; - opj_tgt_node_t *parentnode = NULL; - opj_tgt_node_t *parentnode0 = NULL; - opj_tgt_tree_t *tree = NULL; - int i, j, k; - int numlvls; - int n; - - tree = (opj_tgt_tree_t *) opj_malloc(sizeof(opj_tgt_tree_t)); - if(!tree) return NULL; - tree->numleafsh = numleafsh; - tree->numleafsv = numleafsv; - - numlvls = 0; - nplh[0] = numleafsh; - nplv[0] = numleafsv; - tree->numnodes = 0; - do { - n = 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); - return NULL; - } - - tree->nodes = (opj_tgt_node_t*) opj_calloc(tree->numnodes, sizeof(opj_tgt_node_t)); - if(!tree->nodes) { - opj_free(tree); - return NULL; - } - - node = tree->nodes; - parentnode = &tree->nodes[tree->numleafsh * tree->numleafsv]; - parentnode0 = parentnode; - - for (i = 0; i < numlvls - 1; ++i) { - for (j = 0; j < nplv[i]; ++j) { - k = nplh[i]; - while (--k >= 0) { - node->parent = parentnode; - ++node; - if (--k >= 0) { - node->parent = parentnode; - ++node; - } - ++parentnode; - } - if ((j & 1) || j == nplv[i] - 1) { - parentnode0 = parentnode; - } else { - parentnode = parentnode0; - parentnode0 += nplh[i]; - } - } - } - node->parent = 0; - - tgt_reset(tree); - - return tree; -} - -void tgt_destroy(opj_tgt_tree_t *tree) { - opj_free(tree->nodes); - opj_free(tree); -} - -void tgt_reset(opj_tgt_tree_t *tree) { - int i; - - if (NULL == tree) - return; - - for (i = 0; i < tree->numnodes; i++) { - tree->nodes[i].value = 999; - tree->nodes[i].low = 0; - tree->nodes[i].known = 0; - } -} - -void tgt_setvalue(opj_tgt_tree_t *tree, int leafno, int value) { - opj_tgt_node_t *node; - node = &tree->nodes[leafno]; - while (node && node->value > value) { - node->value = value; - node = node->parent; - } -} - -void tgt_encode(opj_bio_t *bio, opj_tgt_tree_t *tree, int leafno, int threshold) { - opj_tgt_node_t *stk[31]; - opj_tgt_node_t **stkptr; - opj_tgt_node_t *node; - int 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) { - bio_write(bio, 1, 1); - node->known = 1; - } - break; - } - bio_write(bio, 0, 1); - ++low; - } - - node->low = low; - if (stkptr == stk) - break; - node = *--stkptr; - } -} - -int tgt_decode(opj_bio_t *bio, opj_tgt_tree_t *tree, int leafno, int threshold) { - opj_tgt_node_t *stk[31]; - opj_tgt_node_t **stkptr; - opj_tgt_node_t *node; - int 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 (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/Source/LibOpenJPEG/tgt.h b/Source/LibOpenJPEG/tgt.h deleted file mode 100644 index c08c8da..0000000 --- a/Source/LibOpenJPEG/tgt.h +++ /dev/null @@ -1,114 +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 __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; - int value; - int low; - int known; -} opj_tgt_node_t; - -/** -Tag tree -*/ -typedef struct opj_tgt_tree { - int numleafsh; - int numleafsv; - int numnodes; - opj_tgt_node_t *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 *tgt_create(int numleafsh, int numleafsv); -/** -Destroy a tag-tree, liberating memory -@param tree Tag-tree to destroy -*/ -void tgt_destroy(opj_tgt_tree_t *tree); -/** -Reset a tag-tree (set all leaves to 0) -@param tree Tag-tree to reset -*/ -void 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 tgt_setvalue(opj_tgt_tree_t *tree, int leafno, int 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 tgt_encode(opj_bio_t *bio, opj_tgt_tree_t *tree, int leafno, int 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 -*/ -int tgt_decode(opj_bio_t *bio, opj_tgt_tree_t *tree, int leafno, int threshold); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __TGT_H */ diff --git a/Source/LibOpenJPEG/thix_manager.c b/Source/LibOpenJPEG/thix_manager.c deleted file mode 100644 index 5183178..0000000 --- a/Source/LibOpenJPEG/thix_manager.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * $Id: thix_manager.c,v 1.2 2012/09/23 12:44:41 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 -#include -#include -#include "opj_includes.h" - -/* - * 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 write_tilemhix( int coff, opj_codestream_info_t cstr_info, int tileno, opj_cio_t *cio); - -int write_thix( int coff, opj_codestream_info_t cstr_info, opj_cio_t *cio) -{ - int len, lenp, i; - int tileno; - opj_jp2_box_t *box; - - lenp = 0; - box = (opj_jp2_box_t *)opj_calloc( cstr_info.tw*cstr_info.th, sizeof(opj_jp2_box_t)); - - for ( i = 0; i < 2 ; i++ ){ - if (i) - cio_seek( cio, lenp); - - lenp = cio_tell( cio); - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_THIX, 4); /* THIX */ - write_manf( i, cstr_info.tw*cstr_info.th, box, cio); - - for (tileno = 0; tileno < cstr_info.tw*cstr_info.th; tileno++){ - box[tileno].length = write_tilemhix( coff, cstr_info, tileno, cio); - box[tileno].type = JPIP_MHIX; - } - - len = cio_tell( cio)-lenp; - cio_seek( cio, lenp); - cio_write( cio, len, 4); /* L */ - cio_seek( cio, lenp+len); - } - - opj_free(box); - - return len; -} - -int write_tilemhix( int coff, opj_codestream_info_t cstr_info, int tileno, opj_cio_t *cio) -{ - int i; - opj_tile_info_t tile; - opj_tp_info_t tp; - int len, lenp; - opj_marker_info_t *marker; - - lenp = cio_tell( cio); - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_MHIX, 4); /* MHIX */ - - tile = cstr_info.tile[tileno]; - tp = tile.tp[0]; - - cio_write( cio, tp.tp_end_header-tp.tp_start_pos+1, 8); /* TLEN */ - - marker = cstr_info.tile[tileno].marker; - - for( i=0; i -#include "opj_includes.h" - -#define MAX(a,b) ((a)>(b)?(a):(b)) - - -/* - * 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 write_tpixfaix( int coff, int compno, opj_codestream_info_t cstr_info, int j2klen, opj_cio_t *cio); - - -int write_tpix( int coff, opj_codestream_info_t cstr_info, int j2klen, opj_cio_t *cio) -{ - int len, lenp; - lenp = cio_tell( cio); - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_TPIX, 4); /* TPIX */ - - write_tpixfaix( coff, 0, cstr_info, j2klen, cio); - - len = cio_tell( cio)-lenp; - cio_seek( cio, lenp); - cio_write( cio, len, 4); /* L */ - cio_seek( cio, lenp+len); - - return len; -} - - -/* - * 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); - -int write_tpixfaix( int coff, int compno, opj_codestream_info_t cstr_info, int j2klen, opj_cio_t *cio) -{ - int len, lenp; - int i, j; - int Aux; - int num_max_tile_parts; - int size_of_coding; /* 4 or 8 */ - opj_tp_info_t tp; - int version; - - num_max_tile_parts = 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 = cio_tell( cio); - cio_skip( cio, 4); /* L [at the end] */ - cio_write( cio, JPIP_FAIX, 4); /* FAIX */ - cio_write( cio, version, 1); /* Version 0 = 4 bytes */ - - cio_write( cio, num_max_tile_parts, size_of_coding); /* NMAX */ - cio_write( cio, cstr_info.tw*cstr_info.th, size_of_coding); /* M */ - for (i = 0; i < cstr_info.tw*cstr_info.th; i++){ - for (j = 0; j < cstr_info.tile[i].num_tps; j++){ - tp = cstr_info.tile[i].tp[j]; - cio_write( cio, tp.tp_start_pos-coff, size_of_coding); /* start position */ - cio_write( cio, tp.tp_end_pos-tp.tp_start_pos+1, size_of_coding); /* length */ - if (version & 0x02){ - if( cstr_info.tile[i].num_tps == 1 && cstr_info.numdecompos[compno] > 1) - Aux = cstr_info.numdecompos[compno] + 1; - else - Aux = j + 1; - - cio_write( cio, Aux,4); - /*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){ - cio_write( cio, 0, size_of_coding); /* start position */ - cio_write( cio, 0, size_of_coding); /* length */ - if (version & 0x02) - cio_write( cio, 0,4); /* Aux_i,j : Auxiliary value */ - j++; - } - } - - len = cio_tell( cio)-lenp; - cio_seek( cio, lenp); - cio_write( cio, len, 4); /* L */ - cio_seek( cio, lenp+len); - - return 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] - 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. - -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 pallete. - -Version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004] - Fixed buffer overflow vulnerability in png_handle_tRNS() - Fixed integer arithmetic overflow vulnerability 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() occuring 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 pendantic 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 configureable. - 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 unitialized 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 (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 concatentation - 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 desireable 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 pngset() and png_convert_to_rfc1123() - (Frank Busse). - 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. - -Version 1.5.8beta01 [January 15, 2011] - Removed '#include config.h"' from contrib/libtests/pngvalid.c. It's not - needed and causes trouble for VPATH building. - Moved AC_MSG_CHECKING([if libraries can be versioned]) later to the proper - location in configure.ac (Gilles Espinasse). - Fix bug in pngerror.c: some long warnings were being improperly truncated - (CVE-2011-3464, bug introduced in libpng-1.5.3beta05). - -Version 1.5.8rc01 [January 21, 2012] - No changes. - -Version 1.5.8rc02 [January 25, 2012] - Fixed Min/GW uninstall to remove libpng.dll.a - Conditionalize the install rules for MINGW and CYGWIN in CMakeLists.txt - -Version 1.5.8 [February 1, 2012] - No changes. - -Version 1.5.9beta01 [February 3, 2012] - Rebuilt configure scripts in the tar distributions. - -Version 1.5.9beta02 [February 16, 2012] - Removed two unused definitions from scripts/pnglibconf.h.prebuilt - Removed some unused arrays (with #ifdef) from png_read_push_finish_row(). - Removed tests for no-longer-used *_EMPTY_PLTE_SUPPORTED from pngstruct.h - -Version 1.5.9rc01 [February 17, 2012] - 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.5.9 [February 18, 2012] - No changes. - -Version 1.5.10beta01 [February 24, 2012] - Removed two useless #ifdef directives from pngread.c and one from pngrutil.c - Always put the CMAKE_LIBRARY in "lib" (removed special WIN32 case). - Removed empty vstudio/pngstest directory (Clifford Yapp). - 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. - Fixed bug with png_handle_hIST with odd chunk length (Frank Busse). - Added PNG_SAFE_LIMITS feature to pnglibconf.dfa and code in pngconf.h - to reset the user limits to safe ones if PNG_SAFE_LIMITS is defined. - To enable, use "CPPFLAGS=-DPNG_SAFE_LIMITS_SUPPORTED" on the configure - command or put "#define PNG_SAFE_LIMITS_SUPPORTED" in pnglibconf.h. - Revised the SAFE_LIMITS feature to be the same as the feature in libpng16. - Added information about the new limits in the manual. - -Version 1.5.10beta02 [February 27, 2012] - Updated Makefile.in - -Version 1.5.10beta03 [March 6, 2012] - Removed unused "current_text" members of png_struct and the png_free() - of png_ptr->current_text from pngread.c - Added palette-index checking. Issue a png_warning() if an invalid index is - found. - -Version 1.5.10beta04 [March 10, 2012] - Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition. - Fixed CMF optimization of non-IDAT compressed chunks, which was added at - libpng-1.5.4. It sometimes produced too small of a window. - -Version 1.5.10beta05 [March 10, 2012] - Reject all iCCP chunks after the first, even if the first one is invalid. - Issue a png_benign_error() instead of png_warning() about bad palette index. - Fixed an off-by-one error in the palette index checking function. - 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. - -Version 1.5.10 [March 29, 2012] - Prevent PNG_EXPAND+PNG_SHIFT doing the shift twice. - Revised png_set_text_2() to avoid potential memory corruption (fixes - CVE-2011-3048, also known as CVE-2012-3425). - -Version 1.5.11beta01 [April 28, 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/#endif 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.5.11rc01 [May 23, 2012] - No changes. - -Version 1.5.11rc02 [May 29, 2012] - Fixed some typos in comments. - Revised CMakeLists.txt to not attempt to make a symlink under mingw. - 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.5.11rc03 [June 4, 2012] - Do not depend upon a GCC feature macro being available for use in generating - the linker mapfile symbol prefix. - Made fixes for new optimization warnings from gcc 4.7.0. The compiler - performed an optimization which is safe but then warned about it. - Changing the type of 'palette_number' in pngvalid.c removes the warning. - -Version 1.5.11rc04 [June 6, 2012] - Improved performance of new do_check_palette_indexes() function. - -Version 1.5.11rc05 [June 7, 2012] - Don't check palette indexes if num_palette is 0 (as it can be in MNG files). - -Version 1.5.11 [June 14, 2012] - Include zlib.h in contrib/gregbook and contrib/visupng examples. - -Version 1.5.12 [July 11, 2012] - Removed scripts/makefile.cegcc from the *.zip and *.7z distributions; it - depends on configure, which is not included in those archives. - Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386. - -Version 1.5.13beta01 [August 8, 2012] - Do not compile PNG_DEPRECATED, PNG_ALLOC and PNG_PRIVATE when __GNUC__ < 3. - Removed references to png_zalloc() and png_zfree() from the manual. - Revised PNG_FP_EXPORT and PNG_FIXED_EXPORT macros to avoid generating - lone semicolons (patch ported from libpng-1.6.0beta11). - -Version 1.5.13beta02 [September 10, 2012] - Corrected handling of the image array and the row_pointers array in example.c - When png_set_filler is used to strip a filler channel during write, the - code prior to 1.5 would ignore the case where the output required an - alpha channel or when the output was a palettized PNG. In libpng-1.5 the - ignorance was lost and libpng proceeded to strip the channel resulting - in a bad (potential memory overwrite) failure later. This reverts - the behavior to the pre-1.5 state but issues a warning. libpng-1.6 is - expected to issue an error on the erroneous png_set_filler call. - Use png_memset() consistently (pngmem.c contained some bare "memset" calls). - -Version 1.5.13rc01 [September 17, 2012] - No changes. - -Version 1.5.13 [September 27, 2012] - No changes. - -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) -or to glennrp at users.sourceforge.net - -Glenn R-P -#endif diff --git a/Source/LibPNG/INSTALL b/Source/LibPNG/INSTALL deleted file mode 100644 index 353bfff..0000000 --- a/Source/LibPNG/INSTALL +++ /dev/null @@ -1,135 +0,0 @@ - -Installing libpng - -On Unix/Linux and similar systems, you can simply type - - ./configure [--prefix=/path] - make check - make install - -and ignore the rest of this document. - -If configure does not work on your system and you have a reasonably -up-to-date set of tools, running ./autogen.sh before running ./configure -may fix the problem. You can also run the individual commands in -autogen.sh with the --force option, if supported by your version of -the tools. To be really sure that you aren't using any of the included -pre-built scripts, you can do this: - - ./configure --enable-maintainer-mode - make maintainer-clean - ./autogen.sh - ./configure [--prefix=/path] [other options] - make - make install - make check - -Instead, you can use one of the custom-built makefiles in the -"scripts" directory - - 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. zlib can be placed in another directory, -at the same level as libpng. - -If you want to use "cmake" (see www.cmake.org), type - - cmake . -DCMAKE_INSTALL_PREFIX=/path - make - make install - -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. - -You can rename the directories that you downloaded (they -might be called "libpng-x.y.z" or "libpngNN" and "zlib-1.2.5" -or "zlib125") 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 - 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 - gregbook - pngminim - pngminus - pngsuite - visupng - projects - visualc71 - vstudio - 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. - -If you are building libpng with MSVC, you can enter the -libpng projects\visualc6 or visualc71 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. - -Copy the file (or files) that you need from the -scripts directory into this directory, for example - - MSDOS example: copy scripts\makefile.msc makefile - UNIX example: cp scripts/makefile.std makefile - -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". - -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. diff --git a/Source/LibPNG/LICENSE b/Source/LibPNG/LICENSE deleted file mode 100644 index 16a7d9e..0000000 --- a/Source/LibPNG/LICENSE +++ /dev/null @@ -1,111 +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.2.6, August 15, 2004, through 1.5.13, September 27, 2012, are -Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are -distributed according to the same disclaimer and license as libpng-1.2.5 -with the following individual added to the list of Contributing Authors - - Cosmin Truta - -libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are -Copyright (c) 2000-2002 Glenn Randers-Pehrson, 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 - Gilles Vollant - -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. - -libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are -Copyright (c) 1998, 1999 Glenn Randers-Pehrson, 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 -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 - -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. - - -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). - -Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a -certification mark of the Open Source Initiative. - -Glenn Randers-Pehrson -glennrp at users.sourceforge.net -September 27, 2012 diff --git a/Source/LibPNG/LibPNG.2003.vcproj b/Source/LibPNG/LibPNG.2003.vcproj deleted file mode 100644 index 2abf944..0000000 --- a/Source/LibPNG/LibPNG.2003.vcproj +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/LibPNG/LibPNG.2005.vcproj b/Source/LibPNG/LibPNG.2005.vcproj deleted file mode 100644 index ee56c83..0000000 --- a/Source/LibPNG/LibPNG.2005.vcproj +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/LibPNG/LibPNG.2008.vcproj b/Source/LibPNG/LibPNG.2008.vcproj deleted file mode 100644 index 02ec9e2..0000000 --- a/Source/LibPNG/LibPNG.2008.vcproj +++ /dev/null @@ -1,434 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/LibPNG/README b/Source/LibPNG/README deleted file mode 100644 index ca26e4b..0000000 --- a/Source/LibPNG/README +++ /dev/null @@ -1,202 +0,0 @@ -README for libpng version 1.5.13 - September 27, 2012 (shared library 15.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, -libpng-*.tar.xz or libpng-*.tar.bz2 if you want UNIX-style line endings -in the text files, 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 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 do not make current programs -that access the info struct directly incompatible with the new -library. However, 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. -ftp://ftp.info-zip.org/pub/infozip/zlib - -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/documents/ - -This code is currently being archived at libpng.sf.net in the -[DOWNLOAD] area, and on CompuServe, Lib 20 (PNG SUPPORT) -at GO GRAPHSUP. If you can't find it in any of those places, -e-mail me, and I'll help you find it. - -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) or to glennrp at users.sourceforge.net - -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 sixteen 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 - contrib => Contributions - gregbook => source code for PNG reading and writing, from - Greg Roelofs' "PNG: The Definitive Guide", - O'Reilly, 1999 - msvctest => Builds and runs pngtest using a MSVC workspace - pngminus => Simple pnm2png and png2pnm programs - pngsuite => Test images - visupng => Contains a MSVC workspace for VisualPng - projects => Contains project files and workspaces for - building a DLL - cbuilder5 => Contains a Borland workspace for building - libpng and zlib - visualc6 => Contains a Microsoft Visual C++ (MSVC) - workspace for building libpng and zlib - visualc71 => Contains a Microsoft Visual C++ (MSVC) - workspace for building libpng and zlib - xcode => Contains an Apple xcode - 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/Source/LibPNG/TODO b/Source/LibPNG/TODO deleted file mode 100644 index 6e1f028..0000000 --- a/Source/LibPNG/TODO +++ /dev/null @@ -1,27 +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. -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. -Switch to the simpler zlib (zlib/libpng) license if legally possible. -Extend pngvalid.c to validate more of the libpng transformations. - -*/ diff --git a/Source/LibPNG/configure b/Source/LibPNG/configure deleted file mode 100644 index ee0ac54..0000000 --- a/Source/LibPNG/configure +++ /dev/null @@ -1,19 +0,0 @@ - -echo " - There is no \"configure\" script in this distribution (*.zip or *.7z) of - libpng-1.5.13. - - Instead, please copy the appropriate makefile for your system from the - \"scripts\" directory. Read the INSTALL file for more details. - - Update, July 2004: you can get a \"configure\" based distribution - from the libpng distribution sites. Download the file - libpng-1.5.13.tar.gz, libpng-1.5.13.tar.xz, or libpng-1.5.13.tar.bz2 - - If the line endings in the files look funny, which is likely to be the - case if you were trying to run \"configure\" on a Linux machine, you may - wish to get the other distribution of libpng. It is available in both - tar.gz/tar.xz (UNIX style line endings, with \"configure\") and .7z/.zip - (DOS style line endings, without \"configure\") formats. -" - diff --git a/Source/LibPNG/example.c b/Source/LibPNG/example.c deleted file mode 100644 index 86068ea..0000000 --- a/Source/LibPNG/example.c +++ /dev/null @@ -1,879 +0,0 @@ - -#if 0 /* in case someone actually tries to compile this */ - -/* example.c - an example of using libpng - * Last changed in libpng 1.5.10 [March 8, 2012] - * Maintained 1998-2012 Glenn Randers-Pehrson - * Maintained 1996, 1997 Andreas Dilger - * Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - */ - -/* 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. - * To the extent possible under law, the authors have waived all copyright and - * related or neighboring rights to this file. - * - * 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. - */ - -#define _POSIX_SOURCE 1 /* libpng and zlib are POSIX-compliant. You may - * change this if your application uses non-POSIX - * extensions. */ - -#include "png.h" - - /* 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, (png_size_t)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; - unsigned 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, unsigned 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 bit/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)) - 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)) - 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 = 2.2; /* A good guess for a PC monitor in a dimly - lit room */ - screen_gamma = 1.7 or 1.0; /* A good guess 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)) - png_set_gamma(png_ptr, screen_gamma, 0.45455); - else - { - double image_gamma; - if (png_get_gAMA(png_ptr, info_ptr, &image_gamma)) - 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) - { - 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)) - { - 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 /* PNG_READ_QUANTIZE_SUPPORTED */ - - /* 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)) - { - 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) - 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, 0xff, 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 - number_passes = 1; -#endif /* PNG_READ_INTERLACING_SUPPORTED */ - - - /* 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 png_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 /* PNG_READ_INTERLACING_SUPPORTED */ -} - -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 - * png_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 - * chunks 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, 2, 4 bit packed pixel formats */ - png_set_packswap(png_ptr); - - /* Turn on interlace handling if you are not using png_write_image() */ - if (interlacing) - 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 */ - png_byte image[height*width*bytes_per_pixel]; - - png_bytep row_pointers[height]; - - if (height > PNG_UINT_32_MAX/png_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/Source/LibPNG/libpng-manual.txt b/Source/LibPNG/libpng-manual.txt deleted file mode 100644 index 5b17ba8..0000000 --- a/Source/LibPNG/libpng-manual.txt +++ /dev/null @@ -1,4667 +0,0 @@ -Libpng-manual.txt - A description on how to use and modify libpng - - libpng version 1.5.13 - September 27, 2012 - Updated and distributed by Glenn Randers-Pehrson - - Copyright (c) 1998-2012 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.5.13 - September 27, 2012 - Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2012 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 - -I. Introduction - -This file describes how to use and modify the PNG reference library -(known as libpng) for your own use. There are five sections to this -file: introduction, structures, reading, writing, and modification and -configuration notes for various special platforms. 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 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:2003 (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_USR_CONFIG - -If -DPNG_USR_CONFIG is added to the CFLAGS 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_read() -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); - } - - fread(header, 1, number, fp); - 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. 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 - -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; - png_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 will be saved when read, in case your callback function will need -one or more of them. This behavior can be changed with the -png_set_keep_unknown_chunks() function, described below. - -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 0) - - num_chunks - number of chunks affected; if 0, all - unknown chunks are affected. If nonzero, - only the chunks in the list 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: */ - png_set_keep_unknown_chunks(read_ptr, 1, 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. -Since very few applications really need to process such large images, -we have imposed an arbitrary 1-million limit on rows and columns. -Larger images will be rejected immediately with a png_error() call. If -you wish to change this limit, you can use - - png_set_user_limits(png_ptr, width_max, height_max); - -to set your own limits, or use width_max = height_max = 0x7fffffffL -to allow all valid dimensions (libpng may reject some very large 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. You can impose a limit on the total number -of sPLT, tEXt, iTXt, zTXt, and unknown 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); - -This limit also applies to the number of buffers that can be allocated -by png_decompress_chunk() while decompressing iTXt, zTXt, and iCCP chunks. - -You can also set a limit on the amount of memory that a compressed chunk -other than IDAT can occupy, 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, 1/screen_gamma/*file gamma*/); - -or you can use the fixed point equivalent: - - png_set_gamma_fixed(png_ptr, PNG_FP_1*screen_gamma, PNG_FP_1/screen_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 reencode 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 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!) - - 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 -an appropriate format to try if your software, or more -likely hardware, is totally broken, i.e., if it performs -linear arithmetic directly on gamma encoded values. - -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. - -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/png_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*png_sizeof(png_bytep)); - - 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. - - 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 was - 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); - - file_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_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 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 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. This transformation -does not affect images that already have full alpha channels. To add an -opaque alpha channel, use filler=0xff or 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. -This 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, -, 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 then 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. - -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_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); - -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); - -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 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. - - 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_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 then 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 then 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 for - 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. - -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); - -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_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(png_ptr, png_timep) is provided to convert -from PNG time to an RFC 1123 format string. - -Writing unknown chunks - -You can use the png_set_unknown_chunks function to queue up chunks -for writing. You give it a chunk name, raw data, and a size; 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. -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. - -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. 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. Since it is -unlikely that the method of handling memory allocation on a platform -will change between applications, these functions must be modified in -the library at compile time. 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, png_size_t length); - - void user_write_data(png_structp png_ptr, - png_bytep data, png_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); - - png_voidp error_ptr = png_get_error_ptr(png_ptr); - -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); - -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 http://cexcept.sourceforge.net), -which is illustrated in pngvalid.c and in contrib/visupng. - -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 16-bit platforms - -You will want to look into zconf.h to tell zlib (and thus libpng) that -it cannot allocate more then 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. - -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. - -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 *". - -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 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. - -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); - - 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 and PNG_NO_FILTERS -to turn filtering on and off, 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_FILTER_NONE | PNG_FILTER_SUB - PNG_FILTER_UP | PNG_FILTER_AVG | - PNG_FILTER_PAETH | PNG_ALL_FILTERS; - - 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(). - -It is also possible to influence how libpng chooses from among the -available filters. This is done in one or both of two ways - by -telling it how important it is to keep the same filter for successive -rows, and by telling it the relative computational costs of the filters. - - double weights[3] = {1.5, 1.3, 1.1}, - costs[PNG_FILTER_VALUE_LAST] = - {1.0, 1.3, 1.3, 1.5, 1.7}; - - png_set_filter_heuristics(png_ptr, - PNG_FILTER_HEURISTIC_WEIGHTED, 3, - weights, costs); - -The weights are multiplying factors that indicate to libpng that the -row filter should be the same for successive rows unless another row filter -is that many times better than the previous filter. In the above example, -if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a -"sum of absolute differences" 1.5 x 1.3 times higher than other filters -and still be chosen, while the NONE filter could have a sum 1.1 times -higher than other filters and still be chosen. Unspecified weights are -taken to be 1.0, and the specified weights should probably be declining -like those above in order to emphasize recent filters over older filters. - -The filter costs specify for each filter type a relative decoding cost -to be considered when selecting row filters. This means that filters -with higher costs are less likely to be chosen over filters with lower -costs, unless their "sum of absolute differences" is that much smaller. -The costs do not necessarily reflect the exact computational speeds of -the various filters, since this would unduly influence the final image -size. - -Note that the numbers above were invented purely for this example and -are given only to help explain the function usage. Little testing has -been done to find optimum values for either the costs or the weights. - -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. - -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\n", 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. - -VI. 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 -http://www.libmng.com) instead. - -VII. 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. - -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; - -VIII. 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. - -IX. 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(), png_memcpy(), -and png_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 png_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 reenabled, 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. - -X. 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. - -Checking for invalid palette index on read or write was added at libpng -1.5.10. When an invalid index is found, libpng issues a benign error. -This is enabled by default but can be disabled in each png_ptr with - - png_set_check_for_invalid_index(png_ptr, allowed); - - allowed - one of - 0: disable - 1: enable - -A. Changes that affect users of libpng - -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. - -We no longer include zlib.h in png.h. Applications that need access -to information in zlib.h will need to add the '#include "zlib.h"' -directive. It does not matter whether it 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. - -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. - -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. libpng 1.5.0 -is consistent with the implementation in 1.4.5 and 1.2.x (where the macro -did not exist.) - -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. - -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.10, the user limits can be set en masse with the -configuration option PNG_SAFE_LIMITS_SUPPORTED. If this option is enabled, -a set of "safe" limits is applied in pngpriv.h. 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() that increase or decrease the limits. Also, -in libpng-1.5.10 the default width and height limits were increased -from 1,000,000 to 0x7ffffff (i.e., made unlimited). Therefore, the -limits are now - default safe - png_user_width_max 0x7fffffff 1,000,000 - png_user_height_max 0x7fffffff 1,000,000 - png_user_chunk_cache_max 0 (unlimited) 128 - png_user_chunk_malloc_max 0 (unlimited) 8,000,000 - -B. Changes to the build and configuration of libpng - -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. - -B.1 Specific changes to library configuration capabilities - -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. 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. - -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.) - -B.2 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, when 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 rarely used alternative of adding a list of feature macros to the -CFLAGS 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 removed. 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 a case where pngusr.h is still required. - -XI. 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, ... - -XII. 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 - - git://libpng.git.sourceforge.net/gitroot/libpng - -or you can browse it via "gitweb" at - - http://libpng.git.sourceforge.net/git/gitweb.cgi?p=libpng - -Patches can be sent to glennrp at users.sourceforge.net or to -png-mng-implement at lists.sourceforge.net or you can upload them to -the libpng bug tracker at - - http://libpng.sourceforge.net - -We also accept patches built from the tar or zip distributions, and -simple verbal discriptions of bug fixes, reported either to the -SourceForge bug tracker, to the png-mng-implement at lists.sf.net -mailing list, or directly to glennrp. - -XIII. Coding style - -Our coding style is similar to the "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 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 ^ and in libpngpf.3 */ - -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 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 prefer to express integers that are used as bit masks in hex format, -with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100). - -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. - -XIV. Y2K Compliance in libpng - -September 27, 2012 - -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.5.13 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 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 will no -longer be 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() in png.c - (formerly png_convert_to_rfc_1152() in error) - 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/Source/LibPNG/libpng.3 b/Source/LibPNG/libpng.3 deleted file mode 100644 index 6cfd7c6..0000000 --- a/Source/LibPNG/libpng.3 +++ /dev/null @@ -1,5996 +0,0 @@ -.TH LIBPNG 3 "September 27, 2012" -.SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.5.13 -.SH SYNOPSIS -\fI\fB - -\fB#include \fP - -\fI\fB - -\fBpng_uint_32 png_access_version_number \fI(void\fP\fB);\fP - -\fI\fB - -\fBvoid png_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP - -\fI\fB - -\fBvoid png_build_grayscale_palette (int \fP\fIbit_depth\fP\fB, png_colorp \fIpalette\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_calloc (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP - -\fI\fB - -\fBvoid png_chunk_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP - -\fI\fB - -\fBvoid png_chunk_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP - -\fI\fB - -\fBvoid png_chunk_warning (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fImessage\fP\fB);\fP - -\fI\fB - -\fBvoid png_convert_from_struct_tm (png_timep \fP\fIptime\fP\fB, struct tm FAR * \fIttime\fP\fB);\fP - -\fI\fB - -\fBvoid png_convert_from_time_t (png_timep \fP\fIptime\fP\fB, time_t \fIttime\fP\fB);\fP - -\fI\fB - -\fBpng_charp png_convert_to_rfc1123 (png_structp \fP\fIpng_ptr\fP\fB, png_timep \fIptime\fP\fB);\fP - -\fI\fB - -\fBpng_infop png_create_info_struct (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_destroy_info_struct (png_structp \fP\fIpng_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_destroy_write_struct (png_structpp \fP\fIpng_ptr_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_err (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP - -\fI\fB - -\fBvoid png_free (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_free_chunk_list (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_free_default (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_free_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fInum\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_bit_depth (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBpng_byte png_get_channels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBpng_uint_32 png_get_cHRM_XYZ (png_structp \fIpng_ptr, - -\fBpng_const_infop \fP\fIinfo_ptr\fP\fB, double \fP\fI*red_X\fP\fB, double \fP\fI*red_Y\fP\fB, double \fI*red_Z, - -\fBdouble \fP\fI*green_X\fP\fB, double \fP\fI*green_Y\fP\fB, double \fP\fI*green_Z\fP\fB, double \fI*blue_X, - -\fBdouble \fP\fI*blue_Y\fP\fB, double \fI*blue_Z\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBpng_uint_32 png_get_chunk_cache_max (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_alloc_size_t png_get_chunk_malloc_max (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_color_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_compression_buffer_size (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_compression_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_copyright (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_current_row_number \fI(png_const_structp\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_current_pass_number \fI(png_const_structp\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_get_error_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_filter_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBpng_byte png_get_header_ver (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_header_version (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBpng_uint_32 png_get_image_height (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_image_width (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_int_32 png_get_int_32 (png_bytep \fIbuf\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_interlace_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_const_bytep png_get_io_chunk_name (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_io_chunk_type (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_get_io_ptr (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_io_state (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_libpng_ver (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_get_mem_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBfloat png_get_pixel_aspect_ratio (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBpng_uint_32 png_get_pixels_per_inch (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_pixels_per_meter (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_get_progressive_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBpng_byte png_get_rgb_to_gray_status (png_const_structp \fIpng_ptr) - -\fBpng_uint_32 png_get_rowbytes (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_bytepp png_get_rows (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBpng_bytep png_get_signature (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fB/* This function is really an inline macro. \fI*/ - -\fBpng_uint_16 png_get_uint_16 (png_bytep \fIbuf\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_uint_31 (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIbuf\fP\fB);\fP - -\fI\fB - -\fB/* This function is really an inline macro. \fI*/ - -\fBpng_uint_32 png_get_uint_32 (png_bytep \fIbuf\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBpng_voidp png_get_user_chunk_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_user_height_max (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_get_user_transform_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_user_width_max (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBfloat png_get_x_offset_inches (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_fixed_point png_get_x_offset_inches_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_int_32 png_get_x_offset_microns (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_int_32 png_get_x_offset_pixels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBfloat png_get_y_offset_inches (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_fixed_point png_get_y_offset_inches_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_int_32 png_get_y_offset_microns (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_int_32 png_get_y_offset_pixels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBint png_handle_as_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP - -\fI\fB - -\fBvoid png_info_init_3 (png_infopp \fP\fIinfo_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP - -\fI\fB - -\fBvoid png_init_io (png_structp \fP\fIpng_ptr\fP\fB, FILE \fI*fp\fP\fB);\fP - -\fI\fB - -\fBvoid png_longjmp (png_structp \fP\fIpng_ptr\fP\fB, int \fIval\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_malloc_default (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_malloc_warn (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_permit_mng_features (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fImng_features_permitted\fP\fB);\fP - -\fI\fB - -\fBvoid png_process_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_size\fP\fB);\fP - -\fI\fB - -\fBpng_size_t png_process_data_pause \fP\fI(png_structp\fP\fB, int \fIsave\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_process_data_skip \fI(png_structp\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_read_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fIdisplay_row\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_read_update_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBint png_reset_zstream (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP - -\fI\fB - -\fBvoid png_save_uint_16 (png_bytep \fP\fIbuf\fP\fB, unsigned int \fIi\fP\fB);\fP - -\fI\fB - -\fBvoid png_save_uint_32 (png_bytep \fP\fIbuf\fP\fB, png_uint_32 \fIi\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_add_alpha (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_alpha_mode (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fImode\fP\fB, double \fIoutput_gamma\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_benign_errors (png_structp \fP\fIpng_ptr\fP\fB, int \fIallowed\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_bgr (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_check_for_invalid_index(png_structrp \fP\fIpng_ptr\fP\fB, int \fIallowed\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 \fIgreen_Y, - -\fBdouble \fP\fIgreen_Z\fP\fB, double \fP\fIblue_X\fP\fB, double \fP\fIblue_Y\fP\fB, double \fIblue_Z\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_chunk_cache_max (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIuser_chunk_cache_max\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_compression_mem_level (png_structp \fP\fIpng_ptr\fP\fB, int \fImem_level\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_compression_method (png_structp \fP\fIpng_ptr\fP\fB, int \fImethod\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_compression_strategy (png_structp \fP\fIpng_ptr\fP\fB, int \fIstrategy\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_compression_window_bits (png_structp \fP\fIpng_ptr\fP\fB, int \fIwindow_bits\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_crc_action (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcrit_action\fP\fB, int \fIancil_action\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_expand (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_expand_16 (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_expand_gray_1_2_4_to_8 (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_filler (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_filter (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fImethod\fP\fB, int \fIfilters\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_flush (png_structp \fP\fIpng_ptr\fP\fB, int \fInrows\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_gamma (png_structp \fP\fIpng_ptr\fP\fB, double \fP\fIscreen_gamma\fP\fB, double \fIdefault_file_gamma\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_gray_1_2_4_to_8 (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_gray_to_rgb (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBint png_set_interlace_handling (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_invalid (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fImask\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_invert_alpha (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_invert_mono (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_chunk_malloc_max (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIuser_chunk_cache_max\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_compression_buffer_size (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_packing (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_packswap (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_palette_to_rgb (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_read_status_fn (png_structp \fP\fIpng_ptr\fP\fB, png_read_status_ptr \fIread_row_fn\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_scale_16 (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_shift (png_structp \fP\fIpng_ptr\fP\fB, png_color_8p \fItrue_bits\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_sig_bytes (png_structp \fP\fIpng_ptr\fP\fB, int \fInum_bytes\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIsrgb_intent\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_strip_16 (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_strip_alpha (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_strip_error_numbers (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIstrip_mode\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_swap (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_swap_alpha (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_text_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_text_compression_mem_level (png_structp \fP\fIpng_ptr\fP\fB, int \fImem_level\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_text_compression_strategy (png_structp \fP\fIpng_ptr\fP\fB, int \fIstrategy\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_text_compression_window_bits (png_structp \fP\fIpng_ptr\fP\fB, int \fIwindow_bits\fP\fB);\fP - -\fI\fB - -\fBvoid \fP\fIpng_set_text_compression_method\fP\fB, (png_structp \fP\fIpng_ptr\fP\fB, int \fImethod)\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_tRNS_to_alpha (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_set_write_status_fn (png_structp \fP\fIpng_ptr\fP\fB, png_write_status_ptr \fIwrite_row_fn\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBint png_sig_cmp (png_bytep \fP\fIsig\fP\fB, png_size_t \fP\fIstart\fP\fB, png_size_t \fInum_to_check\fP\fB);\fP - -\fI\fB - -\fBvoid png_start_read_image (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_warning (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fImessage\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_chunk_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_chunk_end (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_write_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_flush (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_info_before_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_write_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\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 - -\fI\fB - -\fBvoid png_write_sig (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -.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.5.13 - September 27, 2012 - Updated and distributed by Glenn Randers-Pehrson - - Copyright (c) 1998-2012 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.5.13 - September 27, 2012 - Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2012 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 - -.SH I. Introduction - -This file describes how to use and modify the PNG reference library -(known as libpng) for your own use. There are five sections to this -file: introduction, structures, reading, writing, and modification and -configuration notes for various special platforms. 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 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:2003 (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_USR_CONFIG - -If -DPNG_USR_CONFIG is added to the CFLAGS 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_read() -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); - } - - fread(header, 1, number, fp); - 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. 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 - -.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; - png_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 will be saved when read, in case your callback function will need -one or more of them. This behavior can be changed with the -png_set_keep_unknown_chunks() function, described below. - -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 0) - - num_chunks - number of chunks affected; if 0, all - unknown chunks are affected. If nonzero, - only the chunks in the list 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: */ - png_set_keep_unknown_chunks(read_ptr, 1, 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. -Since very few applications really need to process such large images, -we have imposed an arbitrary 1-million limit on rows and columns. -Larger images will be rejected immediately with a png_error() call. If -you wish to change this limit, you can use - - png_set_user_limits(png_ptr, width_max, height_max); - -to set your own limits, or use width_max = height_max = 0x7fffffffL -to allow all valid dimensions (libpng may reject some very large 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. You can impose a limit on the total number -of sPLT, tEXt, iTXt, zTXt, and unknown 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); - -This limit also applies to the number of buffers that can be allocated -by png_decompress_chunk() while decompressing iTXt, zTXt, and iCCP chunks. - -You can also set a limit on the amount of memory that a compressed chunk -other than IDAT can occupy, 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, 1/screen_gamma/*file gamma*/); - -or you can use the fixed point equivalent: - - png_set_gamma_fixed(png_ptr, PNG_FP_1*screen_gamma, PNG_FP_1/screen_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 reencode 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 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!) - - 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 -an appropriate format to try if your software, or more -likely hardware, is totally broken, i.e., if it performs -linear arithmetic directly on gamma encoded values. - -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. - -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/png_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*png_sizeof(png_bytep)); - - 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. - - 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 was - 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); - - file_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_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 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 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. This transformation -does not affect images that already have full alpha channels. To add an -opaque alpha channel, use filler=0xff or 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. -This 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, -, 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 then 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. - -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_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); - -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); - -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 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. - - 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_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 then 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 then 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 for - 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. - -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); - -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_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(png_ptr, png_timep) is provided to convert -from PNG time to an RFC 1123 format string. - -.SS Writing unknown chunks - -You can use the png_set_unknown_chunks function to queue up chunks -for writing. You give it a chunk name, raw data, and a size; 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. -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. - -.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. 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. Since it is -unlikely that the method of handling memory allocation on a platform -will change between applications, these functions must be modified in -the library at compile time. 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, png_size_t length); - - void user_write_data(png_structp png_ptr, - png_bytep data, png_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); - - png_voidp error_ptr = png_get_error_ptr(png_ptr); - -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); - -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 http://cexcept.sourceforge.net), -which is illustrated in pngvalid.c and in contrib/visupng. - -.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 16-bit platforms - -You will want to look into zconf.h to tell zlib (and thus libpng) that -it cannot allocate more then 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. - -.SS 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. - -.SS 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 *". - -.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 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 -%14%in turn includes pngconf.h. -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. - -.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); - - 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 and PNG_NO_FILTERS -to turn filtering on and off, 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_FILTER_NONE | PNG_FILTER_SUB - PNG_FILTER_UP | PNG_FILTER_AVG | - PNG_FILTER_PAETH | PNG_ALL_FILTERS; - - 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(). - -It is also possible to influence how libpng chooses from among the -available filters. This is done in one or both of two ways - by -telling it how important it is to keep the same filter for successive -rows, and by telling it the relative computational costs of the filters. - - double weights[3] = {1.5, 1.3, 1.1}, - costs[PNG_FILTER_VALUE_LAST] = - {1.0, 1.3, 1.3, 1.5, 1.7}; - - png_set_filter_heuristics(png_ptr, - PNG_FILTER_HEURISTIC_WEIGHTED, 3, - weights, costs); - -The weights are multiplying factors that indicate to libpng that the -row filter should be the same for successive rows unless another row filter -is that many times better than the previous filter. In the above example, -if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a -"sum of absolute differences" 1.5 x 1.3 times higher than other filters -and still be chosen, while the NONE filter could have a sum 1.1 times -higher than other filters and still be chosen. Unspecified weights are -taken to be 1.0, and the specified weights should probably be declining -like those above in order to emphasize recent filters over older filters. - -The filter costs specify for each filter type a relative decoding cost -to be considered when selecting row filters. This means that filters -with higher costs are less likely to be chosen over filters with lower -costs, unless their "sum of absolute differences" is that much smaller. -The costs do not necessarily reflect the exact computational speeds of -the various filters, since this would unduly influence the final image -size. - -Note that the numbers above were invented purely for this example and -are given only to help explain the function usage. Little testing has -been done to find optimum values for either the costs or the weights. - -.SS 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. - -.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\n", 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. - -.SH VI. 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 -http://www.libmng.com) instead. - -.SH VII. 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. - -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 VIII. 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 IX. 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(), png_memcpy(), -and png_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 png_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 reenabled, 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 X. 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. - -Checking for invalid palette index on read or write was added at libpng -1.5.10. When an invalid index is found, libpng issues a benign error. -This is enabled by default but can be disabled in each png_ptr with - - png_set_check_for_invalid_index(png_ptr, allowed); - - allowed - one of - 0: disable - 1: enable - -A. Changes that affect users of libpng - -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. - -We no longer include zlib.h in png.h. Applications that need access -to information in zlib.h will need to add the '#include "zlib.h"' -directive. It does not matter whether it 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. - -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. - -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. libpng 1.5.0 -is consistent with the implementation in 1.4.5 and 1.2.x (where the macro -did not exist.) - -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. - -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.10, the user limits can be set en masse with the -configuration option PNG_SAFE_LIMITS_SUPPORTED. If this option is enabled, -a set of "safe" limits is applied in pngpriv.h. 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() that increase or decrease the limits. Also, -in libpng-1.5.10 the default width and height limits were increased -from 1,000,000 to 0x7ffffff (i.e., made unlimited). Therefore, the -limits are now - default safe - png_user_width_max 0x7fffffff 1,000,000 - png_user_height_max 0x7fffffff 1,000,000 - png_user_chunk_cache_max 0 (unlimited) 128 - png_user_chunk_malloc_max 0 (unlimited) 8,000,000 - -B. Changes to the build and configuration of libpng - -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. - -B.1 Specific changes to library configuration capabilities - -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. 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. - -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.) - -B.2 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, when 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 rarely used alternative of adding a list of feature macros to the -CFLAGS 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 removed. 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 a case where pngusr.h is still required. - -.SH XI. 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 XII. 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 - - git://libpng.git.sourceforge.net/gitroot/libpng - -or you can browse it via "gitweb" at - - http://libpng.git.sourceforge.net/git/gitweb.cgi?p=libpng - -Patches can be sent to glennrp at users.sourceforge.net or to -png-mng-implement at lists.sourceforge.net or you can upload them to -the libpng bug tracker at - - http://libpng.sourceforge.net - -We also accept patches built from the tar or zip distributions, and -simple verbal discriptions of bug fixes, reported either to the -SourceForge bug tracker, to the png-mng-implement at lists.sf.net -mailing list, or directly to glennrp. - -.SH XIII. Coding style - -Our coding style is similar to the "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 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 ^ and in libpngpf.3 */ - -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 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 prefer to express integers that are used as bit masks in hex format, -with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100). - -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 XIV. Y2K Compliance in libpng - -September 27, 2012 - -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.5.13 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 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 will no -longer be 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() in png.c - (formerly png_convert_to_rfc_1152() in error) - 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 ("beta 3") 0.89 89 1.0.89 - 0.90 ("beta 4") 0.90 90 0.90 - 0.95 ("beta 5") 0.95 95 0.95 - 0.96 ("beta 6") 0.96 96 0.96 - 0.97b ("beta 7") 1.00.97 97 1.0.1 - 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 - 1.0.0 1.0.0 100 2.1.0 - 1.0.0 (from here on, the 100 2.1.0 - 1.0.1 png.h string is 10001 2.1.0 - 1.0.1a-e identical to the 10002 from here on, the - 1.0.2 source version) 10002 shared library is 2.V - 1.0.2a-b 10003 where V is the source - 1.0.1 10001 code version except as - 1.0.1a-e 10002 2.1.0.1a-e noted. - 1.0.2 10002 2.1.0.2 - 1.0.2a-b 10003 2.1.0.2a-b - 1.0.3 10003 2.1.0.3 - 1.0.3a-d 10004 2.1.0.3a-d - 1.0.4 10004 2.1.0.4 - 1.0.4a-f 10005 2.1.0.4a-f - 1.0.5 (+ 2 patches) 10005 2.1.0.5 - 1.0.5a-d 10006 2.1.0.5a-d - 1.0.5e-r 10100 2.1.0.5e-r - 1.0.5s-v 10006 2.1.0.5s-v - 1.0.6 (+ 3 patches) 10006 2.1.0.6 - 1.0.6d-g 10007 2.1.0.6d-g - 1.0.6h 10007 10.6h - 1.0.6i 10007 10.6i - 1.0.6j 10007 2.1.0.6j - 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 - 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 - 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 - 1.0.7 1 10007 2.1.0.7 - 1.0.8beta1-4 1 10008 2.1.0.8beta1-4 - 1.0.8rc1 1 10008 2.1.0.8rc1 - 1.0.8 1 10008 2.1.0.8 - 1.0.9beta1-6 1 10009 2.1.0.9beta1-6 - 1.0.9rc1 1 10009 2.1.0.9rc1 - 1.0.9beta7-10 1 10009 2.1.0.9beta7-10 - 1.0.9rc2 1 10009 2.1.0.9rc2 - 1.0.9 1 10009 2.1.0.9 - 1.0.10beta1 1 10010 2.1.0.10beta1 - 1.0.10rc1 1 10010 2.1.0.10rc1 - 1.0.10 1 10010 2.1.0.10 - 1.0.11beta1-3 1 10011 2.1.0.11beta1-3 - 1.0.11rc1 1 10011 2.1.0.11rc1 - 1.0.11 1 10011 2.1.0.11 - 1.0.12beta1-2 2 10012 2.1.0.12beta1-2 - 1.0.12rc1 2 10012 2.1.0.12rc1 - 1.0.12 2 10012 2.1.0.12 - 1.1.0a-f - 10100 2.1.1.0a-f abandoned - 1.2.0beta1-2 2 10200 2.1.2.0beta1-2 - 1.2.0beta3-5 3 10200 3.1.2.0beta3-5 - 1.2.0rc1 3 10200 3.1.2.0rc1 - 1.2.0 3 10200 3.1.2.0 - 1.2.1beta-4 3 10201 3.1.2.1beta1-4 - 1.2.1rc1-2 3 10201 3.1.2.1rc1-2 - 1.2.1 3 10201 3.1.2.1 - 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6 - 1.0.13beta1 10 10013 10.so.0.1.0.13beta1 - 1.0.13rc1 10 10013 10.so.0.1.0.13rc1 - 1.2.2rc1 12 10202 12.so.0.1.2.2rc1 - 1.0.13 10 10013 10.so.0.1.0.13 - 1.2.2 12 10202 12.so.0.1.2.2 - 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6 - 1.2.3 12 10203 12.so.0.1.2.3 - 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3 - 1.2.4rc1 13 10204 12.so.0.1.2.4rc1 - 1.0.14 10 10014 10.so.0.1.0.14 - 1.2.4 13 10204 12.so.0.1.2.4 - 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2 - 1.0.15rc1 10 10015 10.so.0.1.0.15rc1 - 1.0.15 10 10015 10.so.0.1.0.15 - 1.2.5 13 10205 12.so.0.1.2.5 - 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4 - 1.2.6rc1-5 13 10206 12.so.0.1.2.6rc1-5 - 1.0.16 10 10016 10.so.0.1.0.16 - 1.2.6 13 10206 12.so.0.1.2.6 - 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2 - 1.0.17rc1 10 10017 12.so.0.1.0.17rc1 - 1.2.7rc1 13 10207 12.so.0.1.2.7rc1 - 1.0.17 10 10017 12.so.0.1.0.17 - 1.2.7 13 10207 12.so.0.1.2.7 - 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5 - 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5 - 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 - 1.0.18 10 10018 12.so.0.1.0.18 - 1.2.8 13 10208 12.so.0.1.2.8 - 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3 - 1.2.9beta4-11 13 10209 12.so.0.9[.0] - 1.2.9rc1 13 10209 12.so.0.9[.0] - 1.2.9 13 10209 12.so.0.9[.0] - 1.2.10beta1-7 13 10210 12.so.0.10[.0] - 1.2.10rc1-2 13 10210 12.so.0.10[.0] - 1.2.10 13 10210 12.so.0.10[.0] - 1.4.0beta1-6 14 10400 14.so.0.0[.0] - 1.2.11beta1-4 13 10210 12.so.0.11[.0] - 1.4.0beta7-8 14 10400 14.so.0.0[.0] - 1.2.11 13 10211 12.so.0.11[.0] - 1.2.12 13 10212 12.so.0.12[.0] - 1.4.0beta9-14 14 10400 14.so.0.0[.0] - 1.2.13 13 10213 12.so.0.13[.0] - 1.4.0beta15-36 14 10400 14.so.0.0[.0] - 1.4.0beta37-87 14 10400 14.so.14.0[.0] - 1.4.0rc01 14 10400 14.so.14.0[.0] - 1.4.0beta88-109 14 10400 14.so.14.0[.0] - 1.4.0rc02-08 14 10400 14.so.14.0[.0] - 1.4.0 14 10400 14.so.14.0[.0] - 1.4.1beta01-03 14 10401 14.so.14.1[.0] - 1.4.1rc01 14 10401 14.so.14.1[.0] - 1.4.1beta04-12 14 10401 14.so.14.1[.0] - 1.4.1 14 10401 14.so.14.1[.0] - 1.4.2 14 10402 14.so.14.2[.0] - 1.4.3 14 10403 14.so.14.3[.0] - 1.4.4 14 10404 14.so.14.4[.0] - 1.5.0beta01-58 15 10500 15.so.15.0[.0] - 1.5.0rc01-07 15 10500 15.so.15.0[.0] - 1.5.0 15 10500 15.so.15.0[.0] - 1.5.1beta01-11 15 10501 15.so.15.1[.0] - 1.5.1rc01-02 15 10501 15.so.15.1[.0] - 1.5.1 15 10501 15.so.15.1[.0] - 1.5.2beta01-03 15 10502 15.so.15.2[.0] - 1.5.2rc01-03 15 10502 15.so.15.2[.0] - 1.5.2 15 10502 15.so.15.2[.0] - 1.5.3beta01-10 15 10503 15.so.15.3[.0] - 1.5.3rc01-02 15 10503 15.so.15.3[.0] - 1.5.3beta11 15 10503 15.so.15.3[.0] - 1.5.3 [omitted] - 1.5.4beta01-08 15 10504 15.so.15.4[.0] - 1.5.4rc01 15 10504 15.so.15.4[.0] - 1.5.4 15 10504 15.so.15.4[.0] - 1.5.5beta01-08 15 10505 15.so.15.5[.0] - 1.5.5rc01 15 10505 15.so.15.5[.0] - 1.5.5 15 10505 15.so.15.5[.0] - 1.5.6beta01-07 15 10506 15.so.15.6[.0] - 1.5.6rc01-03 15 10506 15.so.15.6[.0] - 1.5.6 15 10506 15.so.15.6[.0] - 1.5.7beta01-05 15 10507 15.so.15.7[.0] - 1.5.7rc01-03 15 10507 15.so.15.7[.0] - 1.5.7 15 10507 15.so.15.7[.0] - 1.5.8beta01 15 10508 15.so.15.8[.0] - 1.5.8rc01 15 10508 15.so.15.8[.0] - 1.5.8 15 10508 15.so.15.8[.0] - 1.5.9beta01-02 15 10509 15.so.15.9[.0] - 1.5.9rc01 15 10509 15.so.15.9[.0] - 1.5.9 15 10509 15.so.15.9[.0] - 1.5.10beta01-05 15 10510 15.so.15.10[.0] - 1.5.10 15 10510 15.so.15.10[.0] - 1.5.11beta01 15 10511 15.so.15.11[.0] - 1.5.11rc01-05 15 10511 15.so.15.11[.0] - 1.5.11 15 10511 15.so.15.11[.0] - 1.5.12 15 10512 15.so.15.12[.0] - 1.5.13beta01-02 15 10513 15.so.15.13[.0] - 1.5.13rc01 15 10513 15.so.15.13[.0] - 1.5.13 15 10513 15.so.15.13[.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 "rcN". - -.SH "SEE ALSO" -.BR "png"(5), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) - -.LP -.IR libpng : -.IP -http://libpng.sourceforge.net (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 -ftp://ftp.info-zip.org/pub/infozip/zlib - -.LP -.IR PNG specification: RFC 2083 -.IP -(generally) at the same location as -.I libpng -or at -.br -ftp://ds.internic.net/rfc/rfc2083.txt -.br -or (as a W3C Recommendation) at -.br -http://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.5.13 - September 27, 2012: -Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. -Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). - -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 COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: - -(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.) - -If you modify libpng you may insert additional notices immediately following -this sentence. - -This code is released under the libpng license. - -libpng versions 1.2.6, August 15, 2004, through 1.5.13, September 27, 2012, are -Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are -distributed according to the same disclaimer and license as libpng-1.2.5 -with the following individual added to the list of Contributing Authors - - Cosmin Truta - -libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are -Copyright (c) 2000-2002 Glenn Randers-Pehrson, 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 - Gilles Vollant - -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. - -libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are -Copyright (c) 1998, 1999 Glenn Randers-Pehrson -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 -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 - -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. - - -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). - -Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a -certification mark of the Open Source Initiative. - -Glenn Randers-Pehrson -glennrp at users.sourceforge.net -September 27, 2012 - -.\" end of man page - diff --git a/Source/LibPNG/libpngpf.3 b/Source/LibPNG/libpngpf.3 deleted file mode 100644 index 9353eee..0000000 --- a/Source/LibPNG/libpngpf.3 +++ /dev/null @@ -1,28 +0,0 @@ -.TH LIBPNGPF 3 "September 27, 2012" -.SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.5.13 -(private functions) -.SH SYNOPSIS -\fB#include \fI"pngpriv.h" - -\fI\fB - -\fBAs of libpng version \fP\fI1.5.1\fP\fB, this section is no longer \fP\fImaintained\fP\fB, now \fIthat - -\fBthe private function prototypes are hidden in pngpriv.h and not \fIaccessible - -\fBto applications. Look in pngpriv.h for the prototypes and a short \fIdescription - -\fBof each \fIfunction. - -\fI\fB - -.SH DESCRIPTION -The functions previously listed here are used privately by libpng -and are not recommended 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/Source/LibPNG/png.5 b/Source/LibPNG/png.5 deleted file mode 100644 index 8898820..0000000 --- a/Source/LibPNG/png.5 +++ /dev/null @@ -1,74 +0,0 @@ -.TH PNG 5 "September 27, 2012" -.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)(num_bytes < 0 ? 0 : num_bytes); -} - -/* 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, png_size_t start, png_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)(png_memcmp(&sig[start], &png_signature[start], num_to_check))); -} - -#endif /* PNG_READ_SUPPORTED */ - -#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_voidp ptr; - png_structp p=(png_structp)png_ptr; - png_uint_32 save_flags=p->flags; - png_alloc_size_t num_bytes; - - if (png_ptr == NULL) - return (NULL); - - if (items > PNG_UINT_32_MAX/size) - { - png_warning (p, "Potential overflow in png_zalloc()"); - return (NULL); - } - num_bytes = (png_alloc_size_t)items * size; - - p->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK; - ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes); - p->flags=save_flags; - - return ((voidpf)ptr); -} - -/* Function to free memory for zlib */ -void /* PRIVATE */ -png_zfree(voidpf png_ptr, voidpf ptr) -{ - png_free((png_structp)png_ptr, (png_voidp)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_structp 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_structp png_ptr, png_const_bytep ptr, png_size_t length) -{ - int need_crc = 1; - - if (PNG_CHUNK_ANCILLIARY(png_ptr->chunk_name)) - { - 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) - need_crc = 0; - } - - /* 'uLong' is defined 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 && length > 0) - { - uLong crc = png_ptr->crc; /* Should never issue a warning */ - - do - { - uInt safeLength = (uInt)length; - if (safeLength == 0) - safeLength = (uInt)-1; /* evil, but safe */ - - crc = crc32(crc, ptr, safeLength); - - /* 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 += safeLength; - length -= safeLength; - } - 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_structp png_ptr, png_const_charp user_png_ver) -{ - if (user_png_ver) - { - int i = 0; - - do - { - if (user_png_ver[i] != png_libpng_ver[i]) - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; - } while (png_libpng_ver[i++]); - } - - else - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; - - if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) - { - /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so - * we must recompile any applications that use any older library version. - * For versions after libpng 1.0, we will be compatible, so we need - * only check the first digit. - */ - if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || - (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) || - (user_png_ver[0] == '0' && user_png_ver[2] < '9')) - { -#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); - - png_warning(png_ptr, m); -#endif - -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags = 0; -#endif - - return 0; - } - } - - /* Success return. */ - return 1; -} - -/* Allocate the memory for an info_struct for the application. We don't - * really need the png_ptr, but it could potentially be useful in the - * future. This should be used in favour of malloc(png_sizeof(png_info)) - * and png_info_init() so that applications that want to use a shared - * libpng don't have to be recompiled if png_info changes size. - */ -PNG_FUNCTION(png_infop,PNGAPI -png_create_info_struct,(png_structp png_ptr),PNG_ALLOCATED) -{ - png_infop info_ptr; - - png_debug(1, "in png_create_info_struct"); - - if (png_ptr == NULL) - return (NULL); - -#ifdef PNG_USER_MEM_SUPPORTED - info_ptr = (png_infop)png_create_struct_2(PNG_STRUCT_INFO, - png_ptr->malloc_fn, png_ptr->mem_ptr); -#else - info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO); -#endif - if (info_ptr != NULL) - png_info_init_3(&info_ptr, png_sizeof(png_info)); - - 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. - */ -void PNGAPI -png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr) -{ - png_infop 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) - { - png_info_destroy(png_ptr, info_ptr); - -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)info_ptr, png_ptr->free_fn, - png_ptr->mem_ptr); -#else - png_destroy_struct((png_voidp)info_ptr); -#endif - *info_ptr_ptr = NULL; - } -} - -/* 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. - */ - -void PNGAPI -png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size) -{ - png_infop info_ptr = *ptr_ptr; - - png_debug(1, "in png_info_init_3"); - - if (info_ptr == NULL) - return; - - if (png_sizeof(png_info) > png_info_struct_size) - { - png_destroy_struct(info_ptr); - info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO); - *ptr_ptr = info_ptr; - } - - /* Set everything to 0 */ - png_memset(info_ptr, 0, png_sizeof(png_info)); -} - -void PNGAPI -png_data_freer(png_structp png_ptr, png_infop 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_warning(png_ptr, - "Unknown freer parameter in png_data_freer"); -} - -void PNGAPI -png_free_data(png_structp png_ptr, png_infop 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 ((mask & PNG_FREE_TEXT) & info_ptr->free_me) - { - if (num != -1) - { - if (info_ptr->text && info_ptr->text[num].key) - { - 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_data(png_ptr, info_ptr, PNG_FREE_TEXT, i); - png_free(png_ptr, info_ptr->text); - info_ptr->text = NULL; - info_ptr->num_text=0; - } - } -#endif - -#ifdef PNG_tRNS_SUPPORTED - /* Free any tRNS entry */ - if ((mask & PNG_FREE_TRNS) & info_ptr->free_me) - { - png_free(png_ptr, info_ptr->trans_alpha); - info_ptr->trans_alpha = NULL; - info_ptr->valid &= ~PNG_INFO_tRNS; - } -#endif - -#ifdef PNG_sCAL_SUPPORTED - /* Free any sCAL entry */ - if ((mask & PNG_FREE_SCAL) & info_ptr->free_me) - { - 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) - { - 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 < (int)info_ptr->pcal_nparams; i++) - { - png_free(png_ptr, info_ptr->pcal_params[i]); - info_ptr->pcal_params[i] = NULL; - } - 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 iCCP entry */ - if ((mask & PNG_FREE_ICCP) & info_ptr->free_me) - { - 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 ((mask & PNG_FREE_SPLT) & info_ptr->free_me) - { - if (num != -1) - { - if (info_ptr->splt_palettes) - { - 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 - { - if (info_ptr->splt_palettes_num) - { - int i; - for (i = 0; i < (int)info_ptr->splt_palettes_num; i++) - png_free_data(png_ptr, info_ptr, PNG_FREE_SPLT, i); - - 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_UNKNOWN_CHUNKS_SUPPORTED - if (png_ptr->unknown_chunk.data) - { - png_free(png_ptr, png_ptr->unknown_chunk.data); - png_ptr->unknown_chunk.data = NULL; - } - - if ((mask & PNG_FREE_UNKN) & info_ptr->free_me) - { - if (num != -1) - { - if (info_ptr->unknown_chunks) - { - png_free(png_ptr, info_ptr->unknown_chunks[num].data); - info_ptr->unknown_chunks[num].data = NULL; - } - } - - else - { - int i; - - if (info_ptr->unknown_chunks_num) - { - for (i = 0; i < info_ptr->unknown_chunks_num; i++) - png_free_data(png_ptr, info_ptr, PNG_FREE_UNKN, i); - - png_free(png_ptr, info_ptr->unknown_chunks); - info_ptr->unknown_chunks = NULL; - info_ptr->unknown_chunks_num = 0; - } - } - } -#endif - -#ifdef PNG_hIST_SUPPORTED - /* Free any hIST entry */ - if ((mask & PNG_FREE_HIST) & info_ptr->free_me) - { - 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) - { - png_zfree(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) - { - if (info_ptr->row_pointers) - { - int row; - for (row = 0; row < (int)info_ptr->height; row++) - { - png_free(png_ptr, info_ptr->row_pointers[row]); - info_ptr->row_pointers[row] = NULL; - } - 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; -} - -/* This is an internal routine to free any memory that the info struct is - * pointing to before re-using it or freeing the struct itself. Recall - * that png_free() checks for NULL pointers for us. - */ -void /* PRIVATE */ -png_info_destroy(png_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_info_destroy"); - - png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); - -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - if (png_ptr->num_chunk_list) - { - png_free(png_ptr, png_ptr->chunk_list); - png_ptr->chunk_list = NULL; - png_ptr->num_chunk_list = 0; - } -#endif - - png_info_init_3(&info_ptr, png_sizeof(png_info)); -} -#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ - -/* 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_structp 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_structp 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_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. - */ -png_const_charp PNGAPI -png_convert_to_rfc1123(png_structp png_ptr, 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 (png_ptr == NULL) - return (NULL); - - 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) - { - png_warning(png_ptr, "Ignoring invalid time value"); - return (NULL); - } - - { - size_t pos = 0; - char number_buf[5]; /* enough for a four-digit year */ - -# define APPEND_STRING(string)\ - pos = png_safecat(png_ptr->time_buffer, sizeof png_ptr->time_buffer,\ - pos, (string)) -# define APPEND_NUMBER(format, value)\ - APPEND_STRING(PNG_FORMAT_NUMBER(number_buf, format, (value))) -# define APPEND(ch)\ - if (pos < (sizeof png_ptr->time_buffer)-1)\ - png_ptr->time_buffer[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 */ - -# undef APPEND -# undef APPEND_NUMBER -# undef APPEND_STRING - } - - return png_ptr->time_buffer; -} -# endif /* PNG_TIME_RFC1123_SUPPORTED */ - -#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ - -png_const_charp PNGAPI -png_get_copyright(png_const_structp 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.5.13 - September 27, 2012" PNG_STRING_NEWLINE \ - "Copyright (c) 1998-2012 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.5.13 - September 27, 2012\ - Copyright (c) 1998-2012 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_structp 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_structp 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_structp 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_HANDLE_AS_UNKNOWN_SUPPORTED -int PNGAPI -png_handle_as_unknown(png_structp 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, so it should continue - * to do so in case there are duplicated entries. - */ - do /* num_chunk_list > 0, so at least one */ - { - p -= 5; - if (!png_memcmp(chunk_name, p, 4)) - return p[4]; - } - while (p > p_end); - - return PNG_HANDLE_CHUNK_AS_DEFAULT; -} - -int /* PRIVATE */ -png_chunk_unknown_handling(png_structp 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 - -#ifdef PNG_READ_SUPPORTED -/* This function, added to libpng-1.0.6g, is untested. */ -int PNGAPI -png_reset_zstream(png_structp png_ptr) -{ - if (png_ptr == NULL) - return Z_STREAM_ERROR; - - return (inflateReset(&png_ptr->zstream)); -} -#endif /* PNG_READ_SUPPORTED */ - -/* 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) -/* 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_CHECK_cHRM_SUPPORTED - -int /* PRIVATE */ -png_check_cHRM_fixed(png_structp png_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) -{ - int ret = 1; - unsigned long xy_hi,xy_lo,yx_hi,yx_lo; - - png_debug(1, "in function png_check_cHRM_fixed"); - - if (png_ptr == NULL) - return 0; - - /* (x,y,z) values are first limited to 0..100000 (PNG_FP_1), the white - * y must also be greater than 0. To test for the upper limit calculate - * (PNG_FP_1-y) - x must be <= to this for z to be >= 0 (and the expression - * cannot overflow.) At this point we know x and y are >= 0 and (x+y) is - * <= PNG_FP_1. The previous test on PNG_MAX_UINT_31 is removed because it - * pointless (and it produces compiler warnings!) - */ - if (white_x < 0 || white_y <= 0 || - red_x < 0 || red_y < 0 || - green_x < 0 || green_y < 0 || - blue_x < 0 || blue_y < 0) - { - png_warning(png_ptr, - "Ignoring attempt to set negative chromaticity value"); - ret = 0; - } - /* And (x+y) must be <= PNG_FP_1 (so z is >= 0) */ - if (white_x > PNG_FP_1 - white_y) - { - png_warning(png_ptr, "Invalid cHRM white point"); - ret = 0; - } - - if (red_x > PNG_FP_1 - red_y) - { - png_warning(png_ptr, "Invalid cHRM red point"); - ret = 0; - } - - if (green_x > PNG_FP_1 - green_y) - { - png_warning(png_ptr, "Invalid cHRM green point"); - ret = 0; - } - - if (blue_x > PNG_FP_1 - blue_y) - { - png_warning(png_ptr, "Invalid cHRM blue point"); - ret = 0; - } - - png_64bit_product(green_x - red_x, blue_y - red_y, &xy_hi, &xy_lo); - png_64bit_product(green_y - red_y, blue_x - red_x, &yx_hi, &yx_lo); - - if (xy_hi == yx_hi && xy_lo == yx_lo) - { - png_warning(png_ptr, - "Ignoring attempt to set cHRM RGB triangle with zero area"); - ret = 0; - } - - return ret; -} -# endif /* PNG_CHECK_cHRM_SUPPORTED */ - -#ifdef PNG_cHRM_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. - */ -int png_xy_from_XYZ(png_xy *xy, png_XYZ XYZ) -{ - png_int_32 d, dwhite, whiteX, whiteY; - - d = XYZ.redX + XYZ.redY + XYZ.redZ; - if (!png_muldiv(&xy->redx, XYZ.redX, PNG_FP_1, d)) return 1; - if (!png_muldiv(&xy->redy, XYZ.redY, PNG_FP_1, d)) return 1; - dwhite = d; - whiteX = XYZ.redX; - whiteY = XYZ.redY; - - d = XYZ.greenX + XYZ.greenY + XYZ.greenZ; - if (!png_muldiv(&xy->greenx, XYZ.greenX, PNG_FP_1, d)) return 1; - if (!png_muldiv(&xy->greeny, XYZ.greenY, PNG_FP_1, d)) return 1; - dwhite += d; - whiteX += XYZ.greenX; - whiteY += XYZ.greenY; - - d = XYZ.blueX + XYZ.blueY + XYZ.blueZ; - if (!png_muldiv(&xy->bluex, XYZ.blueX, PNG_FP_1, d)) return 1; - if (!png_muldiv(&xy->bluey, XYZ.blueY, PNG_FP_1, d)) return 1; - dwhite += d; - whiteX += XYZ.blueX; - whiteY += XYZ.blueY; - - /* The reference white is simply the same of the end-point (X,Y,Z) vectors, - * thus: - */ - if (!png_muldiv(&xy->whitex, whiteX, PNG_FP_1, dwhite)) return 1; - if (!png_muldiv(&xy->whitey, whiteY, PNG_FP_1, dwhite)) return 1; - - return 0; -} - -int png_XYZ_from_xy(png_XYZ *XYZ, 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.) - */ - 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 < 0 || 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 invertion 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)) return 2; - if (!png_muldiv(&right, xy.greeny-xy.bluey, xy.redx - xy.bluex, 7)) return 2; - denominator = left - right; - - /* Now find the red numerator. */ - if (!png_muldiv(&left, xy.greenx-xy.bluex, xy.whitey-xy.bluey, 7)) return 2; - if (!png_muldiv(&right, xy.greeny-xy.bluey, xy.whitex-xy.bluex, 7)) 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) || - 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)) return 2; - if (!png_muldiv(&right, xy.redx-xy.bluex, xy.whitey-xy.bluey, 7)) return 2; - if (!png_muldiv(&green_inverse, xy.whitey, denominator, left-right) || - 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->redX, xy.redx, PNG_FP_1, red_inverse)) return 1; - if (!png_muldiv(&XYZ->redY, xy.redy, PNG_FP_1, red_inverse)) return 1; - if (!png_muldiv(&XYZ->redZ, PNG_FP_1 - xy.redx - xy.redy, PNG_FP_1, - red_inverse)) - return 1; - - if (!png_muldiv(&XYZ->greenX, xy.greenx, PNG_FP_1, green_inverse)) return 1; - if (!png_muldiv(&XYZ->greenY, xy.greeny, PNG_FP_1, green_inverse)) return 1; - if (!png_muldiv(&XYZ->greenZ, PNG_FP_1 - xy.greenx - xy.greeny, PNG_FP_1, - green_inverse)) - return 1; - - if (!png_muldiv(&XYZ->blueX, xy.bluex, blue_scale, PNG_FP_1)) return 1; - if (!png_muldiv(&XYZ->blueY, xy.bluey, blue_scale, PNG_FP_1)) return 1; - if (!png_muldiv(&XYZ->blueZ, PNG_FP_1 - xy.bluex - xy.bluey, blue_scale, - PNG_FP_1)) - return 1; - - return 0; /*success*/ -} - -int png_XYZ_from_xy_checked(png_structp png_ptr, png_XYZ *XYZ, png_xy xy) -{ - switch (png_XYZ_from_xy(XYZ, xy)) - { - case 0: /* success */ - return 1; - - case 1: - /* The chunk may be technically valid, but we got png_fixed_point - * overflow while trying to get XYZ values out of it. This is - * entirely benign - the cHRM chunk is pretty extreme. - */ - png_warning(png_ptr, - "extreme cHRM chunk cannot be converted to tristimulus values"); - 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. - */ - png_error(png_ptr, "internal error in png_XYZ_from_xy"); - break; - } - - /* ERROR RETURN */ - return 0; -} -#endif - -void /* PRIVATE */ -png_check_IHDR(png_structp 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 (height == 0) - { - png_warning(png_ptr, "Image height is zero in IHDR"); - 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; - } - -# 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; - } - - if (width > PNG_UINT_31_MAX) - { - png_warning(png_ptr, "Invalid image width in IHDR"); - error = 1; - } - - if (height > PNG_UINT_31_MAX) - { - png_warning(png_ptr, "Invalid image height in IHDR"); - error = 1; - } - - if (width > (PNG_UINT_32_MAX - >> 3) /* 8-byte RGBA pixels */ - - 48 /* bigrowbuf hack */ - - 1 /* filter byte */ - - 7*8 /* rounding of width to multiple of 8 pixels */ - - 8) /* extra max_pixel_depth pad */ - png_warning(png_ptr, "Width is too large for libpng to process pixels"); - - /* 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) && - png_ptr->mng_features_permitted) - 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) && - (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) - { - 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 formated 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, png_size_t size, int *statep, - png_size_tp whereami) -{ - int state = *statep; - png_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) - 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) /* two dots */ - goto PNG_FP_End; - - else if (state & PNG_FP_SAW_DIGIT) /* 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) /* 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) - 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, png_size_t size) -{ - int state=0; - png_size_t char_index=0; - - if (png_check_fp_number(string, size, &state, &char_index) && - (char_index == size || string[char_index] == 0)) - return state /* must be non-zero - see above */; - - return 0; /* i.e. fail */ -} -#endif /* pCAL or sCAL */ - -#ifdef PNG_READ_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.0; - - /* 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.0; - do - { - if (power & 1) d *= mult; - mult *= mult; - power >>= 1; - } - while (power > 0); - - if (recip) d = 1/d; - } - /* else power is 0 and d is 1 */ - - return d; -} - -/* Function to format a floating point value in ASCII with a given - * precision. - */ -void /* PRIVATE */ -png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_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. - */ - - { - 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 = -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.0; - - /* 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-clead+1 < (int)precision) - fp = modf(fp, &d); - - else - { - d = floor(fp + .5); - - if (d > 9.0) - { - /* Rounding up to 10, handle that here. */ - if (czero > 0) - { - --czero, d = 1; - if (cdigits == 0) --clead; - } - - else - { - while (cdigits > 0 && d > 9.0) - { - 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.0) /* 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.0; - } - } - } - fp = 0; /* Guarantees termination below. */ - } - - if (d == 0.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-clead < (int)precision && 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 if flag - it got - * to '-1' because of the decrement after outputing - * 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 - * doest 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 = -exp_b10; - } - - else - uexp_b10 = 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 ((int)size > cdigits) - { - while (cdigits > 0) *ascii++ = exponent[--cdigits]; - - *ascii = 0; - - return; - } - } - } - else if (!(fp >= DBL_MIN)) - { - *ascii++ = 48; /* '0' */ - *ascii = 0; - return; - } - else - { - *ascii++ = 105; /* 'i' */ - *ascii++ = 110; /* 'n' */ - *ascii++ = 102; /* 'f' */ - *ascii = 0; - return; - } - } - - /* Here on buffer too small. */ - png_error(png_ptr, "ASCII conversion buffer too small"); -} - -# endif /* FLOATING_POINT */ - -# ifdef PNG_FIXED_POINT_SUPPORTED -/* Function to format a fixed point value in ASCII. - */ -void /* PRIVATE */ -png_ascii_from_fixed(png_structp png_ptr, png_charp ascii, png_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, --size, num = -fp; - else - num = 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 /* READ_SCAL */ - -#if defined(PNG_FLOATING_POINT_SUPPORTED) && \ - !defined(PNG_FIXED_POINT_MACRO_SUPPORTED) -png_fixed_point -png_fixed(png_structp 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); - - return (png_fixed_point)r; -} -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) || \ - defined(PNG_INCH_CONVERSIONS_SUPPORTED) || defined(PNG__READ_pHYs_SUPPORTED) -/* muldiv functions */ -/* This API takes signed arguments and rounds the result to the nearest - * integer (or, for a fixed point number - the standard argument - to - * the nearest .00001). Overflow and divide by zero are signalled in - * the result, a boolean - true on success, false on overflow. - */ -int -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) - result = -result; - - /* Check for overflow. */ - if ((negative && result <= 0) || (!negative && result >= 0)) - { - *res = result; - return 1; - } - } -#endif - } - } - - return 0; -} -#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_structp 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)) - return result; - - png_warning(png_ptr, "fixed point overflow ignored"); - return 0; -} -#endif - -#ifdef PNG_READ_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)) - return res; -#endif - - return 0; /* error/overflow */ -} - -/* 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)) - return res; -#endif - - return 0; /* overflow */ -} - -/* 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 - 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_CHECK_cHRM_SUPPORTED -/* Added at libpng version 1.2.34 (Dec 8, 2008) and 1.4.0 (Jan 2, - * 2010: moved from pngset.c) */ -/* - * Multiply two 32-bit numbers, V1 and V2, using 32-bit - * arithmetic, to produce a 64-bit result in the HI/LO words. - * - * A B - * x C D - * ------ - * AD || BD - * AC || CB || 0 - * - * where A and B are the high and low 16-bit words of V1, - * C and D are the 16-bit words of V2, AD is the product of - * A and D, and X || Y is (X << 16) + Y. -*/ - -void /* PRIVATE */ -png_64bit_product (long v1, long v2, unsigned long *hi_product, - unsigned long *lo_product) -{ - int a, b, c, d; - long lo, hi, x, y; - - a = (v1 >> 16) & 0xffff; - b = v1 & 0xffff; - c = (v2 >> 16) & 0xffff; - d = v2 & 0xffff; - - lo = b * d; /* BD */ - x = a * d + c * b; /* AD + CB */ - y = ((lo >> 16) & 0xffff) + x; - - lo = (lo & 0xffff) | ((y & 0xffff) << 16); - hi = (y >> 16) & 0xffff; - - hi += a * c; /* AC */ - - *hi_product = (unsigned long)hi; - *lo_product = (unsigned long)lo; -} -#endif /* CHECK_cHRM */ - -#ifdef PNG_READ_GAMMA_SUPPORTED /* gamma table code */ -#ifndef PNG_FLOATING_ARITHMETIC_SUPPORTED -/* Fixed point gamma. - * - * 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. The programs are given - * at the head of each table. - * - * 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 png_uint_32 -png_8bit_l2[128] = -{ -# ifdef PNG_DO_BC - for (i=128;i<256;++i) { .5 - l(i/255)/l(2)*65536*65536; } -# else - 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 -# endif - -#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 -}; - -PNG_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 7.99998 for the overflow (log 0) case - so the result is - * always at most 19 bits. - */ - if ((x &= 0xff) == 0) - return 0xffffffff; - - 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 - */ -PNG_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 0xffffffff; - - 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); -} - -/* 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 - * frational part of the logarithm by using an accurate 32-bit value from the - * top four fractional bits then multiplying in the remaining bits. - */ -static png_uint_32 -png_32bit_exp[16] = -{ -# ifdef PNG_DO_BC - for (i=0;i<16;++i) { .5 + e(-i/16*l(2))*2^32; } -# else - /* 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 -# endif -}; - -/* Adjustment table; provided to explain the numbers in the code below. */ -#ifdef PNG_DO_BC -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 - -PNG_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) & 0xf]; - - /* 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; -} - -PNG_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); -} - -PNG_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 /* 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 - double r = floor(255*pow(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)) - return png_exp8bit(res); - - /* Overflow. */ - value = 0; -# endif - } - - return (png_byte)value; -} - -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 - double r = floor(65535*pow(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)) - return png_exp16bit(res); - - /* Overflow. */ - value = 0; -# endif - } - - return (png_uint_16)value; -} - -/* 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_structp png_ptr, unsigned int value, - png_fixed_point gamma_val) -{ - if (png_ptr->bit_depth == 8) - return png_gamma_8bit_correct(value, gamma_val); - - else - return png_gamma_16bit_correct(value, gamma_val); -} - -/* 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; -} - -/* 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_structp 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); - 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 * png_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 * png_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)) - { - /* 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: */ - double d = floor(65535*pow(ig/(double)max, gamma_val*.00001)+.5); - sub_table[j] = (png_uint_16)d; -# else - if (shift) - 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) - 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_structp 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 * png_sizeof(png_uint_16p)); - - /* 'num' is the number of tables and also the number 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 * png_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++; - } -} - -/* 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_structp 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)) 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; -} - -/* Used from png_read_destroy and below to release the memory used by the gamma - * tables. - */ -void /* PRIVATE */ -png_destroy_gamma_table(png_structp png_ptr) -{ - png_free(png_ptr, png_ptr->gamma_table); - png_ptr->gamma_table = NULL; - - 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; - } - -#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; - - 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 /* 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_structp 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->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)) - { - png_build_8bit_table(png_ptr, &png_ptr->gamma_to_1, - png_reciprocal(png_ptr->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->gamma/* Probably doing rgb_to_gray */); - } -#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */ - } - else - { - png_byte shift, sig_bit; - - if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) - { - 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 = (png_byte)(16U - sig_bit); /* shift == insignificant bits */ - - else - shift = 0; /* keep all 16 bits */ - - if (png_ptr->transformations & (PNG_16_TO_8 | PNG_SCALE_16_TO_8)) - { - /* 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; - -#ifdef PNG_16BIT_SUPPORTED - /* 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)) -#endif - png_build_16to8_table(png_ptr, &png_ptr->gamma_16_table, shift, - png_ptr->screen_gamma > 0 ? png_product2(png_ptr->gamma, - png_ptr->screen_gamma) : PNG_FP_1); - -#ifdef PNG_16BIT_SUPPORTED - else - png_build_16bit_table(png_ptr, &png_ptr->gamma_16_table, shift, - png_ptr->screen_gamma > 0 ? png_reciprocal2(png_ptr->gamma, - png_ptr->screen_gamma) : PNG_FP_1); -#endif - -#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)) - { - png_build_16bit_table(png_ptr, &png_ptr->gamma_16_to_1, shift, - png_reciprocal(png_ptr->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->gamma/* Probably doing rgb_to_gray */); - } -#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */ - } -} -#endif /* READ_GAMMA */ -#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ diff --git a/Source/LibPNG/png.h b/Source/LibPNG/png.h deleted file mode 100644 index 7b74433..0000000 --- a/Source/LibPNG/png.h +++ /dev/null @@ -1,2674 +0,0 @@ - -/* png.h - header file for PNG reference library - * - * libpng version 1.5.13 - September 27, 2012 - * Copyright (c) 1998-2012 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.89c, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.5.13 - September 27, 2012: Glenn - * See also "Contributing Authors", below. - * - * 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.8beta1-4 1 10008 2.1.0.8beta1-4 - * 1.0.8rc1 1 10008 2.1.0.8rc1 - * 1.0.8 1 10008 2.1.0.8 - * 1.0.9beta1-6 1 10009 2.1.0.9beta1-6 - * 1.0.9rc1 1 10009 2.1.0.9rc1 - * 1.0.9beta7-10 1 10009 2.1.0.9beta7-10 - * 1.0.9rc2 1 10009 2.1.0.9rc2 - * 1.0.9 1 10009 2.1.0.9 - * 1.0.10beta1 1 10010 2.1.0.10beta1 - * 1.0.10rc1 1 10010 2.1.0.10rc1 - * 1.0.10 1 10010 2.1.0.10 - * 1.0.11beta1-3 1 10011 2.1.0.11beta1-3 - * 1.0.11rc1 1 10011 2.1.0.11rc1 - * 1.0.11 1 10011 2.1.0.11 - * 1.0.12beta1-2 2 10012 2.1.0.12beta1-2 - * 1.0.12rc1 2 10012 2.1.0.12rc1 - * 1.0.12 2 10012 2.1.0.12 - * 1.1.0a-f - 10100 2.1.1.0a-f (branch abandoned) - * 1.2.0beta1-2 2 10200 2.1.2.0beta1-2 - * 1.2.0beta3-5 3 10200 3.1.2.0beta3-5 - * 1.2.0rc1 3 10200 3.1.2.0rc1 - * 1.2.0 3 10200 3.1.2.0 - * 1.2.1beta1-4 3 10201 3.1.2.1beta1-4 - * 1.2.1rc1-2 3 10201 3.1.2.1rc1-2 - * 1.2.1 3 10201 3.1.2.1 - * 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6 - * 1.0.13beta1 10 10013 10.so.0.1.0.13beta1 - * 1.0.13rc1 10 10013 10.so.0.1.0.13rc1 - * 1.2.2rc1 12 10202 12.so.0.1.2.2rc1 - * 1.0.13 10 10013 10.so.0.1.0.13 - * 1.2.2 12 10202 12.so.0.1.2.2 - * 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6 - * 1.2.3 12 10203 12.so.0.1.2.3 - * 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3 - * 1.0.14rc1 13 10014 10.so.0.1.0.14rc1 - * 1.2.4rc1 13 10204 12.so.0.1.2.4rc1 - * 1.0.14 10 10014 10.so.0.1.0.14 - * 1.2.4 13 10204 12.so.0.1.2.4 - * 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2 - * 1.0.15rc1-3 10 10015 10.so.0.1.0.15rc1-3 - * 1.2.5rc1-3 13 10205 12.so.0.1.2.5rc1-3 - * 1.0.15 10 10015 10.so.0.1.0.15 - * 1.2.5 13 10205 12.so.0.1.2.5 - * 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4 - * 1.0.16 10 10016 10.so.0.1.0.16 - * 1.2.6 13 10206 12.so.0.1.2.6 - * 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2 - * 1.0.17rc1 10 10017 12.so.0.1.0.17rc1 - * 1.2.7rc1 13 10207 12.so.0.1.2.7rc1 - * 1.0.17 10 10017 12.so.0.1.0.17 - * 1.2.7 13 10207 12.so.0.1.2.7 - * 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5 - * 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5 - * 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 - * 1.0.18 10 10018 12.so.0.1.0.18 - * 1.2.8 13 10208 12.so.0.1.2.8 - * 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3 - * 1.2.9beta4-11 13 10209 12.so.0.9[.0] - * 1.2.9rc1 13 10209 12.so.0.9[.0] - * 1.2.9 13 10209 12.so.0.9[.0] - * 1.2.10beta1-7 13 10210 12.so.0.10[.0] - * 1.2.10rc1-2 13 10210 12.so.0.10[.0] - * 1.2.10 13 10210 12.so.0.10[.0] - * 1.4.0beta1-5 14 10400 14.so.0.0[.0] - * 1.2.11beta1-4 13 10211 12.so.0.11[.0] - * 1.4.0beta7-8 14 10400 14.so.0.0[.0] - * 1.2.11 13 10211 12.so.0.11[.0] - * 1.2.12 13 10212 12.so.0.12[.0] - * 1.4.0beta9-14 14 10400 14.so.0.0[.0] - * 1.2.13 13 10213 12.so.0.13[.0] - * 1.4.0beta15-36 14 10400 14.so.0.0[.0] - * 1.4.0beta37-87 14 10400 14.so.14.0[.0] - * 1.4.0rc01 14 10400 14.so.14.0[.0] - * 1.4.0beta88-109 14 10400 14.so.14.0[.0] - * 1.4.0rc02-08 14 10400 14.so.14.0[.0] - * 1.4.0 14 10400 14.so.14.0[.0] - * 1.4.1beta01-03 14 10401 14.so.14.1[.0] - * 1.4.1rc01 14 10401 14.so.14.1[.0] - * 1.4.1beta04-12 14 10401 14.so.14.1[.0] - * 1.4.1 14 10401 14.so.14.1[.0] - * 1.4.2 14 10402 14.so.14.2[.0] - * 1.4.3 14 10403 14.so.14.3[.0] - * 1.4.4 14 10404 14.so.14.4[.0] - * 1.5.0beta01-58 15 10500 15.so.15.0[.0] - * 1.5.0rc01-07 15 10500 15.so.15.0[.0] - * 1.5.0 15 10500 15.so.15.0[.0] - * 1.5.1beta01-11 15 10501 15.so.15.1[.0] - * 1.5.1rc01-02 15 10501 15.so.15.1[.0] - * 1.5.1 15 10501 15.so.15.1[.0] - * 1.5.2beta01-03 15 10502 15.so.15.2[.0] - * 1.5.2rc01-03 15 10502 15.so.15.2[.0] - * 1.5.2 15 10502 15.so.15.2[.0] - * 1.5.3beta01-10 15 10503 15.so.15.3[.0] - * 1.5.3rc01-02 15 10503 15.so.15.3[.0] - * 1.5.3beta11 15 10503 15.so.15.3[.0] - * 1.5.3 [omitted] - * 1.5.4beta01-08 15 10504 15.so.15.4[.0] - * 1.5.4rc01 15 10504 15.so.15.4[.0] - * 1.5.4 15 10504 15.so.15.4[.0] - * 1.5.5beta01-08 15 10505 15.so.15.5[.0] - * 1.5.5rc01 15 10505 15.so.15.5[.0] - * 1.5.5 15 10505 15.so.15.5[.0] - * 1.5.6beta01-07 15 10506 15.so.15.6[.0] - * 1.5.6rc01-03 15 10506 15.so.15.6[.0] - * 1.5.6 15 10506 15.so.15.6[.0] - * 1.5.7beta01-05 15 10507 15.so.15.7[.0] - * 1.5.7rc01-03 15 10507 15.so.15.7[.0] - * 1.5.7 15 10507 15.so.15.7[.0] - * 1.5.8beta01 15 10508 15.so.15.8[.0] - * 1.5.8rc01 15 10508 15.so.15.8[.0] - * 1.5.8 15 10508 15.so.15.8[.0] - * 1.5.9beta01-02 15 10509 15.so.15.9[.0] - * 1.5.9rc01 15 10509 15.so.15.9[.0] - * 1.5.9 15 10509 15.so.15.9[.0] - * 1.5.10beta01-05 15 10510 15.so.15.10[.0] - * 1.5.10 15 10510 15.so.15.10[.0] - * 1.5.11beta01 15 10511 15.so.15.11[.0] - * 1.5.11rc01-05 15 10511 15.so.15.11[.0] - * 1.5.11 15 10511 15.so.15.11[.0] - * 1.5.12 15 10512 15.so.15.12[.0] - * 1.5.13beta01-02 15 10513 15.so.15.13[.0] - * 1.5.13rc01 15 10513 15.so.15.13[.0] - * 1.5.13 15 10513 15.so.15.13[.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-manual.txt or libpng.3 for more information. The PNG - * specification is available as a W3C Recommendation and as an ISO - * Specification, -# endif - - /* Need the time information for converting tIME chunks, it - * defines struct tm: - */ -# ifdef PNG_CONVERT_tIME_SUPPORTED - /* "time.h" functions are not supported on all operating systems */ -# include -# endif -# endif - -/* 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. Any configuration options that can be specified by for the application - * code when it is built. (Build time configuration is in pnglibconf.h) - * 2. Type definitions (base types are defined in pngconf.h), structure - * definitions. - * 3. Exported library functions. - * - * The library source code has additional files (principally pngpriv.h) that - * allow configuration of the library. - */ -/* Section 1: 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 2: 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_5_13; - -/* 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 FAR * png_colorp; -typedef PNG_CONST png_color FAR * png_const_colorp; -typedef png_color FAR * FAR * 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 FAR * png_color_16p; -typedef PNG_CONST png_color_16 FAR * png_const_color_16p; -typedef png_color_16 FAR * FAR * 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 FAR * png_color_8p; -typedef PNG_CONST png_color_8 FAR * png_const_color_8p; -typedef png_color_8 FAR * FAR * 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 FAR * png_sPLT_entryp; -typedef PNG_CONST png_sPLT_entry FAR * png_const_sPLT_entryp; -typedef png_sPLT_entry FAR * FAR * 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 FAR * png_sPLT_tp; -typedef PNG_CONST png_sPLT_t FAR * png_const_sPLT_tp; -typedef png_sPLT_t FAR * FAR * 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 */ - png_size_t text_length; /* length of the text string */ - png_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 FAR * png_textp; -typedef PNG_CONST png_text FAR * png_const_textp; -typedef png_text FAR * FAR * 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 FAR * png_timep; -typedef PNG_CONST png_time FAR * png_const_timep; -typedef png_time FAR * FAR * png_timepp; - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ - defined(PNG_HANDLE_AS_UNKNOWN_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. - */ -typedef struct png_unknown_chunk_t -{ - png_byte name[5]; - png_byte *data; - png_size_t size; - - /* libpng-using applications should NOT directly modify this byte. */ - png_byte location; /* mode of operation at read time */ -} - - -png_unknown_chunk; -typedef png_unknown_chunk FAR * png_unknown_chunkp; -typedef PNG_CONST png_unknown_chunk FAR * png_const_unknown_chunkp; -typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp; -#endif - -/* Values for the unknown chunk location byte */ - -#define PNG_HAVE_IHDR 0x01 -#define PNG_HAVE_PLTE 0x02 -#define PNG_AFTER_IDAT 0x08 - -/* The complete definition of png_info has, as of libpng-1.5.0, - * 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 FAR * png_infop; -typedef PNG_CONST png_info FAR * png_const_infop; -typedef png_info FAR * FAR * png_infopp; - -/* 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 ((png_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 0x0001 -#define PNG_INFO_sBIT 0x0002 -#define PNG_INFO_cHRM 0x0004 -#define PNG_INFO_PLTE 0x0008 -#define PNG_INFO_tRNS 0x0010 -#define PNG_INFO_bKGD 0x0020 -#define PNG_INFO_hIST 0x0040 -#define PNG_INFO_pHYs 0x0080 -#define PNG_INFO_oFFs 0x0100 -#define PNG_INFO_tIME 0x0200 -#define PNG_INFO_pCAL 0x0400 -#define PNG_INFO_sRGB 0x0800 /* GR-P, 0.96a */ -#define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */ -#define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */ -#define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */ -#define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */ - -/* 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 */ - png_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 FAR * png_row_infop; -typedef png_row_info FAR * FAR * png_row_infopp; - -/* The complete definition of png_struct has, as of libpng-1.5.0, - * 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_struct_def png_struct; -typedef PNG_CONST png_struct FAR * png_const_structp; -typedef png_struct FAR * png_structp; - -/* 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, png_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 -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 */ -#define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */ - -/* 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)); - -typedef png_struct FAR * FAR * png_structpp; - -/* Section 3: 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_structp 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, png_size_t start, - png_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, png_size_t, png_get_compression_buffer_size, - (png_const_structp png_ptr)); - -PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structp png_ptr, - png_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_structp 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_structp png_ptr, int val), - PNG_NORETURN); - -#ifdef PNG_READ_SUPPORTED -/* Reset the compression stream */ -PNG_EXPORT(10, int, png_reset_zstream, (png_structp png_ptr)); -#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_structp png_ptr)); - -/* Write a PNG chunk - size, type, (optional) data, CRC. */ -PNG_EXPORT(14, void, png_write_chunk, (png_structp png_ptr, png_const_bytep - chunk_name, png_const_bytep data, png_size_t length)); - -/* Write the start of a PNG chunk - length and chunk name. */ -PNG_EXPORT(15, void, png_write_chunk_start, (png_structp 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_structp png_ptr, - png_const_bytep data, png_size_t length)); - -/* Finish a chunk started with png_write_chunk_start() (includes CRC). */ -PNG_EXPORT(17, void, png_write_chunk_end, (png_structp png_ptr)); - -/* Allocate and initialize the info structure */ -PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_structp png_ptr), - PNG_ALLOCATED); - -PNG_EXPORT(19, void, png_info_init_3, (png_infopp info_ptr, - png_size_t png_info_struct_size)); - -/* Writes all the PNG information before the image. */ -PNG_EXPORT(20, void, png_write_info_before_PLTE, - (png_structp png_ptr, png_infop info_ptr)); -PNG_EXPORT(21, void, png_write_info, - (png_structp png_ptr, png_infop info_ptr)); - -#ifdef PNG_SEQUENTIAL_READ_SUPPORTED -/* Read the information before the actual image data. */ -PNG_EXPORT(22, void, png_read_info, - (png_structp png_ptr, png_infop info_ptr)); -#endif - -#ifdef PNG_TIME_RFC1123_SUPPORTED -PNG_EXPORT(23, png_const_charp, png_convert_to_rfc1123, - (png_structp png_ptr, - 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, - PNG_CONST struct tm FAR * 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 /* PNG_CONVERT_tIME_SUPPORTED */ - -#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_structp png_ptr)); -PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structp png_ptr)); -PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structp png_ptr)); -PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structp 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_structp 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_structp 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_structp 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_structp png_ptr, - int error_action, double red, double green)) -PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structp 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_structp - 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 when an alpha channel, or 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. 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 reencode - * 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. 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. This is the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' mode (the - * latter being the two common names for associated alpha color channels.) - * - * 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. - * - * 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_structp png_ptr, int mode, - double output_gamma)) -PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structp png_ptr, - int mode, png_fixed_point output_gamma)) -#endif - -#if defined(PNG_READ_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. 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 following values can be passed to either the fixed or floating - * point APIs, but the floating point API will also accept floating point - * values. - */ -#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 preceeded 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 ouput 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_structp 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_structp 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_structp png_ptr)); -#endif - -#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) -/* Add a filler byte to 8-bit Gray or 24-bit RGB images. */ -PNG_EXPORT(39, void, png_set_filler, (png_structp 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 Gray or 24-bit RGB images. */ -PNG_EXPORT(40, void, png_set_add_alpha, - (png_structp png_ptr, png_uint_32 filler, - int flags)); -#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */ - -#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_structp 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_structp 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_structp 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_structp 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_structp 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_structp 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_structp 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_structp 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_structp 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_structp 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_structp 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_structp png_ptr, double screen_gamma, - double override_file_gamma)) -PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structp 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_structp png_ptr, int nrows)); -/* Flush the current PNG output buffer */ -PNG_EXPORT(52, void, png_write_flush, (png_structp png_ptr)); -#endif - -/* Optional update palette with requested transformations */ -PNG_EXPORT(53, void, png_start_read_image, (png_structp png_ptr)); - -/* Optional call to update the users info structure */ -PNG_EXPORT(54, void, png_read_update_info, - (png_structp png_ptr, png_infop info_ptr)); - -#ifdef PNG_SEQUENTIAL_READ_SUPPORTED -/* Read one or more rows of image data. */ -PNG_EXPORT(55, void, png_read_rows, (png_structp 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_structp 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_structp png_ptr, png_bytepp image)); -#endif - -/* Write a row of image data */ -PNG_EXPORT(58, void, png_write_row, - (png_structp 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_structp png_ptr, png_bytepp row, - png_uint_32 num_rows)); - -/* Write the image data */ -PNG_EXPORT(60, void, png_write_image, - (png_structp png_ptr, png_bytepp image)); - -/* Write the end of the PNG file. */ -PNG_EXPORT(61, void, png_write_end, - (png_structp png_ptr, png_infop info_ptr)); - -#ifdef PNG_SEQUENTIAL_READ_SUPPORTED -/* Read the end of the PNG file. */ -PNG_EXPORT(62, void, png_read_end, (png_structp png_ptr, png_infop info_ptr)); -#endif - -/* Free any memory associated with the png_info_struct */ -PNG_EXPORT(63, void, png_destroy_info_struct, (png_structp 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_structp 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 */ - -/* 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_structp png_ptr, int method, int filters)); - -/* 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_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \ - 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_WEIGHTED_FILTER_SUPPORTED /* EXPERIMENTAL */ -/* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_ - * defines, either the default (minimum-sum-of-absolute-differences), or - * the experimental method (weighted-minimum-sum-of-absolute-differences). - * - * Weights are factors >= 1.0, indicating how important it is to keep the - * filter type consistent between rows. Larger numbers mean the current - * filter is that many times as likely to be the same as the "num_weights" - * previous filters. This is cumulative for each previous row with a weight. - * There needs to be "num_weights" values in "filter_weights", or it can be - * NULL if the weights aren't being specified. Weights have no influence on - * the selection of the first row filter. Well chosen weights can (in theory) - * improve the compression for a given image. - * - * Costs are factors >= 1.0 indicating the relative decoding costs of a - * filter type. Higher costs indicate more decoding expense, and are - * therefore less likely to be selected over a filter with lower computational - * costs. There needs to be a value in "filter_costs" for each valid filter - * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't - * setting the costs. Costs try to improve the speed of decompression without - * unduly increasing the compressed image size. - * - * A negative weight or cost indicates the default value is to be used, and - * values in the range [0.0, 1.0) indicate the value is to remain unchanged. - * The default values for both weights and costs are currently 1.0, but may - * change if good general weighting/cost heuristics can be found. If both - * the weights and costs are set to 1.0, this degenerates the WEIGHTED method - * to the UNWEIGHTED method, but with added encoding time/computation. - */ -PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structp 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_structp png_ptr, - int heuristic_method, int num_weights, png_const_fixed_point_p - filter_weights, png_const_fixed_point_p filter_costs)) -#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ - -/* Heuristic used for row filter selection. These defines should NOT be - * changed. - */ -#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 */ - -#ifdef PNG_WRITE_SUPPORTED -/* 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. - */ -PNG_EXPORT(69, void, png_set_compression_level, - (png_structp png_ptr, int level)); - -PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structp png_ptr, - int mem_level)); - -PNG_EXPORT(71, void, png_set_compression_strategy, (png_structp 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_structp png_ptr, - int window_bits)); - -PNG_EXPORT(73, void, png_set_compression_method, (png_structp png_ptr, - int method)); -#endif - -#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_structp png_ptr, int level)); - -PNG_EXPORT(223, void, png_set_text_compression_mem_level, (png_structp png_ptr, - int mem_level)); - -PNG_EXPORT(224, void, png_set_text_compression_strategy, (png_structp 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_structp - png_ptr, int window_bits)); - -PNG_EXPORT(226, void, png_set_text_compression_method, (png_structp png_ptr, - int method)); -#endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */ - -/* 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_structp 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_structp 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_structp 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_structp 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_structp 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_structp png_ptr)); - -PNG_EXPORT(80, void, png_set_read_status_fn, (png_structp png_ptr, - png_read_status_ptr read_row_fn)); - -PNG_EXPORT(81, void, png_set_write_status_fn, (png_structp 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_structp 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_structp png_ptr)); -#endif - -#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED -PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structp 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_structp 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_structp 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_structp 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_structp)); -PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structp)); -#endif - -#ifdef PNG_USER_CHUNKS_SUPPORTED -PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structp png_ptr, - png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); -PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structp 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_structp 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_structp png_ptr)); - -/* Function to be called when data becomes available */ -PNG_EXPORT(92, void, png_process_data, - (png_structp png_ptr, png_infop info_ptr, - png_bytep buffer, png_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, png_size_t, png_process_data_pause, (png_structp, 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_structp)); - -#ifdef PNG_READ_INTERLACING_SUPPORTED -/* 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_structp png_ptr, - png_bytep old_row, png_const_bytep new_row)); -#endif /* PNG_READ_INTERLACING_SUPPORTED */ -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ - -PNG_EXPORTA(94, png_voidp, png_malloc, - (png_structp png_ptr, png_alloc_size_t size), - PNG_ALLOCATED); -/* Added at libpng version 1.4.0 */ -PNG_EXPORTA(95, png_voidp, png_calloc, - (png_structp 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_structp png_ptr, - png_alloc_size_t size), PNG_ALLOCATED); - -/* Frees a pointer allocated by png_malloc() */ -PNG_EXPORT(97, void, png_free, (png_structp png_ptr, png_voidp ptr)); - -/* Free data that was allocated internally */ -PNG_EXPORT(98, void, png_free_data, - (png_structp png_ptr, png_infop info_ptr, png_uint_32 free_me, int num)); - -/* Reassign responsibility for freeing existing data, whether allocated - * by libpng or by the application */ -PNG_EXPORT(99, void, png_data_freer, - (png_structp png_ptr, png_infop 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 0x0008 -#define PNG_FREE_ICCP 0x0010 -#define PNG_FREE_SPLT 0x0020 -#define PNG_FREE_ROWS 0x0040 -#define PNG_FREE_PCAL 0x0080 -#define PNG_FREE_SCAL 0x0100 -#define PNG_FREE_UNKN 0x0200 -#define PNG_FREE_LIST 0x0400 -#define PNG_FREE_PLTE 0x1000 -#define PNG_FREE_TRNS 0x2000 -#define PNG_FREE_TEXT 0x4000 -#define PNG_FREE_ALL 0x7fff -#define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ - -#ifdef PNG_USER_MEM_SUPPORTED -PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_structp png_ptr, - png_alloc_size_t size), PNG_ALLOCATED); -PNG_EXPORT(101, void, png_free_default, (png_structp png_ptr, png_voidp ptr)); -#endif - -#ifdef PNG_ERROR_TEXT_SUPPORTED -/* Fatal error in PNG image of libpng - can't continue */ -PNG_EXPORTA(102, void, png_error, - (png_structp 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_structp 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_structp png_ptr), PNG_NORETURN); -#endif - -#ifdef PNG_WARNINGS_SUPPORTED -/* Non-fatal error in libpng. Can continue, but may have a problem. */ -PNG_EXPORT(105, void, png_warning, (png_structp 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_structp png_ptr, - png_const_charp warning_message)); -#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. */ -# undef png_benign_error -PNG_EXPORT(107, void, png_benign_error, (png_structp png_ptr, - png_const_charp warning_message)); - -/* Same, chunk name is prepended to message. */ -# undef png_chunk_benign_error -PNG_EXPORT(108, void, png_chunk_benign_error, (png_structp png_ptr, - png_const_charp warning_message)); - -PNG_EXPORT(109, void, png_set_benign_errors, - (png_structp 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_structp png_ptr, png_const_infop info_ptr, - png_uint_32 flag)); - -/* Returns number of bytes needed to hold a transformed row. */ -PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structp png_ptr, - png_const_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, - png_infop info_ptr, png_bytepp row_pointers)); -#endif - -/* Returns number of color channels in image. */ -PNG_EXPORT(114, png_byte, png_get_channels, - (png_const_structp png_ptr, png_const_infop info_ptr)); - -#ifdef PNG_EASY_ACCESS_SUPPORTED -/* Returns image width in pixels. */ -PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structp png_ptr, - png_const_infop info_ptr)); - -/* Returns image height in pixels. */ -PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structp png_ptr, - png_const_infop info_ptr)); - -/* Returns image bit_depth. */ -PNG_EXPORT(117, png_byte, png_get_bit_depth, - (png_const_structp png_ptr, png_const_infop info_ptr)); - -/* Returns image color_type. */ -PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structp png_ptr, - png_const_infop info_ptr)); - -/* Returns image filter_type. */ -PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structp png_ptr, - png_const_infop info_ptr)); - -/* Returns image interlace_type. */ -PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structp png_ptr, - png_const_infop info_ptr)); - -/* Returns image compression_type. */ -PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structp png_ptr, - png_const_infop 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_structp png_ptr, png_const_infop info_ptr)); -PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter, - (png_const_structp png_ptr, png_const_infop info_ptr)); -PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter, - (png_const_structp png_ptr, png_const_infop info_ptr)); - -/* Returns pixel aspect ratio, computed from pHYs chunk data. */ -PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio, - (png_const_structp png_ptr, png_const_infop info_ptr)) -PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed, - (png_const_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop info_ptr)); -PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels, - (png_const_structp png_ptr, png_const_infop info_ptr)); -PNG_EXPORT(128, png_int_32, png_get_x_offset_microns, - (png_const_structp png_ptr, png_const_infop info_ptr)); -PNG_EXPORT(129, png_int_32, png_get_y_offset_microns, - (png_const_structp png_ptr, png_const_infop info_ptr)); - -#endif /* PNG_EASY_ACCESS_SUPPORTED */ - -/* Returns pointer to signature string read from PNG header */ -PNG_EXPORT(130, png_const_bytep, png_get_signature, - (png_const_structp png_ptr, png_infop info_ptr)); - -#ifdef PNG_bKGD_SUPPORTED -PNG_EXPORT(131, png_uint_32, png_get_bKGD, - (png_const_structp png_ptr, png_infop info_ptr, - png_color_16p *background)); -#endif - -#ifdef PNG_bKGD_SUPPORTED -PNG_EXPORT(132, void, png_set_bKGD, (png_structp png_ptr, png_infop info_ptr, - png_const_color_16p background)); -#endif - -#ifdef PNG_cHRM_SUPPORTED -PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structp png_ptr, - png_const_infop 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_structp png_ptr, - png_const_infop 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)) -#ifdef PNG_FIXED_POINT_SUPPORTED /* Otherwise not implemented */ -PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed, - (png_const_structp png_ptr, - png_const_infop 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)) -#endif -PNG_FIXED_EXPORT(231, png_uint_32, png_get_cHRM_XYZ_fixed, - (png_structp png_ptr, png_const_infop 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_structp png_ptr, png_infop 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_structp png_ptr, - png_infop 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_structp png_ptr, - png_infop 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_structp png_ptr, - png_infop 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_gAMA_SUPPORTED -PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA, - (png_const_structp png_ptr, png_const_infop info_ptr, - double *file_gamma)) -PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed, - (png_const_structp png_ptr, png_const_infop info_ptr, - png_fixed_point *int_file_gamma)) -#endif - -#ifdef PNG_gAMA_SUPPORTED -PNG_FP_EXPORT(139, void, png_set_gAMA, (png_structp png_ptr, - png_infop info_ptr, double file_gamma)) -PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_structp png_ptr, - png_infop info_ptr, png_fixed_point int_file_gamma)) -#endif - -#ifdef PNG_hIST_SUPPORTED -PNG_EXPORT(141, png_uint_32, png_get_hIST, - (png_const_structp png_ptr, png_const_infop info_ptr, - png_uint_16p *hist)); -#endif - -#ifdef PNG_hIST_SUPPORTED -PNG_EXPORT(142, void, png_set_hIST, (png_structp png_ptr, - png_infop info_ptr, png_const_uint_16p hist)); -#endif - -PNG_EXPORT(143, png_uint_32, png_get_IHDR, - (png_structp png_ptr, png_infop 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_structp png_ptr, png_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, png_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, - png_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, png_infop 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_structp png_ptr, png_const_infop info_ptr, - png_colorp *palette, int *num_palette)); - -PNG_EXPORT(152, void, png_set_PLTE, - (png_structp png_ptr, png_infop info_ptr, - png_const_colorp palette, int num_palette)); - -#ifdef PNG_sBIT_SUPPORTED -PNG_EXPORT(153, png_uint_32, png_get_sBIT, - (png_const_structp png_ptr, png_infop info_ptr, - png_color_8p *sig_bit)); -#endif - -#ifdef PNG_sBIT_SUPPORTED -PNG_EXPORT(154, void, png_set_sBIT, - (png_structp png_ptr, png_infop info_ptr, png_const_color_8p sig_bit)); -#endif - -#ifdef PNG_sRGB_SUPPORTED -PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structp png_ptr, - png_const_infop info_ptr, int *file_srgb_intent)); -#endif - -#ifdef PNG_sRGB_SUPPORTED -PNG_EXPORT(156, void, png_set_sRGB, - (png_structp png_ptr, png_infop info_ptr, int srgb_intent)); -PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_structp png_ptr, - png_infop info_ptr, int srgb_intent)); -#endif - -#ifdef PNG_iCCP_SUPPORTED -PNG_EXPORT(158, png_uint_32, png_get_iCCP, - (png_const_structp png_ptr, png_const_infop 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_structp png_ptr, png_infop 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, png_uint_32, png_get_sPLT, - (png_const_structp png_ptr, png_const_infop info_ptr, - png_sPLT_tpp entries)); -#endif - -#ifdef PNG_sPLT_SUPPORTED -PNG_EXPORT(161, void, png_set_sPLT, - (png_structp png_ptr, png_infop 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, png_uint_32, png_get_text, - (png_const_structp png_ptr, png_const_infop 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_structp png_ptr, png_infop 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_structp png_ptr, png_infop info_ptr, png_timep *mod_time)); -#endif - -#ifdef PNG_tIME_SUPPORTED -PNG_EXPORT(165, void, png_set_tIME, - (png_structp png_ptr, png_infop info_ptr, png_const_timep mod_time)); -#endif - -#ifdef PNG_tRNS_SUPPORTED -PNG_EXPORT(166, png_uint_32, png_get_tRNS, - (png_const_structp png_ptr, png_infop 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_structp png_ptr, png_infop 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_structp png_ptr, png_const_infop info_ptr, - int *unit, double *width, double *height)) -#ifdef PNG_FLOATING_ARITHMETIC_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_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop info_ptr, - int *unit, png_charpp swidth, png_charpp sheight)); - -PNG_FP_EXPORT(170, void, png_set_sCAL, - (png_structp png_ptr, png_infop info_ptr, - int unit, double width, double height)) -PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_structp png_ptr, - png_infop info_ptr, int unit, png_fixed_point width, - png_fixed_point height)) -PNG_EXPORT(171, void, png_set_sCAL_s, - (png_structp png_ptr, png_infop info_ptr, - int unit, png_const_charp swidth, png_const_charp sheight)); -#endif /* PNG_sCAL_SUPPORTED */ - -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED -/* Provide a list of chunks and how they are to be handled, if the built-in - handling or default unknown chunk handling is not desired. Any chunks not - listed will be handled in the default manner. 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! - keep = 0: PNG_HANDLE_CHUNK_AS_DEFAULT: follow default behavior - = 1: PNG_HANDLE_CHUNK_NEVER: do not keep - = 2: PNG_HANDLE_CHUNK_IF_SAFE: keep only if safe-to-copy - = 3: PNG_HANDLE_CHUNK_ALWAYS: keep even if unsafe-to-copy -*/ -PNG_EXPORT(172, void, png_set_keep_unknown_chunks, - (png_structp png_ptr, int keep, - png_const_bytep chunk_list, int num_chunks)); - -/* The handling code 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_structp png_ptr, - png_const_bytep chunk_name)); -#endif -#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED -PNG_EXPORT(174, void, png_set_unknown_chunks, (png_structp png_ptr, - png_infop info_ptr, png_const_unknown_chunkp unknowns, - int num_unknowns)); -PNG_EXPORT(175, void, png_set_unknown_chunk_location, - (png_structp png_ptr, png_infop info_ptr, int chunk, int location)); -PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structp png_ptr, - png_const_infop 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_structp png_ptr, png_infop info_ptr, int mask)); - -#ifdef PNG_INFO_IMAGE_SUPPORTED -/* The "params" pointer is currently not used and is for future expansion. */ -PNG_EXPORT(178, void, png_read_png, (png_structp png_ptr, png_infop info_ptr, - int transforms, png_voidp params)); -PNG_EXPORT(179, void, png_write_png, (png_structp png_ptr, png_infop info_ptr, - int transforms, png_voidp params)); -#endif - -PNG_EXPORT(180, png_const_charp, png_get_copyright, - (png_const_structp png_ptr)); -PNG_EXPORT(181, png_const_charp, png_get_header_ver, - (png_const_structp png_ptr)); -PNG_EXPORT(182, png_const_charp, png_get_header_version, - (png_const_structp png_ptr)); -PNG_EXPORT(183, png_const_charp, png_get_libpng_ver, - (png_const_structp png_ptr)); - -#ifdef PNG_MNG_FEATURES_SUPPORTED -PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structp 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 - -/* 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_structp 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_structp 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_structp png_ptr)); -PNG_EXPORT(188, png_uint_32, png_get_user_height_max, - (png_const_structp png_ptr)); -/* Added in libpng-1.4.0 */ -PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structp png_ptr, - png_uint_32 user_chunk_cache_max)); -PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max, - (png_const_structp png_ptr)); -/* Added in libpng-1.4.1 */ -PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structp png_ptr, - png_alloc_size_t user_chunk_cache_max)); -PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max, - (png_const_structp png_ptr)); -#endif - -#if defined(PNG_INCH_CONVERSIONS_SUPPORTED) -PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch, - (png_const_structp png_ptr, png_const_infop info_ptr)); - -PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch, - (png_const_structp png_ptr, png_const_infop info_ptr)); - -PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch, - (png_const_structp png_ptr, png_const_infop info_ptr)); - -PNG_FP_EXPORT(196, float, png_get_x_offset_inches, - (png_const_structp png_ptr, png_const_infop info_ptr)) -#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ -PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed, - (png_structp png_ptr, png_const_infop info_ptr)) -#endif - -PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structp png_ptr, - png_const_infop info_ptr)) -#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ -PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed, - (png_structp png_ptr, png_const_infop info_ptr)) -#endif - -# ifdef PNG_pHYs_SUPPORTED -PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structp png_ptr, - png_const_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, - int *unit_type)); -# endif /* PNG_pHYs_SUPPORTED */ -#endif /* PNG_INCH_CONVERSIONS_SUPPORTED */ - -/* Added in libpng-1.4.0 */ -#ifdef PNG_IO_STATE_SUPPORTED -PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_structp png_ptr)); - -PNG_EXPORTA(200, png_const_bytep, png_get_io_chunk_name, - (png_structp png_ptr), PNG_DEPRECATED); -PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type, - (png_const_structp 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 /* ?PNG_IO_STATE_SUPPORTED */ - -/* 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(yIn, pass) \ - (((yIn)<>(((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); } - -# 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)((temp + (temp >> 16)) >> 16); } - -#else /* Standard method using integer division */ - -# define png_composite(composite, fg, alpha, bg) \ - (composite) = (png_byte)(((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)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \ - (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) + \ - 32767) / 65535) -#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */ - -#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_structp 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) ^ 0xffffffffL) + 1)) \ - : (png_int_32)png_get_uint_32(buf))) -#endif - -#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \ - defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED) -PNG_EXPORT(234, void, png_set_check_for_invalid_index, (png_structp png_ptr, - int allowed)); -#endif - -/* Maintainer: Put new public prototypes here ^, in libpng.3, and project - * defs - */ - -/* The last ordinal number (this is the *last* one already used; the next - * one to use is one more than this.) Maintainer, remember to add an entry to - * scripts/symbols.def as well. - */ -#ifdef PNG_EXPORT_LAST_ORDINAL - PNG_EXPORT_LAST_ORDINAL(234); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* PNG_VERSION_INFO_ONLY */ -/* Do not put anything past this line */ -#endif /* PNG_H */ diff --git a/Source/LibPNG/pngconf.h b/Source/LibPNG/pngconf.h deleted file mode 100644 index a364928..0000000 --- a/Source/LibPNG/pngconf.h +++ /dev/null @@ -1,598 +0,0 @@ - -/* pngconf.h - machine configurable file for libpng - * - * libpng version 1.5.13 - September 27, 2012 - * - * Copyright (c) 1998-2012 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 -/* PNG_NO_LIMITS_H may be used to turn off the use of the standard C - * definition file for machine specific limits, this may impact the - * correctness of the definitions below (see uses of INT_MAX). - */ -# ifndef PNG_NO_LIMITS_H -# include -# endif - -/* For the memory copy APIs (i.e. the standard definitions of these), - * because this file defines png_memcpy and so on the base APIs must - * be defined here. - */ -# ifdef BSD -# include -# else -# include -# endif - -/* For png_FILE_p - this provides the standard definition of a - * FILE - */ -# ifdef PNG_STDIO_SUPPORTED -# include -# endif -#endif - -/* This controls optimization of the reading of 16 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 protects us against machines that don't have function - * prototypes (ie K&R style headers). If your compiler does not handle - * function prototypes, define this macro and use the included ansi2knr. - * I've always been able to use _NO_PROTO as the indicator, but you may - * need to drag the empty declaration out in front of here, or change the - * ifdef to suit your own needs. - */ -#ifndef PNGARG - -# ifdef OF /* zlib prototype munger */ -# define PNGARG(arglist) OF(arglist) -# else - -# ifdef _NO_PROTO -# define PNGARG(arglist) () -# else -# define PNGARG(arglist) arglist -# endif /* _NO_PROTO */ - -# endif /* OF */ - -#endif /* PNGARG */ - -/* 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 sytems) 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/x86 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__) ) &&\ - ( defined(_X86_) || defined(_X64_) || defined(_M_IX86) ||\ - defined(_M_X64) || defined(_M_IA64) ) - /* Windows system (DOS doesn't support DLLs) running on x86/x64. Includes - * builds under Cygwin or MinGW. 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 -# 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/x86 */ -# 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), \ - extern 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. - */ -# if 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 -# endif /* __GNUC__ >= 3 */ -# endif /* __GNUC__ */ - -# if 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 -# endif /* _MSC_VER */ -#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_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 - -/* The following uses const char * instead of char * for error - * and warning message functions, so some compilers won't complain. - * If you do not want to use const, define PNG_NO_CONST here. - * - * This should not change how the APIs are called, so it can be done - * on a per-file basis in the application. - */ -#ifndef PNG_CONST -# ifndef PNG_NO_CONST -# define PNG_CONST const -# else -# define PNG_CONST -# endif -#endif - -/* Some typedefs to get us started. These should be safe on most of the - * common platforms. The typedefs should be at least as large as the - * numbers suggest (a png_uint_32 must be at least 32 bits long), but they - * don't have to be exactly that size. Some compilers dislike passing - * unsigned shorts as function parameters, so you may be better off using - * unsigned int for png_uint_16. - */ - -#if defined(INT_MAX) && (INT_MAX > 0x7ffffffeL) -typedef unsigned int png_uint_32; -typedef int png_int_32; -#else -typedef unsigned long png_uint_32; -typedef long png_int_32; -#endif -typedef unsigned short png_uint_16; -typedef short png_int_16; -typedef unsigned char png_byte; - -#ifdef PNG_NO_SIZE_T -typedef unsigned int png_size_t; -#else -typedef size_t png_size_t; -#endif -#define png_sizeof(x) (sizeof (x)) - -/* The following is needed for medium model support. It cannot be in the - * pngpriv.h header. Needs modification for other compilers besides - * MSC. Model independent support declares all arrays and pointers to be - * large using the far keyword. The zlib version used must also support - * model independent data. As of version zlib 1.0.4, the necessary changes - * have been made in zlib. The USE_FAR_KEYWORD define triggers other - * changes that are needed. (Tim Wegner) - */ - -/* Separate compiler dependencies (problem here is that zlib.h always - * defines FAR. (SJT) - */ -#ifdef __BORLANDC__ -# if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__) -# define LDATA 1 -# else -# define LDATA 0 -# endif - /* GRR: why is Cygwin in here? Cygwin is not Borland C... */ -# if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__) -# define PNG_MAX_MALLOC_64K /* only used in build */ -# if (LDATA != 1) -# ifndef FAR -# define FAR __far -# endif -# define USE_FAR_KEYWORD -# endif /* LDATA != 1 */ - /* Possibly useful for moving data out of default segment. - * Uncomment it if you want. Could also define FARDATA as - * const if your compiler supports it. (SJT) -# define FARDATA FAR - */ -# endif /* __WIN32__, __FLAT__, __CYGWIN__ */ -#endif /* __BORLANDC__ */ - - -/* Suggest testing for specific compiler first before testing for - * FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM, - * making reliance oncertain keywords suspect. (SJT) - */ - -/* MSC Medium model */ -#ifdef FAR -# ifdef M_I86MM -# define USE_FAR_KEYWORD -# define FARDATA FAR -# include -# endif -#endif - -/* SJT: default case */ -#ifndef FAR -# define FAR -#endif - -/* At this point FAR is always defined */ -#ifndef FARDATA -# define FARDATA -#endif - -/* 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 FAR * png_voidp; -typedef PNG_CONST void FAR * png_const_voidp; -typedef png_byte FAR * png_bytep; -typedef PNG_CONST png_byte FAR * png_const_bytep; -typedef png_uint_32 FAR * png_uint_32p; -typedef PNG_CONST png_uint_32 FAR * png_const_uint_32p; -typedef png_int_32 FAR * png_int_32p; -typedef PNG_CONST png_int_32 FAR * png_const_int_32p; -typedef png_uint_16 FAR * png_uint_16p; -typedef PNG_CONST png_uint_16 FAR * png_const_uint_16p; -typedef png_int_16 FAR * png_int_16p; -typedef PNG_CONST png_int_16 FAR * png_const_int_16p; -typedef char FAR * png_charp; -typedef PNG_CONST char FAR * png_const_charp; -typedef png_fixed_point FAR * png_fixed_point_p; -typedef PNG_CONST png_fixed_point FAR * png_const_fixed_point_p; -typedef png_size_t FAR * png_size_tp; -typedef PNG_CONST png_size_t FAR * png_const_size_tp; - -#ifdef PNG_STDIO_SUPPORTED -typedef FILE * png_FILE_p; -#endif - -#ifdef PNG_FLOATING_POINT_SUPPORTED -typedef double FAR * png_doublep; -typedef PNG_CONST double FAR * png_const_doublep; -#endif - -/* Pointers to pointers; i.e. arrays */ -typedef png_byte FAR * FAR * png_bytepp; -typedef png_uint_32 FAR * FAR * png_uint_32pp; -typedef png_int_32 FAR * FAR * png_int_32pp; -typedef png_uint_16 FAR * FAR * png_uint_16pp; -typedef png_int_16 FAR * FAR * png_int_16pp; -typedef PNG_CONST char FAR * FAR * png_const_charpp; -typedef char FAR * FAR * png_charpp; -typedef png_fixed_point FAR * FAR * png_fixed_point_pp; -#ifdef PNG_FLOATING_POINT_SUPPORTED -typedef double FAR * FAR * png_doublepp; -#endif - -/* Pointers to pointers to pointers; i.e., pointer to array */ -typedef char FAR * FAR * FAR * png_charppp; - -/* png_alloc_size_t is guaranteed to be no smaller than png_size_t, - * and no smaller than png_uint_32. Casts from png_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 png_size_t or - * png_uint_32) should be explicitly applied; however, we do not expect - * to encounter practical situations that require such conversions. - */ -#if defined(__TURBOC__) && !defined(__FLAT__) - typedef unsigned long png_alloc_size_t; -#else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - typedef unsigned long png_alloc_size_t; -# else - /* This is an attempt to detect an old Windows system where (int) is - * actually 16 bits, in that case png_malloc must have an argument with a - * bigger size to accomodate the requirements of the library. - */ -# if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) && \ - (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL) - typedef DWORD png_alloc_size_t; -# else - typedef png_size_t png_alloc_size_t; -# endif -# endif -#endif - -#endif /* PNGCONF_H */ diff --git a/Source/LibPNG/pngdebug.h b/Source/LibPNG/pngdebug.h deleted file mode 100644 index 16f81fd..0000000 --- a/Source/LibPNG/pngdebug.h +++ /dev/null @@ -1,157 +0,0 @@ - -/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c - * - * Copyright (c) 1998-2011 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.) - * - * Last changed in libpng 1.5.0 [January 6, 2011] - * - * 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' tab characters (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) -/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on - * non-ISO compilers - */ -# 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 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ - } 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 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),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 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),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/Source/LibPNG/pngerror.c b/Source/LibPNG/pngerror.c deleted file mode 100644 index e0585a8..0000000 --- a/Source/LibPNG/pngerror.c +++ /dev/null @@ -1,685 +0,0 @@ - -/* pngerror.c - stub functions for i/o and memory allocation - * - * Last changed in libpng 1.5.8 [February 1, 2011] - * Copyright (c) 1998-2011 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_structp png_ptr, - png_const_charp error_message)),PNG_NORETURN); - -#ifdef PNG_WARNINGS_SUPPORTED -static void /* PRIVATE */ -png_default_warning PNGARG((png_structp png_ptr, - png_const_charp warning_message)); -#endif /* PNG_WARNINGS_SUPPORTED */ - -/* 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_structp 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)) - { - 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) - { - 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) - { - msg[0] = '0'; - msg[1] = '\0'; - error_message = msg; - } - } - } - } -#endif - if (png_ptr != NULL && png_ptr->error_fn != NULL) - (*(png_ptr->error_fn))(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_structp 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_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 /* PNG_ERROR_TEXT_SUPPORTED */ - -/* 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 || number % 10 != 0) - { - *--end = digits[number % 10]; - output = 1; - } - number /= 10; - break; - - case PNG_NUMBER_FORMAT_02u: - /* Expects at least 2 digits. */ - mincount = 2; - /* fall through */ - - 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; - /* fall through */ - - 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) if (count == 5) if (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) - *--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_structp 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)) -#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_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_structp 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 /* PNG_WARNINGS_SUPPORTED */ - -#ifdef PNG_BENIGN_ERRORS_SUPPORTED -void PNGAPI -png_benign_error(png_structp png_ptr, png_const_charp error_message) -{ - if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN) - png_warning(png_ptr, error_message); - else - png_error(png_ptr, error_message); -} -#endif - -/* 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, - * this 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' -}; - -#define PNG_MAX_ERROR_TEXT 64 -#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_ERROR_TEXT_SUPPORTED) -static void /* PRIVATE */ -png_format_buffer(png_structp 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)) - { - 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 /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */ - -#if defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED) -PNG_FUNCTION(void,PNGAPI -png_chunk_error,(png_structp 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 /* PNG_READ_SUPPORTED && PNG_ERROR_TEXT_SUPPORTED */ - -#ifdef PNG_WARNINGS_SUPPORTED -void PNGAPI -png_chunk_warning(png_structp 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 /* PNG_WARNINGS_SUPPORTED */ - -#ifdef PNG_READ_SUPPORTED -#ifdef PNG_BENIGN_ERRORS_SUPPORTED -void PNGAPI -png_chunk_benign_error(png_structp png_ptr, png_const_charp error_message) -{ - if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN) - png_chunk_warning(png_ptr, error_message); - - else - png_chunk_error(png_ptr, error_message); -} -#endif -#endif /* PNG_READ_SUPPORTED */ - -#ifdef PNG_ERROR_TEXT_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED -PNG_FUNCTION(void, -png_fixed_error,(png_structp png_ptr, png_const_charp name),PNG_NORETURN) -{ -# define fixed_message "fixed point overflow in " -# define fixed_message_ln ((sizeof fixed_message)-1) - int iin; - char msg[fixed_message_ln+PNG_MAX_ERROR_TEXT]; - png_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_structp png_ptr, png_longjmp_ptr longjmp_fn, - size_t jmp_buf_size) -{ - if (png_ptr == NULL || jmp_buf_size != png_sizeof(jmp_buf)) - return NULL; - - png_ptr->longjmp_fn = longjmp_fn; - return &png_ptr->longjmp_buffer; -} -#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_structp 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_structp png_ptr, int val),PNG_NORETURN) -{ -#ifdef PNG_SETJMP_SUPPORTED - if (png_ptr && png_ptr->longjmp_fn) - { -# ifdef USE_FAR_KEYWORD - { - jmp_buf tmp_jmpbuf; - png_memcpy(tmp_jmpbuf, png_ptr->longjmp_buffer, png_sizeof(jmp_buf)); - png_ptr->longjmp_fn(tmp_jmpbuf, val); - } - -# else - png_ptr->longjmp_fn(png_ptr->longjmp_buffer, val); -# endif - } -#endif - /* Here if not setjmp support or if png_ptr is null. */ - 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_structp 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 /* PNG_WARNINGS_SUPPORTED */ - -/* 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->longjmp_buffer, 1) - */ -void PNGAPI -png_set_error_fn(png_structp 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_structp 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_structp 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 -#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/Source/LibPNG/pngget.c b/Source/LibPNG/pngget.c deleted file mode 100644 index 43400cd..0000000 --- a/Source/LibPNG/pngget.c +++ /dev/null @@ -1,1124 +0,0 @@ - -/* pngget.c - retrieval of values from info struct - * - * Last changed in libpng 1.5.7 [December 15, 2011] - * Copyright (c) 1998-2011 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_structp png_ptr, png_const_infop info_ptr, - png_uint_32 flag) -{ - if (png_ptr != NULL && info_ptr != NULL) - return(info_ptr->valid & flag); - - return(0); -} - -png_size_t PNGAPI -png_get_rowbytes(png_const_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - return info_ptr->height; - - return (0); -} - -png_byte PNGAPI -png_get_bit_depth(png_const_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop info_ptr) -{ -#ifdef PNG_pHYs_SUPPORTED - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) - { - 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); - } -#endif - - return (0); -} - -png_uint_32 PNGAPI -png_get_y_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr) -{ -#ifdef PNG_pHYs_SUPPORTED - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) - { - 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); - } -#endif - - return (0); -} - -png_uint_32 PNGAPI -png_get_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr) -{ -#ifdef PNG_pHYs_SUPPORTED - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) - { - 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); - } -#endif - - return (0); -} - -#ifdef PNG_FLOATING_POINT_SUPPORTED -float PNGAPI -png_get_pixel_aspect_ratio(png_const_structp png_ptr, png_const_infop info_ptr) -{ -#ifdef PNG_READ_pHYs_SUPPORTED - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) - { - 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)); - } -#endif - - return ((float)0.0); -} -#endif - -#ifdef PNG_FIXED_POINT_SUPPORTED -png_fixed_point PNGAPI -png_get_pixel_aspect_ratio_fixed(png_const_structp png_ptr, - png_const_infop info_ptr) -{ -#ifdef PNG_READ_pHYs_SUPPORTED - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs) - && 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)) - return res; - } -#endif - - return 0; -} -#endif - -png_int_32 PNGAPI -png_get_x_offset_microns(png_const_structp png_ptr, png_const_infop info_ptr) -{ -#ifdef PNG_oFFs_SUPPORTED - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) - { - 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); - } -#endif - - return (0); -} - -png_int_32 PNGAPI -png_get_y_offset_microns(png_const_structp png_ptr, png_const_infop info_ptr) -{ -#ifdef PNG_oFFs_SUPPORTED - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) - { - 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); - } -#endif - - return (0); -} - -png_int_32 PNGAPI -png_get_x_offset_pixels(png_const_structp png_ptr, png_const_infop info_ptr) -{ -#ifdef PNG_oFFs_SUPPORTED - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) - { - 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); - } -#endif - - return (0); -} - -png_int_32 PNGAPI -png_get_y_offset_pixels(png_const_structp png_ptr, png_const_infop info_ptr) -{ -#ifdef PNG_oFFs_SUPPORTED - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) - { - 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); - } -#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)) - return result; - - /* Overflow. */ - return 0; -#endif -} - -png_uint_32 PNGAPI -png_get_pixels_per_inch(png_const_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, png_int_32 microns) -{ - /* Convert from metres * 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_structp png_ptr, - png_const_infop 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_structp png_ptr, - png_const_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop 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_structp png_ptr, png_const_infop 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)) - { - 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 /* PNG_pHYs_SUPPORTED */ -#endif /* PNG_INCH_CONVERSIONS_SUPPORTED */ - -/* png_get_channels really belongs in here, too, but it's been around longer */ - -#endif /* PNG_EASY_ACCESS_SUPPORTED */ - -png_byte PNGAPI -png_get_channels(png_const_structp png_ptr, png_const_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - return(info_ptr->channels); - - return (0); -} - -png_const_bytep PNGAPI -png_get_signature(png_const_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - return(info_ptr->signature); - - return (NULL); -} - -#ifdef PNG_bKGD_SUPPORTED -png_uint_32 PNGAPI -png_get_bKGD(png_const_structp png_ptr, png_infop info_ptr, - png_color_16p *background) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD) - && 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 - */ -png_uint_32 PNGFAPI -png_get_cHRM_XYZ_fixed(png_structp png_ptr, png_const_infop 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->valid & PNG_INFO_cHRM)) - { - png_xy xy; - png_XYZ XYZ; - - png_debug1(1, "in %s retrieval function", "cHRM_XYZ"); - - xy.whitex = info_ptr->x_white; - xy.whitey = info_ptr->y_white; - xy.redx = info_ptr->x_red; - xy.redy = info_ptr->y_red; - xy.greenx = info_ptr->x_green; - xy.greeny = info_ptr->y_green; - xy.bluex = info_ptr->x_blue; - xy.bluey = info_ptr->y_blue; - - /* The *_checked function handles error reporting, so just return 0 if - * there is a failure here. - */ - if (png_XYZ_from_xy_checked(png_ptr, &XYZ, xy)) - { - if (int_red_X != NULL) - *int_red_X = XYZ.redX; - if (int_red_Y != NULL) - *int_red_Y = XYZ.redY; - if (int_red_Z != NULL) - *int_red_Z = XYZ.redZ; - if (int_green_X != NULL) - *int_green_X = XYZ.greenX; - if (int_green_Y != NULL) - *int_green_Y = XYZ.greenY; - if (int_green_Z != NULL) - *int_green_Z = XYZ.greenZ; - if (int_blue_X != NULL) - *int_blue_X = XYZ.blueX; - if (int_blue_Y != NULL) - *int_blue_Y = XYZ.blueY; - if (int_blue_Z != NULL) - *int_blue_Z = XYZ.blueZ; - - return (PNG_INFO_cHRM); - } - } - - return (0); -} - -# ifdef PNG_FLOATING_POINT_SUPPORTED -png_uint_32 PNGAPI -png_get_cHRM(png_const_structp png_ptr, png_const_infop 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) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)) - { - png_debug1(1, "in %s retrieval function", "cHRM"); - - if (white_x != NULL) - *white_x = png_float(png_ptr, info_ptr->x_white, "cHRM white X"); - if (white_y != NULL) - *white_y = png_float(png_ptr, info_ptr->y_white, "cHRM white Y"); - if (red_x != NULL) - *red_x = png_float(png_ptr, info_ptr->x_red, "cHRM red X"); - if (red_y != NULL) - *red_y = png_float(png_ptr, info_ptr->y_red, "cHRM red Y"); - if (green_x != NULL) - *green_x = png_float(png_ptr, info_ptr->x_green, "cHRM green X"); - if (green_y != NULL) - *green_y = png_float(png_ptr, info_ptr->y_green, "cHRM green Y"); - if (blue_x != NULL) - *blue_x = png_float(png_ptr, info_ptr->x_blue, "cHRM blue X"); - if (blue_y != NULL) - *blue_y = png_float(png_ptr, info_ptr->y_blue, "cHRM blue Y"); - return (PNG_INFO_cHRM); - } - - return (0); -} - -png_uint_32 PNGAPI -png_get_cHRM_XYZ(png_structp png_ptr, png_const_infop info_ptr, - double *red_X, double *red_Y, double *red_Z, double *green_X, - double *green_Y, double *green_Z, double *blue_X, double *blue_Y, - double *blue_Z) -{ - png_XYZ XYZ; - - if (png_get_cHRM_XYZ_fixed(png_ptr, info_ptr, - &XYZ.redX, &XYZ.redY, &XYZ.redZ, &XYZ.greenX, &XYZ.greenY, &XYZ.greenZ, - &XYZ.blueX, &XYZ.blueY, &XYZ.blueZ) & PNG_INFO_cHRM) - { - if (red_X != NULL) - *red_X = png_float(png_ptr, XYZ.redX, "cHRM red X"); - if (red_Y != NULL) - *red_Y = png_float(png_ptr, XYZ.redY, "cHRM red Y"); - if (red_Z != NULL) - *red_Z = png_float(png_ptr, XYZ.redZ, "cHRM red Z"); - if (green_X != NULL) - *green_X = png_float(png_ptr, XYZ.greenX, "cHRM green X"); - if (green_Y != NULL) - *green_Y = png_float(png_ptr, XYZ.greenY, "cHRM green Y"); - if (green_Z != NULL) - *green_Z = png_float(png_ptr, XYZ.greenZ, "cHRM green Z"); - if (blue_X != NULL) - *blue_X = png_float(png_ptr, XYZ.blueX, "cHRM blue X"); - if (blue_Y != NULL) - *blue_Y = png_float(png_ptr, XYZ.blueY, "cHRM blue Y"); - if (blue_Z != NULL) - *blue_Z = png_float(png_ptr, XYZ.blueZ, "cHRM blue Z"); - return (PNG_INFO_cHRM); - } - - return (0); -} -# endif - -# ifdef PNG_FIXED_POINT_SUPPORTED -png_uint_32 PNGAPI -png_get_cHRM_fixed(png_const_structp png_ptr, png_const_infop 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->valid & PNG_INFO_cHRM)) - { - if (white_x != NULL) - *white_x = info_ptr->x_white; - if (white_y != NULL) - *white_y = info_ptr->y_white; - if (red_x != NULL) - *red_x = info_ptr->x_red; - if (red_y != NULL) - *red_y = info_ptr->y_red; - if (green_x != NULL) - *green_x = info_ptr->x_green; - if (green_y != NULL) - *green_y = info_ptr->y_green; - if (blue_x != NULL) - *blue_x = info_ptr->x_blue; - if (blue_y != NULL) - *blue_y = info_ptr->y_blue; - return (PNG_INFO_cHRM); - } - - return (0); -} -# endif -#endif - -#ifdef PNG_gAMA_SUPPORTED -png_uint_32 PNGFAPI -png_get_gAMA_fixed(png_const_structp png_ptr, png_const_infop info_ptr, - png_fixed_point *file_gamma) -{ - png_debug1(1, "in %s retrieval function", "gAMA"); - - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) - && file_gamma != NULL) - { - *file_gamma = info_ptr->gamma; - return (PNG_INFO_gAMA); - } - - return (0); -} -# ifdef PNG_FLOATING_POINT_SUPPORTED -png_uint_32 PNGAPI -png_get_gAMA(png_const_structp png_ptr, png_const_infop info_ptr, - double *file_gamma) -{ - png_fixed_point igamma; - png_uint_32 ok = png_get_gAMA_fixed(png_ptr, info_ptr, &igamma); - - if (ok) - *file_gamma = png_float(png_ptr, igamma, "png_get_gAMA"); - - return ok; -} - -# endif -#endif - -#ifdef PNG_sRGB_SUPPORTED -png_uint_32 PNGAPI -png_get_sRGB(png_const_structp png_ptr, png_const_infop 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) - && file_srgb_intent != NULL) - { - *file_srgb_intent = (int)info_ptr->srgb_intent; - return (PNG_INFO_sRGB); - } - - return (0); -} -#endif - -#ifdef PNG_iCCP_SUPPORTED -png_uint_32 PNGAPI -png_get_iCCP(png_const_structp png_ptr, png_const_infop 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) - && name != NULL && compression_type != NULL && profile != NULL && - proflen != NULL) - { - *name = info_ptr->iccp_name; - *profile = info_ptr->iccp_profile; - /* Compression_type is a dummy so the API won't have to change - * if we introduce multiple compression types later. - */ - *proflen = info_ptr->iccp_proflen; - *compression_type = info_ptr->iccp_compression; - return (PNG_INFO_iCCP); - } - - return (0); -} -#endif - -#ifdef PNG_sPLT_SUPPORTED -png_uint_32 PNGAPI -png_get_sPLT(png_const_structp png_ptr, png_const_infop info_ptr, - png_sPLT_tpp spalettes) -{ - if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL) - { - *spalettes = info_ptr->splt_palettes; - return ((png_uint_32)info_ptr->splt_palettes_num); - } - - return (0); -} -#endif - -#ifdef PNG_hIST_SUPPORTED -png_uint_32 PNGAPI -png_get_hIST(png_const_structp png_ptr, png_const_infop 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) - && hist != NULL) - { - *hist = info_ptr->hist; - return (PNG_INFO_hIST); - } - - return (0); -} -#endif - -png_uint_32 PNGAPI -png_get_IHDR(png_structp png_ptr, png_infop 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 || width == NULL || - height == NULL || bit_depth == NULL || color_type == NULL) - return (0); - - *width = info_ptr->width; - *height = info_ptr->height; - *bit_depth = info_ptr->bit_depth; - *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_structp png_ptr, png_const_infop 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) - && 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_structp png_ptr, png_const_infop 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) - && 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 -# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED -png_uint_32 PNGAPI -png_get_sCAL_fixed(png_structp png_ptr, png_const_infop 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)) - { - *unit = info_ptr->scal_unit; - /*TODO: make this work without FP support */ - *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_structp png_ptr, png_const_infop info_ptr, - int *unit, double *width, double *height) -{ - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_sCAL)) - { - *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_structp png_ptr, png_const_infop info_ptr, - int *unit, png_charpp width, png_charpp height) -{ - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_sCAL)) - { - *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_structp png_ptr, png_const_infop 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)) - { - 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_structp png_ptr, png_const_infop 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) - && 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_structp png_ptr, png_infop 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) - && sig_bit != NULL) - { - *sig_bit = &(info_ptr->sig_bit); - return (PNG_INFO_sBIT); - } - - return (0); -} -#endif - -#ifdef PNG_TEXT_SUPPORTED -png_uint_32 PNGAPI -png_get_text(png_const_structp png_ptr, png_const_infop 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 ((png_uint_32)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_structp png_ptr, png_infop 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) - && 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_structp png_ptr, png_infop 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)) - { - 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_UNKNOWN_CHUNKS_SUPPORTED -int PNGAPI -png_get_unknown_chunks(png_const_structp png_ptr, png_const_infop 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_structp 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_structp png_ptr) -{ - return (png_ptr ? png_ptr->user_chunk_ptr : NULL); -} -#endif - -png_size_t PNGAPI -png_get_compression_buffer_size(png_const_structp png_ptr) -{ - return (png_ptr ? png_ptr->zbuf_size : 0); -} - -#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_structp png_ptr) -{ - return (png_ptr ? png_ptr->user_width_max : 0); -} - -png_uint_32 PNGAPI -png_get_user_height_max (png_const_structp 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_structp 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_structp png_ptr) -{ - return (png_ptr ? png_ptr->user_chunk_malloc_max : 0); -} -#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ - -/* These functions were added to libpng 1.4.0 */ -#ifdef PNG_IO_STATE_SUPPORTED -png_uint_32 PNGAPI -png_get_io_state (png_structp png_ptr) -{ - return png_ptr->io_state; -} - -png_uint_32 PNGAPI -png_get_io_chunk_type (png_const_structp png_ptr) -{ - return png_ptr->chunk_name; -} - -png_const_bytep PNGAPI -png_get_io_chunk_name (png_structp png_ptr) -{ - PNG_CSTRING_FROM_CHUNK(png_ptr->io_chunk_string, png_ptr->chunk_name); - return png_ptr->io_chunk_string; -} -#endif /* ?PNG_IO_STATE_SUPPORTED */ - -#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/Source/LibPNG/pnginfo.h b/Source/LibPNG/pnginfo.h deleted file mode 100644 index a33bfab..0000000 --- a/Source/LibPNG/pnginfo.h +++ /dev/null @@ -1,269 +0,0 @@ - -/* pnginfo.h - header file for PNG reference library - * - * Copyright (c) 1998-2011 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.) - * - * Last changed in libpng 1.5.0 [January 6, 2011] - * - * 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) */ - png_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 is informational only on read, and not used on writes. */ - 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 */ - png_byte signature[8]; /* magic bytes read by libpng from start of file */ - - /* 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_gAMA_SUPPORTED) - /* The gAMA chunk describes the gamma characteristics of the system - * on which the image was created, normally in the range [1.0, 2.5]. - * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. - */ - png_fixed_point gamma; -#endif - -#ifdef PNG_sRGB_SUPPORTED - /* GR-P, 0.96a */ - /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ - png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */ -#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 /* PNG_TEXT_SUPPORTED */ - -#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_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_cHRM_SUPPORTED - /* The cHRM chunk describes the CIE color characteristics of the monitor - * on which the PNG was created. This data allows the viewer to do gamut - * mapping of the input image to ensure that the viewer sees the same - * colors in the image as the creator. Values are in the range - * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. - */ - png_fixed_point x_white; - png_fixed_point y_white; - png_fixed_point x_red; - png_fixed_point y_red; - png_fixed_point x_green; - png_fixed_point y_green; - png_fixed_point x_blue; - png_fixed_point y_blue; -#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 */ - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ - defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) - /* Storage for unknown chunks that the library doesn't recognize. */ - png_unknown_chunkp unknown_chunks; - int unknown_chunks_num; -#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 */ - png_byte iccp_compression; /* Always zero */ -#endif - -#ifdef PNG_sPLT_SUPPORTED - /* Data on sPLT chunks (there may be more than one). */ - png_sPLT_tp splt_palettes; - png_uint_32 splt_palettes_num; -#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 corresponsing 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/Source/LibPNG/pnglibconf.h b/Source/LibPNG/pnglibconf.h deleted file mode 100644 index 8022a5a..0000000 --- a/Source/LibPNG/pnglibconf.h +++ /dev/null @@ -1,187 +0,0 @@ - -/* libpng STANDARD API DEFINITION */ - -/* pnglibconf.h - library build configuration */ - -/* libpng version 1.5.4 - last changed on June 22, 2011 */ - -/* Copyright (c) 1998-2011 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 */ -/* Derived from: scripts/pnglibconf.dfa */ -/* If you edit this file by hand you must obey the rules expressed in */ -/* pnglibconf.dfa with respect to the dependencies between the following */ -/* symbols. It is much better to generate a new file using */ -/* scripts/libpngconf.mak */ - -#ifndef PNGLCONF_H -#define PNGLCONF_H -/* settings */ -#define PNG_API_RULE 0 -#define PNG_CALLOC_SUPPORTED -#define PNG_COST_SHIFT 3 -#define PNG_DEFAULT_READ_MACROS 1 -#define PNG_GAMMA_THRESHOLD_FIXED 5000 -#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_sCAL_PRECISION 5 -#define PNG_USER_CHUNK_CACHE_MAX 0 -#define PNG_USER_CHUNK_MALLOC_MAX 0 -#define PNG_USER_HEIGHT_MAX 1000000 -#define PNG_USER_WIDTH_MAX 1000000 -#define PNG_WEIGHT_SHIFT 8 -#define PNG_ZBUF_SIZE 8192 -/* end of settings */ -/* options */ -#define PNG_16BIT_SUPPORTED -#define PNG_ALIGN_MEMORY_SUPPORTED -#define PNG_BENIGN_ERRORS_SUPPORTED -#define PNG_bKGD_SUPPORTED -#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED -#define PNG_CHECK_cHRM_SUPPORTED -#define PNG_cHRM_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_gAMA_SUPPORTED -#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED -#define PNG_hIST_SUPPORTED -#define PNG_iCCP_SUPPORTED -#define PNG_INCH_CONVERSIONS_SUPPORTED -#define PNG_INFO_IMAGE_SUPPORTED -#define PNG_IO_STATE_SUPPORTED -#define PNG_iTXt_SUPPORTED -#define PNG_MNG_FEATURES_SUPPORTED -#define PNG_oFFs_SUPPORTED -#define PNG_pCAL_SUPPORTED -#define PNG_pHYs_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_bKGD_SUPPORTED -#define PNG_READ_cHRM_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_gAMA_SUPPORTED -#define PNG_READ_GAMMA_SUPPORTED -#define PNG_READ_GRAY_TO_RGB_SUPPORTED -#define PNG_READ_hIST_SUPPORTED -#define PNG_READ_iCCP_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_iTXt_SUPPORTED -#define PNG_READ_oFFs_SUPPORTED -#define PNG_READ_OPT_PLTE_SUPPORTED -#define PNG_READ_PACK_SUPPORTED -#define PNG_READ_PACKSWAP_SUPPORTED -#define PNG_READ_pCAL_SUPPORTED -#define PNG_READ_pHYs_SUPPORTED -#define PNG_READ_QUANTIZE_SUPPORTED -#define PNG_READ_RGB_TO_GRAY_SUPPORTED -#define PNG_READ_sBIT_SUPPORTED -#define PNG_READ_SCALE_16_TO_8_SUPPORTED -#define PNG_READ_sCAL_SUPPORTED -#define PNG_READ_SHIFT_SUPPORTED -#define PNG_READ_sPLT_SUPPORTED -#define PNG_READ_sRGB_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_TEXT_SUPPORTED -#define PNG_READ_tIME_SUPPORTED -#define PNG_READ_TRANSFORMS_SUPPORTED -#define PNG_READ_tRNS_SUPPORTED -#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED -#define PNG_READ_USER_CHUNKS_SUPPORTED -#define PNG_READ_USER_TRANSFORM_SUPPORTED -#define PNG_READ_zTXt_SUPPORTED -#define PNG_SAVE_INT_32_SUPPORTED -#define PNG_sBIT_SUPPORTED -#define PNG_sCAL_SUPPORTED -#define PNG_SEQUENTIAL_READ_SUPPORTED -#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED -#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED -#define PNG_SETJMP_SUPPORTED -#define PNG_SET_USER_LIMITS_SUPPORTED -#define PNG_sPLT_SUPPORTED -#define PNG_sRGB_SUPPORTED -#define PNG_STDIO_SUPPORTED -#define PNG_tEXt_SUPPORTED -#define PNG_TEXT_SUPPORTED -#define PNG_TIME_RFC1123_SUPPORTED -#define PNG_tIME_SUPPORTED -#define PNG_tRNS_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_bKGD_SUPPORTED -#define PNG_WRITE_cHRM_SUPPORTED -#define PNG_WRITE_COMPRESSED_TEXT_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_gAMA_SUPPORTED -#define PNG_WRITE_hIST_SUPPORTED -#define PNG_WRITE_iCCP_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_iTXt_SUPPORTED -#define PNG_WRITE_oFFs_SUPPORTED -#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED -#define PNG_WRITE_PACK_SUPPORTED -#define PNG_WRITE_PACKSWAP_SUPPORTED -#define PNG_WRITE_pCAL_SUPPORTED -#define PNG_WRITE_pHYs_SUPPORTED -#define PNG_WRITE_sBIT_SUPPORTED -#define PNG_WRITE_sCAL_SUPPORTED -#define PNG_WRITE_SHIFT_SUPPORTED -#define PNG_WRITE_sPLT_SUPPORTED -#define PNG_WRITE_sRGB_SUPPORTED -#define PNG_WRITE_SUPPORTED -#define PNG_WRITE_SWAP_ALPHA_SUPPORTED -#define PNG_WRITE_SWAP_SUPPORTED -#define PNG_WRITE_tEXt_SUPPORTED -#define PNG_WRITE_TEXT_SUPPORTED -#define PNG_WRITE_tIME_SUPPORTED -#define PNG_WRITE_TRANSFORMS_SUPPORTED -#define PNG_WRITE_tRNS_SUPPORTED -#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED -#define PNG_WRITE_USER_TRANSFORM_SUPPORTED -#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED -#define PNG_WRITE_zTXt_SUPPORTED -#define PNG_zTXt_SUPPORTED -/* end of options */ -#endif /* PNGLCONF_H */ diff --git a/Source/LibPNG/pngmem.c b/Source/LibPNG/pngmem.c deleted file mode 100644 index f885533..0000000 --- a/Source/LibPNG/pngmem.c +++ /dev/null @@ -1,667 +0,0 @@ - -/* pngmem.c - stub functions for memory allocation - * - * Last changed in libpng 1.5.13 [September 27, 2012] - * Copyright (c) 1998-2012 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) - -/* Borland DOS special memory handler */ -#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) -/* If you change this, be sure to change the one in png.h also */ - -/* Allocate memory for a png_struct. The malloc and memset can be replaced - by a single call to calloc() if this is thought to improve performance. */ -PNG_FUNCTION(png_voidp /* PRIVATE */, -png_create_struct,(int type),PNG_ALLOCATED) -{ -# ifdef PNG_USER_MEM_SUPPORTED - return (png_create_struct_2(type, NULL, NULL)); -} - -/* Alternate version of png_create_struct, for use with user-defined malloc. */ -PNG_FUNCTION(png_voidp /* PRIVATE */, -png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr), - PNG_ALLOCATED) -{ -# endif /* PNG_USER_MEM_SUPPORTED */ - png_size_t size; - png_voidp struct_ptr; - - if (type == PNG_STRUCT_INFO) - size = png_sizeof(png_info); - - else if (type == PNG_STRUCT_PNG) - size = png_sizeof(png_struct); - - else - return (png_get_copyright(NULL)); - -# ifdef PNG_USER_MEM_SUPPORTED - if (malloc_fn != NULL) - { - png_struct dummy_struct; - png_memset(&dummy_struct, 0, sizeof dummy_struct); - dummy_struct.mem_ptr=mem_ptr; - struct_ptr = (*(malloc_fn))(&dummy_struct, (png_alloc_size_t)size); - } - - else -# endif /* PNG_USER_MEM_SUPPORTED */ - struct_ptr = (png_voidp)farmalloc(size); - if (struct_ptr != NULL) - png_memset(struct_ptr, 0, size); - - return (struct_ptr); -} - -/* Free memory allocated by a png_create_struct() call */ -void /* PRIVATE */ -png_destroy_struct(png_voidp struct_ptr) -{ -# ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2(struct_ptr, NULL, NULL); -} - -/* Free memory allocated by a png_create_struct() call */ -void /* PRIVATE */ -png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, - png_voidp mem_ptr) -{ -# endif - if (struct_ptr != NULL) - { -# ifdef PNG_USER_MEM_SUPPORTED - if (free_fn != NULL) - { - png_struct dummy_struct; - png_memset(&dummy_struct, 0, sizeof dummy_struct); - dummy_struct.mem_ptr=mem_ptr; - (*(free_fn))(&dummy_struct, struct_ptr); - return; - } - -# endif /* PNG_USER_MEM_SUPPORTED */ - farfree (struct_ptr); - } -} - -/* Allocate memory. For reasonable files, size should never exceed - * 64K. However, zlib may allocate more then 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. - * - * Borland seems to have a problem in DOS mode for exactly 64K. - * It gives you a segment with an offset of 8 (perhaps to store its - * memory stuff). zlib doesn't like this at all, so we have to - * detect and deal with it. This code should not be needed in - * Windows or OS/2 modes, and only in 16 bit mode. This code has - * been updated by Alexander Lehmann for version 0.89 to waste less - * memory. - * - * Note that we can't use png_size_t for the "size" declaration, - * since on some systems a png_size_t is a 16-bit quantity, and as a - * result, we would be truncating potentially larger memory requests - * (which should cause a fatal error) and introducing major problems. - */ -PNG_FUNCTION(png_voidp,PNGAPI -png_calloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) -{ - png_voidp ret; - - ret = (png_malloc(png_ptr, size)); - - if (ret != NULL) - png_memset(ret,0,(png_size_t)size); - - return (ret); -} - -PNG_FUNCTION(png_voidp,PNGAPI -png_malloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) -{ - png_voidp ret; - - if (png_ptr == NULL || size == 0) - return (NULL); - -# ifdef PNG_USER_MEM_SUPPORTED - if (png_ptr->malloc_fn != NULL) - ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, size)); - - else - ret = (png_malloc_default(png_ptr, size)); - - if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of memory"); - - return (ret); -} - -PNG_FUNCTION(png_voidp,PNGAPI -png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) -{ - png_voidp ret; -# endif /* PNG_USER_MEM_SUPPORTED */ - - if (png_ptr == NULL || size == 0) - return (NULL); - -# ifdef PNG_MAX_MALLOC_64K - if (size > (png_uint_32)65536L) - { - png_warning(png_ptr, "Cannot Allocate > 64K"); - ret = NULL; - } - - else -# endif - - if (size != (size_t)size) - ret = NULL; - - else if (size == (png_uint_32)65536L) - { - if (png_ptr->offset_table == NULL) - { - /* Try to see if we need to do any of this fancy stuff */ - ret = farmalloc(size); - if (ret == NULL || ((png_size_t)ret & 0xffff)) - { - int num_blocks; - png_uint_32 total_size; - png_bytep table; - int i, mem_level, window_bits; - png_byte huge * hptr; - int window_bits - - if (ret != NULL) - { - farfree(ret); - ret = NULL; - } - - window_bits = - png_ptr->zlib_window_bits >= png_ptr->zlib_text_window_bits ? - png_ptr->zlib_window_bits : png_ptr->zlib_text_window_bits; - - if (window_bits > 14) - num_blocks = (int)(1 << (window_bits - 14)); - - else - num_blocks = 1; - - mem_level = - png_ptr->zlib_mem_level >= png_ptr->zlib_text_mem_level ? - png_ptr->zlib_mem_level : png_ptr->zlib_text_mem_level; - - if (mem_level >= 7) - num_blocks += (int)(1 << (mem_level - 7)); - - else - num_blocks++; - - total_size = ((png_uint_32)65536L) * (png_uint_32)num_blocks+16; - - table = farmalloc(total_size); - - if (table == NULL) - { -# ifndef PNG_USER_MEM_SUPPORTED - if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out Of Memory"); /* Note "O", "M" */ - - else - png_warning(png_ptr, "Out Of Memory"); -# endif - return (NULL); - } - - if ((png_size_t)table & 0xfff0) - { -# ifndef PNG_USER_MEM_SUPPORTED - if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, - "Farmalloc didn't return normalized pointer"); - - else - png_warning(png_ptr, - "Farmalloc didn't return normalized pointer"); -# endif - return (NULL); - } - - png_ptr->offset_table = table; - png_ptr->offset_table_ptr = farmalloc(num_blocks * - png_sizeof(png_bytep)); - - if (png_ptr->offset_table_ptr == NULL) - { -# ifndef PNG_USER_MEM_SUPPORTED - if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out Of memory"); /* Note "O", "m" */ - - else - png_warning(png_ptr, "Out Of memory"); -# endif - return (NULL); - } - - hptr = (png_byte huge *)table; - if ((png_size_t)hptr & 0xf) - { - hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L); - hptr = hptr + 16L; /* "hptr += 16L" fails on Turbo C++ 3.0 */ - } - - for (i = 0; i < num_blocks; i++) - { - png_ptr->offset_table_ptr[i] = (png_bytep)hptr; - hptr = hptr + (png_uint_32)65536L; /* "+=" fails on TC++3.0 */ - } - - png_ptr->offset_table_number = num_blocks; - png_ptr->offset_table_count = 0; - png_ptr->offset_table_count_free = 0; - } - } - - if (png_ptr->offset_table_count >= png_ptr->offset_table_number) - { -# ifndef PNG_USER_MEM_SUPPORTED - if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of Memory"); /* Note "O" and "M" */ - - else - png_warning(png_ptr, "Out of Memory"); -# endif - return (NULL); - } - - ret = png_ptr->offset_table_ptr[png_ptr->offset_table_count++]; - } - - else - ret = farmalloc(size); - -# ifndef PNG_USER_MEM_SUPPORTED - if (ret == NULL) - { - if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of memory"); /* Note "o" and "m" */ - - else - png_warning(png_ptr, "Out of memory"); /* Note "o" and "m" */ - } -# endif - - return (ret); -} - -/* Free a pointer allocated by png_malloc(). In the default - * configuration, png_ptr is not used, but is passed in case it - * is needed. If ptr is NULL, return without taking any action. - */ -void PNGAPI -png_free(png_structp 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_ptr, ptr); - return; - } - - else - png_free_default(png_ptr, ptr); -} - -void PNGAPI -png_free_default(png_structp png_ptr, png_voidp ptr) -{ -# endif /* PNG_USER_MEM_SUPPORTED */ - - if (png_ptr == NULL || ptr == NULL) - return; - - if (png_ptr->offset_table != NULL) - { - int i; - - for (i = 0; i < png_ptr->offset_table_count; i++) - { - if (ptr == png_ptr->offset_table_ptr[i]) - { - ptr = NULL; - png_ptr->offset_table_count_free++; - break; - } - } - if (png_ptr->offset_table_count_free == png_ptr->offset_table_count) - { - farfree(png_ptr->offset_table); - farfree(png_ptr->offset_table_ptr); - png_ptr->offset_table = NULL; - png_ptr->offset_table_ptr = NULL; - } - } - - if (ptr != NULL) - farfree(ptr); -} - -#else /* Not the Borland DOS special memory handler */ - -/* Allocate memory for a png_struct or a png_info. The malloc and - memset can be replaced by a single call to calloc() if this is thought - to improve performance noticably. */ -PNG_FUNCTION(png_voidp /* PRIVATE */, -png_create_struct,(int type),PNG_ALLOCATED) -{ -# ifdef PNG_USER_MEM_SUPPORTED - return (png_create_struct_2(type, NULL, NULL)); -} - -/* Allocate memory for a png_struct or a png_info. The malloc and - memset can be replaced by a single call to calloc() if this is thought - to improve performance noticably. */ -PNG_FUNCTION(png_voidp /* PRIVATE */, -png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr), - PNG_ALLOCATED) -{ -# endif /* PNG_USER_MEM_SUPPORTED */ - png_size_t size; - png_voidp struct_ptr; - - if (type == PNG_STRUCT_INFO) - size = png_sizeof(png_info); - - else if (type == PNG_STRUCT_PNG) - size = png_sizeof(png_struct); - - else - return (NULL); - -# ifdef PNG_USER_MEM_SUPPORTED - if (malloc_fn != NULL) - { - png_struct dummy_struct; - png_structp png_ptr = &dummy_struct; - png_ptr->mem_ptr=mem_ptr; - struct_ptr = (*(malloc_fn))(png_ptr, size); - - if (struct_ptr != NULL) - png_memset(struct_ptr, 0, size); - - return (struct_ptr); - } -# endif /* PNG_USER_MEM_SUPPORTED */ - -# if defined(__TURBOC__) && !defined(__FLAT__) - struct_ptr = (png_voidp)farmalloc(size); -# else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - struct_ptr = (png_voidp)halloc(size, 1); -# else - struct_ptr = (png_voidp)malloc(size); -# endif -# endif - - if (struct_ptr != NULL) - png_memset(struct_ptr, 0, size); - - return (struct_ptr); -} - - -/* Free memory allocated by a png_create_struct() call */ -void /* PRIVATE */ -png_destroy_struct(png_voidp struct_ptr) -{ -# ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2(struct_ptr, NULL, NULL); -} - -/* Free memory allocated by a png_create_struct() call */ -void /* PRIVATE */ -png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, - png_voidp mem_ptr) -{ -# endif /* PNG_USER_MEM_SUPPORTED */ - if (struct_ptr != NULL) - { -# ifdef PNG_USER_MEM_SUPPORTED - if (free_fn != NULL) - { - png_struct dummy_struct; - png_structp png_ptr = &dummy_struct; - png_ptr->mem_ptr=mem_ptr; - (*(free_fn))(png_ptr, struct_ptr); - return; - } -# endif /* PNG_USER_MEM_SUPPORTED */ -# if defined(__TURBOC__) && !defined(__FLAT__) - farfree(struct_ptr); - -# else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - hfree(struct_ptr); - -# else - free(struct_ptr); - -# endif -# endif - } -} - -/* Allocate memory. For reasonable files, size should never exceed - * 64K. However, zlib may allocate more then 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_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) -{ - png_voidp ret; - - ret = (png_malloc(png_ptr, size)); - - if (ret != NULL) - png_memset(ret,0,(png_size_t)size); - - return (ret); -} - -PNG_FUNCTION(png_voidp,PNGAPI -png_malloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) -{ - png_voidp ret; - -# ifdef PNG_USER_MEM_SUPPORTED - if (png_ptr == NULL || size == 0) - return (NULL); - - if (png_ptr->malloc_fn != NULL) - ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size)); - - else - ret = (png_malloc_default(png_ptr, size)); - - if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of Memory"); - - return (ret); -} - -PNG_FUNCTION(png_voidp,PNGAPI -png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) -{ - png_voidp ret; -# endif /* PNG_USER_MEM_SUPPORTED */ - - if (png_ptr == NULL || size == 0) - return (NULL); - -# ifdef PNG_MAX_MALLOC_64K - if (size > (png_uint_32)65536L) - { -# ifndef PNG_USER_MEM_SUPPORTED - if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Cannot Allocate > 64K"); - - else -# endif - return NULL; - } -# endif - - /* Check for overflow */ -# if defined(__TURBOC__) && !defined(__FLAT__) - - if (size != (unsigned long)size) - ret = NULL; - - else - ret = farmalloc(size); - -# else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - if (size != (unsigned long)size) - ret = NULL; - - else - ret = halloc(size, 1); - -# else - if (size != (size_t)size) - ret = NULL; - - else - ret = malloc((size_t)size); -# endif -# endif - -# ifndef PNG_USER_MEM_SUPPORTED - if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of Memory"); -# endif - - return (ret); -} - -/* Free a pointer allocated by png_malloc(). If ptr is NULL, return - * without taking any action. - */ -void PNGAPI -png_free(png_structp 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_ptr, ptr); - return; - } - - else - png_free_default(png_ptr, ptr); -} - -void PNGAPI -png_free_default(png_structp png_ptr, png_voidp ptr) -{ - if (png_ptr == NULL || ptr == NULL) - return; - -# endif /* PNG_USER_MEM_SUPPORTED */ - -# if defined(__TURBOC__) && !defined(__FLAT__) - farfree(ptr); - -# else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - hfree(ptr); - -# else - free(ptr); - -# endif -# endif -} -#endif /* Not Borland DOS special memory handler */ - -/* This function was added at libpng version 1.2.3. The png_malloc_warn() - * function will set up png_malloc() to 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_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) -{ - png_voidp ptr; - png_uint_32 save_flags; - if (png_ptr == NULL) - return (NULL); - - save_flags = png_ptr->flags; - png_ptr->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK; - ptr = (png_voidp)png_malloc((png_structp)png_ptr, size); - png_ptr->flags=save_flags; - return(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_structp 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_structp png_ptr) -{ - if (png_ptr == NULL) - return (NULL); - - return ((png_voidp)png_ptr->mem_ptr); -} -#endif /* PNG_USER_MEM_SUPPORTED */ -#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/Source/LibPNG/pngpread.c b/Source/LibPNG/pngpread.c deleted file mode 100644 index 6b65ba8..0000000 --- a/Source/LibPNG/pngpread.c +++ /dev/null @@ -1,1315 +0,0 @@ - -/* pngpread.c - read a png file in push mode - * - * Last changed in libpng 1.5.11 [June 14, 2012] - * Copyright (c) 1998-2012 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_SKIP_MODE 3 -#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 - -void PNGAPI -png_process_data(png_structp png_ptr, png_infop info_ptr, - png_bytep buffer, png_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); - } -} - -png_size_t PNGAPI -png_process_data_pause(png_structp 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) - png_push_save_buffer(png_ptr); - else - { - /* This includes any pending saved bytes: */ - png_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_structp png_ptr) -{ - png_uint_32 remaining = 0; - - if (png_ptr != NULL && png_ptr->process_mode == PNG_SKIP_MODE && - png_ptr->skip_length > 0) - { - /* At the end of png_process_data the buffer size must be 0 (see the loop - * above) so we can detect a broken call here: - */ - if (png_ptr->buffer_size != 0) - png_error(png_ptr, - "png_process_data_skip called inside png_process_data"); - - /* If is impossible for there to be a saved buffer at this point - - * otherwise we could not be in SKIP mode. This will also happen if - * png_process_skip is called inside png_process_data (but only very - * rarely.) - */ - if (png_ptr->save_buffer_size != 0) - png_error(png_ptr, "png_process_data_skip called with saved data"); - - remaining = png_ptr->skip_length; - png_ptr->skip_length = 0; - png_ptr->process_mode = PNG_READ_CHUNK_MODE; - } - - return remaining; -} - -/* 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_structp png_ptr, png_infop 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; - } - - case PNG_SKIP_MODE: - { - png_push_crc_finish(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_structp png_ptr, png_infop info_ptr) -{ - png_size_t num_checked = png_ptr->sig_bytes, - 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_structp png_ptr, png_infop info_ptr) -{ - png_uint_32 chunk_name; - - /* 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)) - { - png_byte chunk_length[4]; - png_byte chunk_tag[4]; - - if (png_ptr->buffer_size < 8) - { - png_push_save_buffer(png_ptr); - return; - } - - 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_ptr->mode |= PNG_HAVE_CHUNK_HEADER; - } - - chunk_name = png_ptr->chunk_name; - - if (chunk_name == png_IDAT) - { - /* This is here above the if/else case statement below because if the - * unknown handling marks 'IDAT' as unknown then the IDAT handling case is - * completely skipped. - * - * TODO: there must be a better way of doing this. - */ - if (png_ptr->mode & PNG_AFTER_IDAT) - png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT; - } - - if (chunk_name == png_IHDR) - { - if (png_ptr->push_length != 13) - png_error(png_ptr, "Invalid IHDR length"); - - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_IHDR(png_ptr, info_ptr, png_ptr->push_length); - } - - else if (chunk_name == png_IEND) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - 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 (png_chunk_unknown_handling(png_ptr, chunk_name)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - if (chunk_name == png_IDAT) - png_ptr->mode |= PNG_HAVE_IDAT; - - png_handle_unknown(png_ptr, info_ptr, png_ptr->push_length); - - if (chunk_name == png_PLTE) - png_ptr->mode |= PNG_HAVE_PLTE; - - else if (chunk_name == png_IDAT) - { - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before IDAT"); - - else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) - png_error(png_ptr, "Missing PLTE before IDAT"); - } - } -#endif - - else if (chunk_name == png_PLTE) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_PLTE(png_ptr, info_ptr, png_ptr->push_length); - } - - else if (chunk_name == png_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)) - png_error(png_ptr, "Missing IHDR before IDAT"); - - else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) - png_error(png_ptr, "Missing PLTE before IDAT"); - - if (png_ptr->mode & PNG_HAVE_IDAT) - { - if (!(png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT)) - if (png_ptr->push_length == 0) - return; - - if (png_ptr->mode & PNG_AFTER_IDAT) - png_benign_error(png_ptr, "Too many IDATs found"); - } - - png_ptr->idat_size = png_ptr->push_length; - png_ptr->mode |= PNG_HAVE_IDAT; - 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) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - 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) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - 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) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_cHRM(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_sRGB_SUPPORTED - else if (chunk_name == png_sRGB) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - 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) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_iCCP(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_sPLT_SUPPORTED - else if (chunk_name == png_sPLT) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_sPLT(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_tRNS_SUPPORTED - else if (chunk_name == png_tRNS) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_tRNS(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_bKGD_SUPPORTED - else if (chunk_name == png_bKGD) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_bKGD(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_hIST_SUPPORTED - else if (chunk_name == png_hIST) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_hIST(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_pHYs_SUPPORTED - else if (chunk_name == png_pHYs) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_pHYs(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_oFFs_SUPPORTED - else if (chunk_name == png_oFFs) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_oFFs(png_ptr, info_ptr, png_ptr->push_length); - } -#endif - -#ifdef PNG_READ_pCAL_SUPPORTED - else if (chunk_name == png_pCAL) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_pCAL(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_sCAL_SUPPORTED - else if (chunk_name == png_sCAL) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_sCAL(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_tIME_SUPPORTED - else if (chunk_name == png_tIME) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_tIME(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_tEXt_SUPPORTED - else if (chunk_name == png_tEXt) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_tEXt(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_zTXt_SUPPORTED - else if (chunk_name == png_zTXt) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_zTXt(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_iTXt_SUPPORTED - else if (chunk_name == png_iTXt) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif - - else - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_unknown(png_ptr, info_ptr, png_ptr->push_length); - } - - png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; -} - -void /* PRIVATE */ -png_push_crc_skip(png_structp png_ptr, png_uint_32 skip) -{ - png_ptr->process_mode = PNG_SKIP_MODE; - png_ptr->skip_length = skip; -} - -void /* PRIVATE */ -png_push_crc_finish(png_structp png_ptr) -{ - if (png_ptr->skip_length && png_ptr->save_buffer_size) - { - png_size_t save_size = png_ptr->save_buffer_size; - png_uint_32 skip_length = png_ptr->skip_length; - - /* We want the smaller of 'skip_length' and 'save_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 or 64 bit platforms. - */ - if (skip_length < save_size) - save_size = (png_size_t)skip_length; - - else - skip_length = (png_uint_32)save_size; - - png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size); - - png_ptr->skip_length -= skip_length; - png_ptr->buffer_size -= save_size; - png_ptr->save_buffer_size -= save_size; - png_ptr->save_buffer_ptr += save_size; - } - - if (png_ptr->skip_length && png_ptr->current_buffer_size) - { - png_size_t save_size = png_ptr->current_buffer_size; - png_uint_32 skip_length = png_ptr->skip_length; - - /* We want the smaller of 'skip_length' and 'current_buffer_size', here, - * the same problem exists as above and the same solution. - */ - if (skip_length < save_size) - save_size = (png_size_t)skip_length; - - else - skip_length = (png_uint_32)save_size; - - png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size); - - png_ptr->skip_length -= skip_length; - png_ptr->buffer_size -= save_size; - png_ptr->current_buffer_size -= save_size; - png_ptr->current_buffer_ptr += save_size; - } - - if (!png_ptr->skip_length) - { - if (png_ptr->buffer_size < 4) - { - png_push_save_buffer(png_ptr); - return; - } - - png_crc_finish(png_ptr, 0); - png_ptr->process_mode = PNG_READ_CHUNK_MODE; - } -} - -void PNGCBAPI -png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length) -{ - png_bytep ptr; - - if (png_ptr == NULL) - return; - - ptr = buffer; - - if (png_ptr->save_buffer_size) - { - png_size_t save_size; - - if (length < png_ptr->save_buffer_size) - save_size = length; - - else - save_size = png_ptr->save_buffer_size; - - png_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 && png_ptr->current_buffer_size) - { - png_size_t save_size; - - if (length < png_ptr->current_buffer_size) - save_size = length; - - else - save_size = png_ptr->current_buffer_size; - - png_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_structp png_ptr) -{ - if (png_ptr->save_buffer_size) - { - if (png_ptr->save_buffer_ptr != png_ptr->save_buffer) - { - png_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) - { - png_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, new_max); - - if (png_ptr->save_buffer == NULL) - { - png_free(png_ptr, old_buffer); - png_error(png_ptr, "Insufficient memory for save_buffer"); - } - - png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size); - png_free(png_ptr, old_buffer); - png_ptr->save_buffer_max = new_max; - } - - if (png_ptr->current_buffer_size) - { - png_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_structp png_ptr, png_bytep buffer, - png_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_structp png_ptr) -{ - if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER)) - { - png_byte chunk_length[4]; - png_byte chunk_tag[4]; - - /* TODO: this code can be commoned up with the same code in push_read */ - if (png_ptr->buffer_size < 8) - { - png_push_save_buffer(png_ptr); - return; - } - - 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_ZLIB_FINISHED)) - png_error(png_ptr, "Not enough compressed data"); - - return; - } - - png_ptr->idat_size = png_ptr->push_length; - } - - if (png_ptr->idat_size && png_ptr->save_buffer_size) - { - png_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 or 64 bit platforms. - */ - if (idat_size < save_size) - save_size = (png_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 && png_ptr->current_buffer_size) - { - png_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 = (png_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) - { - if (png_ptr->buffer_size < 4) - { - png_push_save_buffer(png_ptr); - return; - } - - png_crc_finish(png_ptr, 0); - png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; - png_ptr->mode |= PNG_AFTER_IDAT; - } -} - -void /* PRIVATE */ -png_process_IDAT_data(png_structp png_ptr, png_bytep buffer, - png_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; - 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_ZLIB_FINISHED)) - { - 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)) - { - 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 = inflate(&png_ptr->zstream, 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_ZLIB_FINISHED; - - /* 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 - 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_ZLIB_FINISHED; - - /* 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_ZLIB_FINISHED; - } - - /* 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_structp 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: - */ - png_memcpy(png_ptr->prev_row, png_ptr->row_buf, row_info.rowbytes + 1); - -#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, "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 - /* Blow up interlaced rows to full size */ - if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) - { - 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_structp 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 FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; - - /* Offset to next interlace block */ - static PNG_CONST png_byte FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; - - /* Start of interlace block in the y direction */ - static PNG_CONST png_byte FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1}; - - /* Offset to next interlace block in the y direction */ - static PNG_CONST png_byte FARDATA 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 FARDATA 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) - { - png_ptr->row_number = 0; - png_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) - 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 /* PNG_READ_INTERLACING_SUPPORTED */ -} - -void /* PRIVATE */ -png_push_have_info(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr->info_fn != NULL) - (*(png_ptr->info_fn))(png_ptr, info_ptr); -} - -void /* PRIVATE */ -png_push_have_end(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr->end_fn != NULL) - (*(png_ptr->end_fn))(png_ptr, info_ptr); -} - -void /* PRIVATE */ -png_push_have_row(png_structp 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_structp 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/*display*/); -} -#endif /* PNG_READ_INTERLACING_SUPPORTED */ - -void PNGAPI -png_set_progressive_read_fn(png_structp 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_structp png_ptr) -{ - if (png_ptr == NULL) - return (NULL); - - return png_ptr->io_ptr; -} -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ diff --git a/Source/LibPNG/pngpriv.h b/Source/LibPNG/pngpriv.h deleted file mode 100644 index dd35e52..0000000 --- a/Source/LibPNG/pngpriv.h +++ /dev/null @@ -1,1675 +0,0 @@ - -/* pngpriv.h - private declarations for use inside libpng - * - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2012 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.) - * - * Last changed in libpng 1.5.10 [March 29, 2012] - * - * 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 PNG_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.) - */ -#define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */ - -/* This is required for the definition of abort(), used as a last ditch - * error handler when all else fails. - */ -#include - -/* This is used to find 'offsetof', used below for alignment tests. */ -#include - -#define PNGLIB_BUILD /*libpng is being built, not used*/ - -#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 - -/* 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 - -#include "png.h" -#include "pnginfo.h" -#include "pngstruct.h" - -/* pngconf.h does not set PNG_DLL_EXPORT unless it is required, so: */ -#ifndef PNG_DLL_EXPORT -# define PNG_DLL_EXPORT -#endif - -/* SECURITY and SAFETY: - * - * By default libpng is built without any internal limits on image size, - * individual heap (png_malloc) allocations or the total amount of memory used. - * If PNG_SAFE_LIMITS_SUPPORTED is defined, however, the limits below are used - * (unless individually overridden). These limits are believed to be fairly - * safe, but builders of secure systems should verify the values against the - * real system capabilities. - */ - -#ifdef PNG_SAFE_LIMITS_SUPPORTED - /* 'safe' limits */ -# ifndef PNG_USER_WIDTH_MAX -# define PNG_USER_WIDTH_MAX 1000000 -# endif -# ifndef PNG_USER_HEIGHT_MAX -# define PNG_USER_HEIGHT_MAX 1000000 -# endif -# ifndef PNG_USER_CHUNK_CACHE_MAX -# define PNG_USER_CHUNK_CACHE_MAX 128 -# endif -# ifndef PNG_USER_CHUNK_MALLOC_MAX -# define PNG_USER_CHUNK_MALLOC_MAX 8000000 -# endif -#else - /* values for no limits */ -# ifndef PNG_USER_WIDTH_MAX -# define PNG_USER_WIDTH_MAX 0x7fffffff -# endif -# ifndef PNG_USER_HEIGHT_MAX -# define PNG_USER_HEIGHT_MAX 0x7fffffff -# endif -# ifndef PNG_USER_CHUNK_CACHE_MAX -# define PNG_USER_CHUNK_CACHE_MAX 0 -# endif -# ifndef PNG_USER_CHUNK_MALLOC_MAX -# define PNG_USER_CHUNK_MALLOC_MAX 0 -# endif -#endif - -/* This is used for 16 bit gamma tables - only the top level pointers are const, - * this could be changed: - */ -typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; - -/* Added at libpng-1.2.9 */ -/* Moved to pngpriv.h at libpng-1.5.0 */ - -/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure" - * script. We may need it here to get the correct configuration on things - * like limits. - */ -#ifdef PNG_CONFIGURE_LIBPNG -# ifdef HAVE_CONFIG_H -# include "config.h" -# endif -#endif - -/* Moved to pngpriv.h at libpng-1.5.0 */ -/* NOTE: some of these may have been used in external applications as - * these definitions were exposed in pngconf.h prior to 1.5. - */ - -/* 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 - -/* PNG_STATIC is used to mark internal file scope functions if they need to be - * accessed for implementation tests (see the code in tests/?*). - */ -#ifndef PNG_STATIC -# define PNG_STATIC static -#endif - -/* C99 restrict is used where possible, to do this 'restrict' is defined as - * empty if we can't be sure it is supported. configure builds have already - * done this work. - */ -#ifdef PNG_CONFIGURE_LIBPNG -# define PNG_RESTRICT restrict -#else - /* Modern compilers support restrict, but assume not for anything not - * recognized here: - */ -# if defined __GNUC__ || defined _MSC_VER || defined __WATCOMC__ -# define PNG_RESTRICT restrict -# else -# define PNG_RESTRICT -# endif -#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(s1,s2) ((void)(s1)) -# define png_chunk_warning(s1,s2) ((void)(s1)) -# 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_error(s1,s2) png_err(s1) -# define png_chunk_error(s1,s2) png_err(s1) -# define png_fixed_error(s1,s2) png_err(s1) -#endif - -/* 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) -#else -# define png_voidcast(type, value) (value) -#endif /* __cplusplus */ - -#ifndef PNG_EXTERN -/* The functions exported by PNG_EXTERN are internal functions, which - * aren't usually used outside the library (as far as I know), so it is - * debatable if they should be exported at all. In the future, when it - * is possible to have run-time registry of chunk-handling functions, - * some of these might be made available again. - * - * 1.5.7: turned the use of 'extern' back on, since it is localized to pngpriv.h - * it should be safe now (it is unclear why it was turned off.) - */ -# define PNG_EXTERN extern -#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 - -/* Other defines specific to compilers can go here. Try to keep - * them inside an appropriate ifdef/endif pair for portability. - */ -#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 - -/* 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 - -#ifdef USE_FAR_KEYWORD -/* Use this to make far-to-near assignments */ -# define CHECK 1 -# define NOCHECK 0 -# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK)) -# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK)) -# define png_strlen _fstrlen -# define png_memcmp _fmemcmp /* SJT: added */ -# define png_memcpy _fmemcpy -# define png_memset _fmemset -#else -# ifdef _WINDOWS_ /* Favor Windows over C runtime fns */ -# define CVT_PTR(ptr) (ptr) -# define CVT_PTR_NOCHECK(ptr) (ptr) -# define png_strlen lstrlenA -# define png_memcmp memcmp -# define png_memcpy CopyMemory -# define png_memset memset -# else -# define CVT_PTR(ptr) (ptr) -# define CVT_PTR_NOCHECK(ptr) (ptr) -# define png_strlen strlen -# define png_memcmp memcmp /* SJT: added */ -# define png_memcpy memcpy -# define png_memset memset -# 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_TO_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)\ - ((((const char*)ptr-(const char*)0) & (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 0x01 (defined in png.h) */ -/* #define PNG_HAVE_PLTE 0x02 (defined in png.h) */ -#define PNG_HAVE_IDAT 0x04 -/* #define PNG_AFTER_IDAT 0x08 (defined in png.h) */ -#define PNG_HAVE_IEND 0x10 -#define PNG_HAVE_gAMA 0x20 -#define PNG_HAVE_cHRM 0x40 -#define PNG_HAVE_sRGB 0x80 -#define PNG_HAVE_CHUNK_HEADER 0x100 -#define PNG_WROTE_tIME 0x200 -#define PNG_WROTE_INFO_BEFORE_PLTE 0x400 -#define PNG_BACKGROUND_IS_GRAY 0x800 -#define PNG_HAVE_PNG_SIGNATURE 0x1000 -#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */ -#define PNG_HAVE_iCCP 0x4000 - -/* Flags for the transformations the PNG library does on the image data */ -#define PNG_BGR 0x0001 -#define PNG_INTERLACE 0x0002 -#define PNG_PACK 0x0004 -#define PNG_SHIFT 0x0008 -#define PNG_SWAP_BYTES 0x0010 -#define PNG_INVERT_MONO 0x0020 -#define PNG_QUANTIZE 0x0040 -#define PNG_COMPOSE 0x0080 /* Was PNG_BACKGROUND */ -#define PNG_BACKGROUND_EXPAND 0x0100 -#define PNG_EXPAND_16 0x0200 /* Added to libpng 1.5.2 */ -#define PNG_16_TO_8 0x0400 /* Becomes 'chop' in 1.5.4 */ -#define PNG_RGBA 0x0800 -#define PNG_EXPAND 0x1000 -#define PNG_GAMMA 0x2000 -#define PNG_GRAY_TO_RGB 0x4000 -#define PNG_FILLER 0x8000 -#define PNG_PACKSWAP 0x10000 -#define PNG_SWAP_ALPHA 0x20000 -#define PNG_STRIP_ALPHA 0x40000 -#define PNG_INVERT_ALPHA 0x80000 -#define PNG_USER_TRANSFORM 0x100000 -#define PNG_RGB_TO_GRAY_ERR 0x200000 -#define PNG_RGB_TO_GRAY_WARN 0x400000 -#define PNG_RGB_TO_GRAY 0x600000 /* two bits, RGB_TO_GRAY_ERR|WARN */ -#define PNG_ENCODE_ALPHA 0x800000 /* Added to libpng-1.5.4 */ -#define PNG_ADD_ALPHA 0x1000000 /* Added to libpng-1.2.7 */ -#define PNG_EXPAND_tRNS 0x2000000 /* Added to libpng-1.2.9 */ -#define PNG_SCALE_16_TO_8 0x4000000 /* Added to libpng-1.5.4 */ - /* 0x8000000 unused */ - /* 0x10000000 unused */ - /* 0x20000000 unused */ - /* 0x40000000 unused */ -/* Flags for png_create_struct */ -#define PNG_STRUCT_PNG 0x0001 -#define PNG_STRUCT_INFO 0x0002 - -/* Scaling factor for filter heuristic weighting calculations */ -#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT)) -#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT)) - -/* Flags for the png_ptr->flags rather than declaring a byte for each one */ -#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001 -#define PNG_FLAG_ZLIB_CUSTOM_LEVEL 0x0002 -#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL 0x0004 -#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS 0x0008 -#define PNG_FLAG_ZLIB_CUSTOM_METHOD 0x0010 -#define PNG_FLAG_ZLIB_FINISHED 0x0020 -#define PNG_FLAG_ROW_INIT 0x0040 -#define PNG_FLAG_FILLER_AFTER 0x0080 -#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100 -#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200 -#define PNG_FLAG_CRC_CRITICAL_USE 0x0400 -#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800 -#define PNG_FLAG_ASSUME_sRGB 0x1000 /* Added to libpng-1.5.4 */ -#define PNG_FLAG_OPTIMIZE_ALPHA 0x2000 /* Added to libpng-1.5.4 */ -#define PNG_FLAG_DETECT_UNINITIALIZED 0x4000 /* Added to libpng-1.5.4 */ -#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000 -#define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000 -#define PNG_FLAG_LIBRARY_MISMATCH 0x20000 -#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000 -#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000 -#define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000 - /* 0x200000 unused */ - /* 0x400000 unused */ -#define PNG_FLAG_BENIGN_ERRORS_WARN 0x800000 /* Added to libpng-1.4.0 */ -#define PNG_FLAG_ZTXT_CUSTOM_STRATEGY 0x1000000 /* 5 lines added */ -#define PNG_FLAG_ZTXT_CUSTOM_LEVEL 0x2000000 /* to libpng-1.5.4 */ -#define PNG_FLAG_ZTXT_CUSTOM_MEM_LEVEL 0x4000000 -#define PNG_FLAG_ZTXT_CUSTOM_WINDOW_BITS 0x8000000 -#define PNG_FLAG_ZTXT_CUSTOM_METHOD 0x10000000 - /* 0x20000000 unused */ - /* 0x40000000 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) - -/* 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 - * maximuum for png_size_t. The value can be overriden 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 - -/* 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.2.6 JB */ -#define PNG_ROWBYTES(pixel_bits, width) \ - ((pixel_bits) >= 8 ? \ - ((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \ - (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) ) - -/* 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)) -#else -PNG_EXTERN png_fixed_point png_fixed PNGARG((png_structp png_ptr, double fp, - png_const_charp text)); -#endif -#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_CHUNK(b1,b2,b3,b4) \ - (PNG_32b(b1,24) | PNG_32b(b2,16) | PNG_32b(b3,8) | PNG_32b(b4,0)) - -#define png_IHDR PNG_CHUNK( 73, 72, 68, 82) -#define png_IDAT PNG_CHUNK( 73, 68, 65, 84) -#define png_IEND PNG_CHUNK( 73, 69, 78, 68) -#define png_PLTE PNG_CHUNK( 80, 76, 84, 69) -#define png_bKGD PNG_CHUNK( 98, 75, 71, 68) -#define png_cHRM PNG_CHUNK( 99, 72, 82, 77) -#define png_gAMA PNG_CHUNK(103, 65, 77, 65) -#define png_hIST PNG_CHUNK(104, 73, 83, 84) -#define png_iCCP PNG_CHUNK(105, 67, 67, 80) -#define png_iTXt PNG_CHUNK(105, 84, 88, 116) -#define png_oFFs PNG_CHUNK(111, 70, 70, 115) -#define png_pCAL PNG_CHUNK(112, 67, 65, 76) -#define png_sCAL PNG_CHUNK(115, 67, 65, 76) -#define png_pHYs PNG_CHUNK(112, 72, 89, 115) -#define png_sBIT PNG_CHUNK(115, 66, 73, 84) -#define png_sPLT PNG_CHUNK(115, 80, 76, 84) -#define png_sRGB PNG_CHUNK(115, 82, 71, 66) -#define png_sTER PNG_CHUNK(115, 84, 69, 82) -#define png_tEXt PNG_CHUNK(116, 69, 88, 116) -#define png_tIME PNG_CHUNK(116, 73, 77, 69) -#define png_tRNS PNG_CHUNK(116, 82, 78, 83) -#define png_zTXt PNG_CHUNK(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_CHUNK(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), ((char*)(s))[1]=(char)((c)>>16),\ - ((char*)(s))[2]=(char)((c)>>8), ((char*)(s))[3]=(char)((c))) - -/* 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_ANCILLIARY(c) (1 & ((c) >> 29)) -#define PNG_CHUNK_CRITICAL(c) (!PNG_CHUNK_ANCILLIARY(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 - - -/* Inhibit C++ name-mangling for libpng functions but not for system calls. */ -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* These functions are used internally in the code. They generally - * shouldn't be used unless you are writing code to add or replace some - * functionality in libpng. More information about most functions can - * be found in the files where the functions are located. - */ - -/* Check the user version string for compatibility, returns false if the version - * numbers aren't compatible. - */ -PNG_EXTERN int png_user_version_check(png_structp png_ptr, - png_const_charp user_png_ver); - -/* Allocate memory for an internal libpng struct */ -PNG_EXTERN PNG_FUNCTION(png_voidp,png_create_struct,PNGARG((int type)), - PNG_ALLOCATED); - -/* Free memory from internal libpng struct */ -PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)); - -PNG_EXTERN PNG_FUNCTION(png_voidp,png_create_struct_2, - PNGARG((int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)), - PNG_ALLOCATED); -PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr, - png_free_ptr free_fn, png_voidp mem_ptr)); - -/* Free any memory that info_ptr points to and reset struct. */ -PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -/* Function to allocate memory for zlib. PNGAPI is disallowed. */ -PNG_EXTERN PNG_FUNCTION(voidpf,png_zalloc,PNGARG((voidpf png_ptr, uInt items, - uInt size)),PNG_ALLOCATED); - -/* Function to free memory for zlib. PNGAPI is disallowed. */ -PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)); - -/* 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_EXTERN void PNGCBAPI png_default_read_data PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); - -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -PNG_EXTERN void PNGCBAPI png_push_fill_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t length)); -#endif - -PNG_EXTERN void PNGCBAPI png_default_write_data PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); - -#ifdef PNG_WRITE_FLUSH_SUPPORTED -# ifdef PNG_STDIO_SUPPORTED -PNG_EXTERN void PNGCBAPI png_default_flush PNGARG((png_structp png_ptr)); -# endif -#endif - -/* Reset the CRC variable */ -PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)); - -/* Write the "data" buffer to whatever output you are using */ -PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, - png_const_bytep data, png_size_t length)); - -/* Read and check the PNG file signature */ -PNG_EXTERN void png_read_sig PNGARG((png_structp png_ptr, png_infop info_ptr)); - -/* Read the chunk header (length + type name) */ -PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr)); - -/* Read data from whatever input you are using into the "data" buffer */ -PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); - -/* Read bytes into buf, and update png_ptr->crc */ -PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf, - png_size_t length)); - -/* Decompress data in a chunk that uses compression */ -#if defined(PNG_READ_COMPRESSED_TEXT_SUPPORTED) -PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr, - int comp_type, png_size_t chunklength, png_size_t prefix_length, - png_size_t *data_length)); -#endif - -/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ -PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip)); - -/* Read the CRC from the file and compare it to the libpng calculated CRC */ -PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)); - -/* 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_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, - png_const_bytep ptr, png_size_t length)); - -#ifdef PNG_WRITE_FLUSH_SUPPORTED -PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)); -#endif - -/* Write various chunks */ - -/* Write the IHDR chunk, and update the png_struct with the necessary - * information. - */ -PNG_EXTERN void png_write_IHDR PNGARG((png_structp 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_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, - png_const_colorp palette, png_uint_32 num_pal)); - -PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); - -PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)); - -#ifdef PNG_WRITE_gAMA_SUPPORTED -# ifdef PNG_FLOATING_POINT_SUPPORTED -PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)); -# endif -# ifdef PNG_FIXED_POINT_SUPPORTED -PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, - png_fixed_point file_gamma)); -# endif -#endif - -#ifdef PNG_WRITE_sBIT_SUPPORTED -PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, - png_const_color_8p sbit, int color_type)); -#endif - -#ifdef PNG_WRITE_cHRM_SUPPORTED -# ifdef PNG_FLOATING_POINT_SUPPORTED -PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_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)); -# endif -PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_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)); -#endif - -#ifdef PNG_WRITE_sRGB_SUPPORTED -PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr, - int intent)); -#endif - -#ifdef PNG_WRITE_iCCP_SUPPORTED -PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr, - png_const_charp name, int compression_type, - png_const_charp profile, int proflen)); - /* Note to maintainer: profile should be png_bytep */ -#endif - -#ifdef PNG_WRITE_sPLT_SUPPORTED -PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr, - png_const_sPLT_tp palette)); -#endif - -#ifdef PNG_WRITE_tRNS_SUPPORTED -PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, - png_const_bytep trans, png_const_color_16p values, int number, - int color_type)); -#endif - -#ifdef PNG_WRITE_bKGD_SUPPORTED -PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr, - png_const_color_16p values, int color_type)); -#endif - -#ifdef PNG_WRITE_hIST_SUPPORTED -PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, - png_const_uint_16p hist, int num_hist)); -#endif - -/* Chunks that have keywords */ -#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ - defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) -PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr, - png_const_charp key, png_charpp new_key)); -#endif - -#ifdef PNG_WRITE_tEXt_SUPPORTED -PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_const_charp key, - png_const_charp text, png_size_t text_len)); -#endif - -#ifdef PNG_WRITE_zTXt_SUPPORTED -PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_const_charp key, - png_const_charp text, png_size_t text_len, int compression)); -#endif - -#ifdef PNG_WRITE_iTXt_SUPPORTED -PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr, - int compression, png_const_charp key, png_const_charp lang, - png_const_charp lang_key, png_const_charp text)); -#endif - -#ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */ -PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr, - png_infop info_ptr, png_const_textp text_ptr, int num_text)); -#endif - -#ifdef PNG_WRITE_oFFs_SUPPORTED -PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr, - png_int_32 x_offset, png_int_32 y_offset, int unit_type)); -#endif - -#ifdef PNG_WRITE_pCAL_SUPPORTED -PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose, - png_int_32 X0, png_int_32 X1, int type, int nparams, - png_const_charp units, png_charpp params)); -#endif - -#ifdef PNG_WRITE_pHYs_SUPPORTED -PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr, - png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, - int unit_type)); -#endif - -#ifdef PNG_WRITE_tIME_SUPPORTED -PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr, - png_const_timep mod_time)); -#endif - -#ifdef PNG_WRITE_sCAL_SUPPORTED -PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr, - int unit, png_const_charp width, png_const_charp height)); -#endif - -/* Called when finished processing a row of data */ -PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)); - -/* Internal use only. Called before first row of data */ -PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)); - -/* 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 png_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_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row, - int display)); - -#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_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info, - png_bytep row, int pass, png_uint_32 transformations)); -#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_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info, - png_bytep row, int pass)); -#endif - -/* Unfilter a row: check the filter value before calling this, there is no point - * calling it for PNG_FILTER_VALUE_NONE. - */ -PNG_EXTERN void png_read_filter_row PNGARG((png_structp pp, png_row_infop - row_info, png_bytep row, png_const_bytep prev_row, int filter)); - -PNG_EXTERN void png_read_filter_row_up_neon PNGARG((png_row_infop row_info, - png_bytep row, png_const_bytep prev_row)); -PNG_EXTERN void png_read_filter_row_sub3_neon PNGARG((png_row_infop row_info, - png_bytep row, png_const_bytep prev_row)); -PNG_EXTERN void png_read_filter_row_sub4_neon PNGARG((png_row_infop row_info, - png_bytep row, png_const_bytep prev_row)); -PNG_EXTERN void png_read_filter_row_avg3_neon PNGARG((png_row_infop row_info, - png_bytep row, png_const_bytep prev_row)); -PNG_EXTERN void png_read_filter_row_avg4_neon PNGARG((png_row_infop row_info, - png_bytep row, png_const_bytep prev_row)); -PNG_EXTERN void png_read_filter_row_paeth3_neon PNGARG((png_row_infop row_info, - png_bytep row, png_const_bytep prev_row)); -PNG_EXTERN void png_read_filter_row_paeth4_neon PNGARG((png_row_infop row_info, - png_bytep row, png_const_bytep prev_row)); - -/* Choose the best filter to use and filter the row data */ -PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr, - png_row_infop row_info)); - -/* Finish a row while reading, dealing with interlacing passes, etc. */ -PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); - -/* Initialize the row buffers, etc. */ -PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)); - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -/* Optional call to update the users info structure */ -PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, - png_infop info_ptr)); -#endif - -/* These are the functions that do the transformations */ -#ifdef PNG_READ_FILLER_SUPPORTED -PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 filler, png_uint_32 flags)); -#endif - -#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED -PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED -PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED -PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED -PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ - defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_strip_channel PNGARG((png_row_infop row_info, - png_bytep row, int at_start)); -#endif - -#ifdef PNG_16BIT_SUPPORTED -#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, - png_bytep row)); -#endif -#endif - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ - defined(PNG_WRITE_PACKSWAP_SUPPORTED) -PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED -PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, - png_row_infop row_info, png_bytep row)); -#endif - -#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED -PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#ifdef PNG_READ_PACK_SUPPORTED -PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#ifdef PNG_READ_SHIFT_SUPPORTED -PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, - png_bytep row, png_const_color_8p sig_bits)); -#endif - -#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) -PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED -PNG_EXTERN void png_do_scale_16_to_8 PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED -PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#ifdef PNG_READ_QUANTIZE_SUPPORTED -PNG_EXTERN void png_do_quantize PNGARG((png_row_infop row_info, - png_bytep row, png_const_bytep palette_lookup, - png_const_bytep quantize_lookup)); - -# ifdef PNG_CORRECT_PALETTE_SUPPORTED -PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, - png_colorp palette, int num_palette)); -# endif -#endif - -#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) -PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#ifdef PNG_WRITE_PACK_SUPPORTED -PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 bit_depth)); -#endif - -#ifdef PNG_WRITE_SHIFT_SUPPORTED -PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, - png_bytep row, png_const_color_8p bit_depth)); -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ - defined(PNG_READ_ALPHA_MODE_SUPPORTED) -PNG_EXTERN void png_do_compose PNGARG((png_row_infop row_info, - png_bytep row, png_structp png_ptr)); -#endif - -#ifdef PNG_READ_GAMMA_SUPPORTED -PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, - png_bytep row, png_structp png_ptr)); -#endif - -#ifdef PNG_READ_ALPHA_MODE_SUPPORTED -PNG_EXTERN void png_do_encode_alpha PNGARG((png_row_infop row_info, - png_bytep row, png_structp png_ptr)); -#endif - -#ifdef PNG_READ_EXPAND_SUPPORTED -PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info, - png_bytep row, png_const_colorp palette, png_const_bytep trans, - int num_trans)); -PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, - png_bytep row, png_const_color_16p trans_color)); -#endif - -#ifdef PNG_READ_EXPAND_16_SUPPORTED -PNG_EXTERN void png_do_expand_16 PNGARG((png_row_infop row_info, - png_bytep row)); -#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_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); - -#ifdef PNG_READ_bKGD_SUPPORTED -PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_cHRM_SUPPORTED -PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_gAMA_SUPPORTED -PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_hIST_SUPPORTED -PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_iCCP_SUPPORTED -PNG_EXTERN void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif /* PNG_READ_iCCP_SUPPORTED */ - -#ifdef PNG_READ_iTXt_SUPPORTED -PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_oFFs_SUPPORTED -PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_pCAL_SUPPORTED -PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_pHYs_SUPPORTED -PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_sBIT_SUPPORTED -PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_sCAL_SUPPORTED -PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_sPLT_SUPPORTED -PNG_EXTERN void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif /* PNG_READ_sPLT_SUPPORTED */ - -#ifdef PNG_READ_sRGB_SUPPORTED -PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_tEXt_SUPPORTED -PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_tIME_SUPPORTED -PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_tRNS_SUPPORTED -PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#ifdef PNG_READ_zTXt_SUPPORTED -PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); - -PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, - png_uint_32 chunk_name)); - -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED -/* Exactly as png_handle_as_unknown() except that the argument is a 32-bit chunk - * name, not a string. - */ -PNG_EXTERN int png_chunk_unknown_handling PNGARG((png_structp png_ptr, - png_uint_32 chunk_name)); -#endif - -/* Handle the transformations for reading and writing */ -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr, - png_row_infop row_info)); -#endif -#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED -PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr, - png_row_infop row_info)); -#endif - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr)); -#endif - -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr, - png_uint_32 length)); -PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)); -PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)); -PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row)); -PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr)); -# ifdef PNG_READ_tEXt_SUPPORTED -PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -# endif -# ifdef PNG_READ_zTXt_SUPPORTED -PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -# endif -# ifdef PNG_READ_iTXt_SUPPORTED -PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -# endif - -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ - -#ifdef PNG_MNG_FEATURES_SUPPORTED -PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info, - png_bytep row)); -PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -/* Added at libpng version 1.4.0 */ -#ifdef PNG_CHECK_cHRM_SUPPORTED -PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_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)); -#endif - -#ifdef PNG_CHECK_cHRM_SUPPORTED -/* Added at libpng version 1.2.34 and 1.4.0 */ -/* Currently only used by png_check_cHRM_fixed */ -PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2, - unsigned long *hi_product, unsigned long *lo_product)); -#endif - -#ifdef PNG_cHRM_SUPPORTED -/* Added at libpng version 1.5.5 */ -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; - -typedef struct png_XYZ -{ - png_fixed_point redX, redY, redZ; - png_fixed_point greenX, greenY, greenZ; - png_fixed_point blueX, blueY, blueZ; -} png_XYZ; - -/* The conversion APIs return 0 on success, non-zero on a parameter error. They - * allow conversion between the above representations of a color encoding. When - * converting from XYZ end points to chromaticities the absolute magnitude of - * the end points is lost, when converting back the sum of the Y values of the - * three end points will be 1.0 - */ -PNG_EXTERN int png_xy_from_XYZ PNGARG((png_xy *xy, png_XYZ XYZ)); -PNG_EXTERN int png_XYZ_from_xy PNGARG((png_XYZ *XYZ, png_xy xy)); -PNG_EXTERN int png_XYZ_from_xy_checked PNGARG((png_structp png_ptr, - png_XYZ *XYZ, png_xy xy)); -#endif - -/* Added at libpng version 1.4.0 */ -PNG_EXTERN void png_check_IHDR PNGARG((png_structp 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)); - -/* 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_EXTERN void png_do_check_palette_indexes PNGARG((png_structp png_ptr, - png_row_infop row_info)); -#endif - -/* Free all memory used by the read (old method - NOT DLL EXPORTED) */ -PNG_EXTERN void png_read_destroy PNGARG((png_structp png_ptr, - png_infop info_ptr, png_infop end_info_ptr)); - -/* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */ -PNG_EXTERN void png_write_destroy PNGARG((png_structp png_ptr)); - -#ifdef USE_FAR_KEYWORD /* memory model conversion function */ -PNG_EXTERN void *png_far_to_near PNGARG((png_structp png_ptr, png_voidp ptr, - int check)); -#endif /* USE_FAR_KEYWORD */ - -#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED) -PNG_EXTERN PNG_FUNCTION(void, png_fixed_error, (png_structp 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_EXTERN size_t png_safecat(png_charp buffer, size_t bufsize, size_t pos, - png_const_charp string); - -/* 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_EXTERN png_charp png_format_number(png_const_charp start, png_charp end, - int format, png_alloc_size_t number); - -/* 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 - -/* 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_EXTERN void png_warning_parameter(png_warning_parameters p, int number, - png_const_charp string); - /* Parameters are limited in size to PNG_WARNING_PARAMETER_SIZE characters, - * including the trailing '\0'. - */ -PNG_EXTERN void png_warning_parameter_unsigned(png_warning_parameters p, - int number, int format, png_alloc_size_t value); - /* 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_EXTERN void png_warning_parameter_signed(png_warning_parameters p, - int number, int format, png_int_32 value); - -PNG_EXTERN void png_formatted_warning(png_structp png_ptr, - png_warning_parameters p, png_const_charp message); - /* 'message' follows the X/Open approach of using @1, @2 to insert - * parameters previously supplied using the above functions. Errors in - * specifying the paramters will simple result in garbage substitutions. - */ -#endif - -/* ASCII to FP interfaces, currently only implemented if sCAL - * support is required. - */ -#if defined(PNG_READ_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 assumpitions about the - * maximum ridiculous exponent. - */ -#define PNG_sCAL_MAX_DIGITS (PNG_sCAL_PRECISION+1/*.*/+1/*E*/+10/*exponent*/) - -#ifdef PNG_FLOATING_POINT_SUPPORTED -PNG_EXTERN void png_ascii_from_fp PNGARG((png_structp png_ptr, png_charp ascii, - png_size_t size, double fp, unsigned int precision)); -#endif /* FLOATING_POINT */ - -#ifdef PNG_FIXED_POINT_SUPPORTED -PNG_EXTERN void png_ascii_from_fixed PNGARG((png_structp png_ptr, - png_charp ascii, png_size_t size, png_fixed_point fp)); -#endif /* FIXED_POINT */ -#endif /* READ_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 numb1.ers 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 initialzed 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+ 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_EXTERN int png_check_fp_number PNGARG((png_const_charp string, - png_size_t size, int *statep, png_size_tp whereami)); - -/* 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_EXTERN int png_check_fp_string PNGARG((png_const_charp string, - png_size_t size)); -#endif /* pCAL || sCAL */ - -#if defined(PNG_READ_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_EXTERN int png_muldiv PNGARG((png_fixed_point_p res, png_fixed_point a, - png_int_32 multiplied_by, png_int_32 divided_by)); -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED) -/* Same deal, but issue a warning on overflow and return 0. */ -PNG_EXTERN png_fixed_point png_muldiv_warn PNGARG((png_structp png_ptr, - png_fixed_point a, png_int_32 multiplied_by, png_int_32 divided_by)); -#endif - -#ifdef PNG_READ_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_EXTERN png_fixed_point png_reciprocal PNGARG((png_fixed_point a)); - -/* 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. - */ -PNG_EXTERN png_fixed_point png_reciprocal2 PNGARG((png_fixed_point a, - png_fixed_point b)); -#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_EXTERN png_uint_16 png_gamma_correct PNGARG((png_structp png_ptr, - unsigned int value, png_fixed_point gamma_value)); -PNG_EXTERN int png_gamma_significant PNGARG((png_fixed_point gamma_value)); -PNG_EXTERN png_uint_16 png_gamma_16bit_correct PNGARG((unsigned int value, - png_fixed_point gamma_value)); -PNG_EXTERN png_byte png_gamma_8bit_correct PNGARG((unsigned int value, - png_fixed_point gamma_value)); -PNG_EXTERN void png_destroy_gamma_table(png_structp png_ptr); -PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr, - int bit_depth)); -#endif - -/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ - -#include "pngdebug.h" - -#ifdef __cplusplus -} -#endif - -#endif /* PNGPRIV_H */ diff --git a/Source/LibPNG/pngread.c b/Source/LibPNG/pngread.c deleted file mode 100644 index 1d8c6b3..0000000 --- a/Source/LibPNG/pngread.c +++ /dev/null @@ -1,1305 +0,0 @@ - -/* pngread.c - read a PNG file - * - * Last changed in libpng 1.5.10 [March 8, 2012] - * Copyright (c) 1998-2012 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" - -#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) -{ - -#ifdef PNG_USER_MEM_SUPPORTED - 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) -{ -#endif /* PNG_USER_MEM_SUPPORTED */ - -#ifdef PNG_SETJMP_SUPPORTED - volatile -#endif - png_structp png_ptr; - volatile int png_cleanup_needed = 0; - -#ifdef PNG_SETJMP_SUPPORTED -#ifdef USE_FAR_KEYWORD - jmp_buf tmp_jmpbuf; -#endif -#endif - - png_debug(1, "in png_create_read_struct"); - -#ifdef PNG_USER_MEM_SUPPORTED - png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG, - malloc_fn, mem_ptr); -#else - png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); -#endif - if (png_ptr == NULL) - return (NULL); - - /* Added at libpng-1.2.6 */ -#ifdef PNG_USER_LIMITS_SUPPORTED - png_ptr->user_width_max = PNG_USER_WIDTH_MAX; - png_ptr->user_height_max = PNG_USER_HEIGHT_MAX; - - /* Added at libpng-1.2.43 and 1.4.0 */ - png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX; - - /* Added at libpng-1.2.43 and 1.4.1 */ - png_ptr->user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX; -#endif - -#ifdef PNG_SETJMP_SUPPORTED -/* Applications that neglect to set up their own setjmp() and then - * encounter a png_error() will longjmp here. Since the jmpbuf is - * then meaningless we abort instead of returning. - */ -#ifdef USE_FAR_KEYWORD - if (setjmp(tmp_jmpbuf)) -#else - if (setjmp(png_jmpbuf(png_ptr))) /* Sets longjmp to match setjmp */ -#endif - PNG_ABORT(); -#ifdef USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(png_ptr), tmp_jmpbuf, png_sizeof(jmp_buf)); -#endif -#endif /* PNG_SETJMP_SUPPORTED */ - -#ifdef PNG_USER_MEM_SUPPORTED - png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn); -#endif - - png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); - - /* Call the general version checker (shared with read and write code): */ - if (!png_user_version_check(png_ptr, user_png_ver)) - png_cleanup_needed = 1; - - if (!png_cleanup_needed) - { - /* Initialize zbuf - compression buffer */ - png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr, png_ptr->zbuf_size); - - if (png_ptr->zbuf == NULL) - png_cleanup_needed = 1; - } - - png_ptr->zstream.zalloc = png_zalloc; - png_ptr->zstream.zfree = png_zfree; - png_ptr->zstream.opaque = (voidpf)png_ptr; - - if (!png_cleanup_needed) - { - switch (inflateInit(&png_ptr->zstream)) - { - case Z_OK: - break; /* Do nothing */ - - case Z_MEM_ERROR: - png_warning(png_ptr, "zlib memory error"); - png_cleanup_needed = 1; - break; - - case Z_STREAM_ERROR: - png_warning(png_ptr, "zlib stream error"); - png_cleanup_needed = 1; - break; - - case Z_VERSION_ERROR: - png_warning(png_ptr, "zlib version error"); - png_cleanup_needed = 1; - break; - - default: png_warning(png_ptr, "Unknown zlib error"); - png_cleanup_needed = 1; - } - } - - if (png_cleanup_needed) - { - /* Clean up PNG structure and deallocate any memory. */ - png_free(png_ptr, png_ptr->zbuf); - png_ptr->zbuf = NULL; -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)png_ptr, - (png_free_ptr)free_fn, (png_voidp)mem_ptr); -#else - png_destroy_struct((png_voidp)png_ptr); -#endif - return (NULL); - } - - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - - 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_structp png_ptr, png_infop info_ptr) -{ - 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; - - /* This should be a binary subdivision search or a hash for - * matching the chunk name rather than a linear search. - */ - if (chunk_name == png_IDAT) - if (png_ptr->mode & PNG_AFTER_IDAT) - png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT; - - 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 (png_chunk_unknown_handling(png_ptr, chunk_name) != - PNG_HANDLE_CHUNK_AS_DEFAULT) - { - if (chunk_name == png_IDAT) - png_ptr->mode |= PNG_HAVE_IDAT; - - png_handle_unknown(png_ptr, info_ptr, length); - - if (chunk_name == png_PLTE) - png_ptr->mode |= PNG_HAVE_PLTE; - - else if (chunk_name == png_IDAT) - { - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before IDAT"); - - else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) - png_error(png_ptr, "Missing PLTE before IDAT"); - - break; - } - } -#endif - else if (chunk_name == png_PLTE) - png_handle_PLTE(png_ptr, info_ptr, length); - - else if (chunk_name == png_IDAT) - { - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before IDAT"); - - else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) - png_error(png_ptr, "Missing PLTE before IDAT"); - - png_ptr->idat_size = length; - png_ptr->mode |= PNG_HAVE_IDAT; - 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_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); - } -} -#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ - -/* Optional call to update the users info_ptr structure */ -void PNGAPI -png_read_update_info(png_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_read_update_info"); - - if (png_ptr == NULL) - return; - - 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 -} - -#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_structp png_ptr) -{ - png_debug(1, "in png_start_read_image"); - - if (png_ptr != NULL) - png_read_start_row(png_ptr); -} -#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ - -#ifdef PNG_SEQUENTIAL_READ_SUPPORTED -void PNGAPI -png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) -{ - int ret; - - 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)) - 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); - - 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) - 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) - 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) - 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) - 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) - 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) - 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) - png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined"); -#endif - } - -#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 && (png_ptr->transformations & PNG_INTERLACE)) - { - 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)) - { - png_read_finish_row(png_ptr); - return; - } - break; - } - } -#endif - - if (!(png_ptr->mode & PNG_HAVE_IDAT)) - png_error(png_ptr, "Invalid attempt to read row data"); - - png_ptr->zstream.next_out = png_ptr->row_buf; - png_ptr->zstream.avail_out = - (uInt)(PNG_ROWBYTES(png_ptr->pixel_depth, - png_ptr->iwidth) + 1); - - do - { - if (!(png_ptr->zstream.avail_in)) - { - while (!png_ptr->idat_size) - { - png_crc_finish(png_ptr, 0); - - png_ptr->idat_size = png_read_chunk_header(png_ptr); - if (png_ptr->chunk_name != png_IDAT) - png_error(png_ptr, "Not enough image data"); - } - png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_in = png_ptr->zbuf; - if (png_ptr->zbuf_size > png_ptr->idat_size) - png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size; - png_crc_read(png_ptr, png_ptr->zbuf, - (png_size_t)png_ptr->zstream.avail_in); - png_ptr->idat_size -= png_ptr->zstream.avail_in; - } - - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - - if (ret == Z_STREAM_END) - { - if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in || - png_ptr->idat_size) - png_benign_error(png_ptr, "Extra compressed data"); - png_ptr->mode |= PNG_AFTER_IDAT; - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - break; - } - - if (ret != Z_OK) - png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg : - "Decompression error"); - - } while (png_ptr->zstream.avail_out); - - 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: - */ - png_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) && - (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 - /* Blow up interlaced rows to full size */ - if (png_ptr->interlaced && - (png_ptr->transformations & PNG_INTERLACE)) - { - 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 /* PNG_SEQUENTIAL_READ_SUPPORTED */ - -#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_structp 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 /* PNG_SEQUENTIAL_READ_SUPPORTED */ - -#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_structp 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)) - { - pass = png_set_interlace_handling(png_ptr); - /* And make sure transforms are initialized. */ - png_start_read_image(png_ptr); - } - else - { - if (png_ptr->interlaced && !(png_ptr->transformations & PNG_INTERLACE)) - { - /* 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 /* PNG_SEQUENTIAL_READ_SUPPORTED */ - -#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_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_read_end"); - - if (png_ptr == NULL) - return; - - png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */ - -#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_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 (png_chunk_unknown_handling(png_ptr, chunk_name) != - PNG_HANDLE_CHUNK_AS_DEFAULT) - { - if (chunk_name == png_IDAT) - { - if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT)) - png_benign_error(png_ptr, "Too many IDATs found"); - } - png_handle_unknown(png_ptr, info_ptr, length); - 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. - */ - if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT)) - 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_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); - } while (!(png_ptr->mode & PNG_HAVE_IEND)); -} -#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ - -/* 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_structp png_ptr = NULL; - png_infop info_ptr = NULL, end_info_ptr = NULL; -#ifdef PNG_USER_MEM_SUPPORTED - png_free_ptr free_fn = NULL; - png_voidp mem_ptr = NULL; -#endif - - png_debug(1, "in png_destroy_read_struct"); - - if (png_ptr_ptr != NULL) - png_ptr = *png_ptr_ptr; - if (png_ptr == NULL) - return; - -#ifdef PNG_USER_MEM_SUPPORTED - free_fn = png_ptr->free_fn; - mem_ptr = png_ptr->mem_ptr; -#endif - - if (info_ptr_ptr != NULL) - info_ptr = *info_ptr_ptr; - - if (end_info_ptr_ptr != NULL) - end_info_ptr = *end_info_ptr_ptr; - - png_read_destroy(png_ptr, info_ptr, end_info_ptr); - - if (info_ptr != NULL) - { -#ifdef PNG_TEXT_SUPPORTED - png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, -1); -#endif - -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn, - (png_voidp)mem_ptr); -#else - png_destroy_struct((png_voidp)info_ptr); -#endif - *info_ptr_ptr = NULL; - } - - if (end_info_ptr != NULL) - { -#ifdef PNG_READ_TEXT_SUPPORTED - png_free_data(png_ptr, end_info_ptr, PNG_FREE_TEXT, -1); -#endif -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)end_info_ptr, (png_free_ptr)free_fn, - (png_voidp)mem_ptr); -#else - png_destroy_struct((png_voidp)end_info_ptr); -#endif - *end_info_ptr_ptr = NULL; - } - - if (png_ptr != NULL) - { -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn, - (png_voidp)mem_ptr); -#else - png_destroy_struct((png_voidp)png_ptr); -#endif - *png_ptr_ptr = NULL; - } -} - -/* Free all memory used by the read (old method) */ -void /* PRIVATE */ -png_read_destroy(png_structp png_ptr, png_infop info_ptr, - png_infop end_info_ptr) -{ -#ifdef PNG_SETJMP_SUPPORTED - jmp_buf tmp_jmp; -#endif - png_error_ptr error_fn; -#ifdef PNG_WARNINGS_SUPPORTED - png_error_ptr warning_fn; -#endif - png_voidp error_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - png_free_ptr free_fn; -#endif - - png_debug(1, "in png_read_destroy"); - - if (info_ptr != NULL) - png_info_destroy(png_ptr, info_ptr); - - if (end_info_ptr != NULL) - png_info_destroy(png_ptr, end_info_ptr); - -#ifdef PNG_READ_GAMMA_SUPPORTED - png_destroy_gamma_table(png_ptr); -#endif - - png_free(png_ptr, png_ptr->zbuf); - png_free(png_ptr, png_ptr->big_row_buf); - png_free(png_ptr, png_ptr->big_prev_row); - png_free(png_ptr, png_ptr->chunkdata); - -#ifdef PNG_READ_QUANTIZE_SUPPORTED - png_free(png_ptr, png_ptr->palette_lookup); - png_free(png_ptr, png_ptr->quantize_index); -#endif - - if (png_ptr->free_me & PNG_FREE_PLTE) - png_zfree(png_ptr, png_ptr->palette); - 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) - png_free(png_ptr, png_ptr->trans_alpha); - png_ptr->free_me &= ~PNG_FREE_TRNS; -#endif - -#ifdef PNG_READ_hIST_SUPPORTED - if (png_ptr->free_me & PNG_FREE_HIST) - png_free(png_ptr, png_ptr->hist); - png_ptr->free_me &= ~PNG_FREE_HIST; -#endif - - inflateEnd(&png_ptr->zstream); - -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED - png_free(png_ptr, png_ptr->save_buffer); -#endif - - /* Save the important info out of the png_struct, in case it is - * being used again. - */ -#ifdef PNG_SETJMP_SUPPORTED - png_memcpy(tmp_jmp, png_ptr->longjmp_buffer, png_sizeof(jmp_buf)); -#endif - - error_fn = png_ptr->error_fn; -#ifdef PNG_WARNINGS_SUPPORTED - warning_fn = png_ptr->warning_fn; -#endif - error_ptr = png_ptr->error_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - free_fn = png_ptr->free_fn; -#endif - - png_memset(png_ptr, 0, png_sizeof(png_struct)); - - png_ptr->error_fn = error_fn; -#ifdef PNG_WARNINGS_SUPPORTED - png_ptr->warning_fn = warning_fn; -#endif - png_ptr->error_ptr = error_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - png_ptr->free_fn = free_fn; -#endif - -#ifdef PNG_SETJMP_SUPPORTED - png_memcpy(png_ptr->longjmp_buffer, tmp_jmp, png_sizeof(jmp_buf)); -#endif - -} - -void PNGAPI -png_set_read_status_fn(png_structp 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_structp png_ptr, png_infop info_ptr, - int transforms, - voidp params) -{ - int row; - - 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/png_sizeof(png_bytep)) - png_error(png_ptr, "Image is too high to process with png_read_png()"); - - /* -------------- image transformations start here ------------------- */ - -#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED - /* Tell libpng to strip 16-bit/color files down to 8 bits per color. - */ - if (transforms & PNG_TRANSFORM_SCALE_16) - { - /* 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. - */ - png_set_scale_16(png_ptr); - } -#endif - -#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED - /* 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) - png_set_strip_16(png_ptr); -#endif - -#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED - /* Strip alpha bytes from the input data without combining with - * the background (not recommended). - */ - if (transforms & PNG_TRANSFORM_STRIP_ALPHA) - png_set_strip_alpha(png_ptr); -#endif - -#if defined(PNG_READ_PACK_SUPPORTED) && !defined(PNG_READ_EXPAND_SUPPORTED) - /* 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) - png_set_packing(png_ptr); -#endif - -#ifdef PNG_READ_PACKSWAP_SUPPORTED - /* 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) - png_set_packswap(png_ptr); -#endif - -#ifdef PNG_READ_EXPAND_SUPPORTED - /* 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) - if ((png_ptr->bit_depth < 8) || - (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) || - (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))) - png_set_expand(png_ptr); -#endif - - /* We don't handle background color or gamma transformation or quantizing. - */ - -#ifdef PNG_READ_INVERT_SUPPORTED - /* Invert monochrome files to have 0 as white and 1 as black - */ - if (transforms & PNG_TRANSFORM_INVERT_MONO) - png_set_invert_mono(png_ptr); -#endif - -#ifdef PNG_READ_SHIFT_SUPPORTED - /* 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) - && png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT)) - { - png_color_8p sig_bit; - - png_get_sBIT(png_ptr, info_ptr, &sig_bit); - png_set_shift(png_ptr, sig_bit); - } -#endif - -#ifdef PNG_READ_BGR_SUPPORTED - /* Flip the RGB pixels to BGR (or RGBA to BGRA) */ - if (transforms & PNG_TRANSFORM_BGR) - png_set_bgr(png_ptr); -#endif - -#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED - /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */ - if (transforms & PNG_TRANSFORM_SWAP_ALPHA) - png_set_swap_alpha(png_ptr); -#endif - -#ifdef PNG_READ_SWAP_SUPPORTED - /* Swap bytes of 16-bit files to least significant byte first */ - if (transforms & PNG_TRANSFORM_SWAP_ENDIAN) - png_set_swap(png_ptr); -#endif - -/* Added at libpng-1.2.41 */ -#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED - /* Invert the alpha channel from opacity to transparency */ - if (transforms & PNG_TRANSFORM_INVERT_ALPHA) - png_set_invert_alpha(png_ptr); -#endif - -/* Added at libpng-1.2.41 */ -#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED - /* Expand grayscale image to RGB */ - if (transforms & PNG_TRANSFORM_GRAY_TO_RGB) - png_set_gray_to_rgb(png_ptr); -#endif - -/* Added at libpng-1.5.4 */ -#ifdef PNG_READ_EXPAND_16_SUPPORTED - if (transforms & PNG_TRANSFORM_EXPAND_16) - png_set_expand_16(png_ptr); -#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_bytepp)png_malloc(png_ptr, - info_ptr->height * png_sizeof(png_bytep)); - for (iptr=0; iptrheight; iptr++) - info_ptr->row_pointers[iptr] = NULL; - - info_ptr->free_me |= PNG_FREE_ROWS; - - for (row = 0; row < (int)info_ptr->height; row++) - info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr, - png_get_rowbytes(png_ptr, info_ptr)); - } - - 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(transforms) /* Quiet compiler warnings */ - PNG_UNUSED(params) - -} -#endif /* PNG_INFO_IMAGE_SUPPORTED */ -#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ -#endif /* PNG_READ_SUPPORTED */ diff --git a/Source/LibPNG/pngrio.c b/Source/LibPNG/pngrio.c deleted file mode 100644 index e9c381c..0000000 --- a/Source/LibPNG/pngrio.c +++ /dev/null @@ -1,176 +0,0 @@ - -/* pngrio.c - functions for data input - * - * Last changed in libpng 1.5.0 [January 6, 2011] - * Copyright (c) 1998-2011 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 then 64K on a 16 bit machine. - */ -void /* PRIVATE */ -png_read_data(png_structp png_ptr, png_bytep data, png_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. - */ -# ifndef USE_FAR_KEYWORD -void PNGCBAPI -png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_size_t check; - - if (png_ptr == NULL) - return; - - /* fread() returns 0 on error, so it is OK to store this in a png_size_t - * instead of an int, which is what fread() actually returns. - */ - check = fread(data, 1, length, (png_FILE_p)png_ptr->io_ptr); - - if (check != length) - png_error(png_ptr, "Read Error"); -} -# else -/* This is the model-independent version. Since the standard I/O library - can't handle far buffers in the medium and small models, we have to copy - the data. -*/ - -#define NEAR_BUF_SIZE 1024 -#define MIN(a,b) (a <= b ? a : b) - -static void PNGCBAPI -png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_size_t check; - png_byte *n_data; - png_FILE_p io_ptr; - - if (png_ptr == NULL) - return; - - /* Check if data really is near. If so, use usual code. */ - n_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); - - if ((png_bytep)n_data == data) - { - check = fread(n_data, 1, length, io_ptr); - } - - else - { - png_byte buf[NEAR_BUF_SIZE]; - png_size_t read, remaining, err; - check = 0; - remaining = length; - - do - { - read = MIN(NEAR_BUF_SIZE, remaining); - err = fread(buf, 1, read, io_ptr); - png_memcpy(data, buf, read); /* copy far buffer to near buffer */ - - if (err != read) - break; - - else - check += err; - - data += read; - remaining -= read; - } - while (remaining != 0); - } - - if ((png_uint_32)check != (png_uint_32)length) - png_error(png_ptr, "read Error"); -} -# endif -#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_structp 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 - - /* 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"); - } - -#ifdef PNG_WRITE_FLUSH_SUPPORTED - png_ptr->output_flush_fn = NULL; -#endif -} -#endif /* PNG_READ_SUPPORTED */ diff --git a/Source/LibPNG/pngrtran.c b/Source/LibPNG/pngrtran.c deleted file mode 100644 index 1e31c75..0000000 --- a/Source/LibPNG/pngrtran.c +++ /dev/null @@ -1,5054 +0,0 @@ - -/* pngrtran.c - transforms the data in a row for PNG readers - * - * Last changed in libpng 1.5.11 [June 14, 2012] - * Copyright (c) 1998-2012 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_structp 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"); - 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_BACKGROUND_SUPPORTED -/* Handle alpha and tRNS via a background color */ -void PNGFAPI -png_set_background_fixed(png_structp 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_ptr == 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_memcpy(&(png_ptr->background), background_color, - png_sizeof(png_color_16)); - png_ptr->background_gamma = background_gamma; - png_ptr->background_gamma_type = (png_byte)(background_gamma_code); - if (need_expand) - png_ptr->transformations |= PNG_BACKGROUND_EXPAND; - else - png_ptr->transformations &= ~PNG_BACKGROUND_EXPAND; -} - -# ifdef PNG_FLOATING_POINT_SUPPORTED -void PNGAPI -png_set_background(png_structp 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_structp png_ptr) -{ - png_debug(1, "in png_set_scale_16"); - - if (png_ptr == NULL) - 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_structp png_ptr) -{ - png_debug(1, "in png_set_strip_16"); - - if (png_ptr == NULL) - return; - - png_ptr->transformations |= PNG_16_TO_8; -} -#endif - -#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED -void PNGAPI -png_set_strip_alpha(png_structp png_ptr) -{ - png_debug(1, "in png_set_strip_alpha"); - - if (png_ptr == NULL) - 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_structp 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; -# endif - if (is_screen) - 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) - 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_structp 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_structp 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_ptr == NULL) - 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. - */ - if (output_gamma < 70000 || output_gamma > 300000) - 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->gamma == 0) - png_ptr->gamma = file_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) - { - /* And obtain alpha pre-multiplication by composing on black: */ - png_memset(&png_ptr->background, 0, sizeof png_ptr->background); - png_ptr->background_gamma = png_ptr->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) - png_error(png_ptr, - "conflicting calls to set alpha mode and background"); - - png_ptr->transformations |= PNG_COMPOSE; - } - - /* New API, make sure apps call the correct initializers: */ - png_ptr->flags |= PNG_FLAG_DETECT_UNINITIALIZED; -} - -# ifdef PNG_FLOATING_POINT_SUPPORTED -void PNGAPI -png_set_alpha_mode(png_structp 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 then 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 FAR * next; - png_byte left; - png_byte right; -} png_dsort; -typedef png_dsort FAR * png_dsortp; -typedef png_dsort FAR * FAR * png_dsortpp; - -void PNGAPI -png_set_quantize(png_structp 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_ptr == NULL) - return; - - png_ptr->transformations |= PNG_QUANTIZE; - - if (!full_quantize) - { - int i; - - png_ptr->quantize_index = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(num_palette * png_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_uint_32)(num_palette * png_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) - break; - } - - /* Swap the palette around, and set up a table, if necessary */ - if (full_quantize) - { - 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_uint_32)(num_palette * png_sizeof(png_byte))); - png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(num_palette * png_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_uint_32)(769 * - png_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_uint_32)(png_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) - { - 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) - { - 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); - png_size_t num_entries = ((png_size_t)1 << total_bits); - - png_ptr->palette_lookup = (png_bytep)png_calloc(png_ptr, - (png_uint_32)(num_entries * png_sizeof(png_byte))); - - distance = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_entries * - png_sizeof(png_byte))); - - png_memset(distance, 0xff, num_entries * png_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 /* PNG_READ_QUANTIZE_SUPPORTED */ - -#ifdef PNG_READ_GAMMA_SUPPORTED -void PNGFAPI -png_set_gamma_fixed(png_structp png_ptr, png_fixed_point scrn_gamma, - png_fixed_point file_gamma) -{ - png_debug(1, "in png_set_gamma_fixed"); - - if (png_ptr == NULL) - 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*/); - -#if PNG_LIBPNG_VER >= 10600 - /* 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) it will not be made until 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"); -#endif - - /* 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->gamma = file_gamma; - png_ptr->screen_gamma = scrn_gamma; -} - -# ifdef PNG_FLOATING_POINT_SUPPORTED -void PNGAPI -png_set_gamma(png_structp 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_SUPPORTED */ -#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_structp png_ptr) -{ - png_debug(1, "in png_set_expand"); - - if (png_ptr == NULL) - return; - - png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS); - png_ptr->flags &= ~PNG_FLAG_ROW_INIT; -} - -/* 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_structp png_ptr) -{ - png_debug(1, "in png_set_palette_to_rgb"); - - if (png_ptr == NULL) - return; - - png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS); - png_ptr->flags &= ~PNG_FLAG_ROW_INIT; -} - -/* Expand grayscale images of less than 8-bit depth to 8 bits. */ -void PNGAPI -png_set_expand_gray_1_2_4_to_8(png_structp png_ptr) -{ - png_debug(1, "in png_set_expand_gray_1_2_4_to_8"); - - if (png_ptr == NULL) - return; - - png_ptr->transformations |= PNG_EXPAND; - png_ptr->flags &= ~PNG_FLAG_ROW_INIT; -} - - - -/* Expand tRNS chunks to alpha channels. */ -void PNGAPI -png_set_tRNS_to_alpha(png_structp png_ptr) -{ - png_debug(1, "in png_set_tRNS_to_alpha"); - - png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS); - png_ptr->flags &= ~PNG_FLAG_ROW_INIT; -} -#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */ - -#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_structp png_ptr) -{ - png_debug(1, "in png_set_expand_16"); - - if (png_ptr == NULL) - return; - - png_ptr->transformations |= (PNG_EXPAND_16 | PNG_EXPAND | PNG_EXPAND_tRNS); - png_ptr->flags &= ~PNG_FLAG_ROW_INIT; - - /* New API, make sure apps call the correct initializers: */ - png_ptr->flags |= PNG_FLAG_DETECT_UNINITIALIZED; -} -#endif - -#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED -void PNGAPI -png_set_gray_to_rgb(png_structp png_ptr) -{ - png_debug(1, "in png_set_gray_to_rgb"); - - if (png_ptr != NULL) - { - /* 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; - png_ptr->flags &= ~PNG_FLAG_ROW_INIT; - } -} -#endif - -#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED -void PNGFAPI -png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action, - png_fixed_point red, png_fixed_point green) -{ - png_debug(1, "in png_set_rgb_to_gray"); - - if (png_ptr == NULL) - 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"); - break; - } - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) -#ifdef PNG_READ_EXPAND_SUPPORTED - png_ptr->transformations |= PNG_EXPAND; -#else - { - png_warning(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_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_structp png_ptr, int error_action, double red, - double green) -{ - if (png_ptr == NULL) - return; - - 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 - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) -void PNGAPI -png_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr - read_user_transform_fn) -{ - png_debug(1, "in png_set_read_user_transform_fn"); - - if (png_ptr == NULL) - return; - -#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_structp 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_alpha = 1; - } - - /* If no alpha we can optimize. */ - if (!input_has_alpha) - { - /* Any alpha means background and associative alpha processing is - * required, however if the alpha is 0 or 1 throughout OPTIIMIZE_ALPHA - * and ENCODE_ALPHA are irrelevant. - */ - png_ptr->transformations &= ~PNG_ENCODE_ALPHA; - png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; - - if (!input_has_transparency) - 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) && - (png_ptr->transformations & PNG_EXPAND)) - { - { - 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) - { - if (!(png_ptr->transformations & PNG_EXPAND_tRNS)) - { - /* 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 /* PNG_READ_INVERT_ALPHA_SUPPORTED */ - } - } /* background expand and (therefore) no alpha association. */ -#endif /* PNG_READ_EXPAND_SUPPORTED && PNG_READ_BACKGROUND_SUPPORTED */ -} - -static void /* PRIVATE */ -png_init_rgb_transformations(png_structp 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) - { - /* Any alpha means background and associative alpha processing is - * required, however if the alpha is 0 or 1 throughout OPTIIMIZE_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) - 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) && - (png_ptr->transformations & PNG_EXPAND) && - !(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) - /* 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: - /* Already 8 bits, fall through */ - - 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)) - { - 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 /* PNG_READ_EXPAND_SUPPORTED && PNG_READ_BACKGROUND_SUPPORTED */ -} - -void /* PRIVATE */ -png_init_read_transformations(png_structp 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->gamma != 0) /* has been set */ - { - if (png_ptr->screen_gamma != 0) /* screen set too */ - gamma_correction = png_gamma_threshold(png_ptr->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->gamma); - } - - else if (png_ptr->screen_gamma != 0) - /* The converse - assume the file matches the screen, note that this - * perhaps undesireable 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->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->gamma = PNG_FP_1; - - /* 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) - 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_SHIFT - * 16) PNG_PACK - * 17) PNG_BGR - * 18) PNG_PACKSWAP - * 19) PNG_FILLER (includes PNG_ADD_ALPHA) - * 20) PNG_INVERT_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) && - !(png_ptr->transformations & PNG_COMPOSE)) - { - /* 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)) - { - png_ptr->transformations &= ~PNG_ENCODE_ALPHA; - png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; - } -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) && \ - defined(PNG_READ_BACKGROUND_SUPPORTED) && \ - defined(PNG_READ_GRAY_TO_RGB_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) - { - /* 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)) - png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; - } - - else if (png_ptr->transformations & PNG_COMPOSE) - { - /* 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) - { - 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 /* PNG_READ_GRAY_TO_RGB_SUPPORTED (etc) */ - - /* 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) && - (png_ptr->transformations & PNG_COMPOSE) && - !(png_ptr->transformations & PNG_BACKGROUND_EXPAND) && - 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_uint_32)(x)*255+32895) >> 16)) - CHOP(png_ptr->background.red); - CHOP(png_ptr->background.green); - CHOP(png_ptr->background.blue); - CHOP(png_ptr->background.gray); -# undef CHOP - } -#endif /* PNG_READ_BACKGROUND_SUPPORTED && PNG_READ_EXPAND_16_SUPPORTED */ - -#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)) && - (png_ptr->transformations & PNG_COMPOSE) && - !(png_ptr->transformations & PNG_BACKGROUND_EXPAND) && - 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) - || ((png_ptr->transformations & PNG_RGB_TO_GRAY) - && (png_gamma_significant(png_ptr->gamma) || - png_gamma_significant(png_ptr->screen_gamma))) - || ((png_ptr->transformations & PNG_COMPOSE) - && (png_gamma_significant(png_ptr->gamma) - || png_gamma_significant(png_ptr->screen_gamma) -# ifdef PNG_READ_BACKGROUND_SUPPORTED - || (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_UNIQUE - && png_gamma_significant(png_ptr->background_gamma)) -# endif - )) || ((png_ptr->transformations & PNG_ENCODE_ALPHA) - && png_gamma_significant(png_ptr->screen_gamma)) - ) - { - png_build_gamma_table(png_ptr, png_ptr->bit_depth); - -#ifdef PNG_READ_BACKGROUND_SUPPORTED - if (png_ptr->transformations & PNG_COMPOSE) - { - /* 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) - png_warning(png_ptr, - "libpng does not support gamma+background+rgb_to_gray"); - - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - /* 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->gamma); - gs = png_reciprocal2(png_ptr->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)) - { - 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)) - { - 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->gamma); - gs = png_reciprocal2(png_ptr->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) - png_ptr->background_1.gray = png_gamma_correct(png_ptr, - png_ptr->background.gray, g); - - if (gs_sig) - 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) - { - 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) - { - 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 /* PNG_READ_BACKGROUND_SUPPORTED */ - 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 /* PNG_READ_GAMMA_SUPPORTED */ - -#ifdef PNG_READ_BACKGROUND_SUPPORTED - /* No GAMMA transformation (see the hanging else 4 lines above) */ - if ((png_ptr->transformations & PNG_COMPOSE) && - (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 /* PNG_READ_BACKGROUND_SUPPORTED */ - -#ifdef PNG_READ_SHIFT_SUPPORTED - if ((png_ptr->transformations & PNG_SHIFT) && - !(png_ptr->transformations & PNG_EXPAND) && - (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 meaninful 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 /* PNG_READ_SHIFT_SUPPORTED */ -} - -/* 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_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_read_transform_info"); - -#ifdef PNG_READ_EXPAND_SUPPORTED - if (png_ptr->transformations & PNG_EXPAND) - { - 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; - } - else - { - if (png_ptr->num_trans) - { - if (png_ptr->transformations & PNG_EXPAND_tRNS) - 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) - 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. - */ - info_ptr->gamma = png_ptr->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) - info_ptr->bit_depth = 8; -# endif - -# ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED - if (png_ptr->transformations & PNG_16_TO_8) - 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_SUPPORTED */ - } - -#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED - if (png_ptr->transformations & PNG_GRAY_TO_RGB) - 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) - 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) - { - if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) || - (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) && - png_ptr->palette_lookup && 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 && 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) && (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) - info_ptr->channels = 3; - - else - info_ptr->channels = 1; - -#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED - if (png_ptr->transformations & PNG_STRIP_ALPHA) - { - 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) - info_ptr->channels++; - -#ifdef PNG_READ_FILLER_SUPPORTED - /* STRIP_ALPHA and FILLER allowed: MASK_ALPHA bit stripped above */ - if ((png_ptr->transformations & PNG_FILLER) && - ((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) - 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) - { - if (info_ptr->bit_depth < png_ptr->user_transform_depth) - info_ptr->bit_depth = png_ptr->user_transform_depth; - - if (info_ptr->channels < png_ptr->user_transform_channels) - 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) - return; -#endif -} - -/* 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_structp 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.5 the new flag is set only for - * selected new APIs to ensure that there is no API change. - */ - if ((png_ptr->flags & PNG_FLAG_DETECT_UNINITIALIZED) != 0 && - !(png_ptr->flags & PNG_FLAG_ROW_INIT)) - { - /* 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) - { - 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 && - (png_ptr->transformations & PNG_EXPAND_tRNS)) - 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) && - !(png_ptr->transformations & PNG_COMPOSE) && - (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) - { - int rgb_error = - png_do_rgb_to_gray(png_ptr, row_info, - png_ptr->row_buf + 1); - - if (rgb_error) - { - 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) && - !(png_ptr->mode & PNG_BACKGROUND_IS_GRAY)) - 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) - png_do_compose(row_info, png_ptr->row_buf + 1, png_ptr); -#endif - -#ifdef PNG_READ_GAMMA_SUPPORTED - if ((png_ptr->transformations & PNG_GAMMA) && -#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED - /* Because RGB_TO_GRAY does the gamma transform. */ - !(png_ptr->transformations & PNG_RGB_TO_GRAY) && -#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) && - ((png_ptr->num_trans != 0) || - (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) && -#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) && - (png_ptr->transformations & PNG_COMPOSE) && - (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) && - (row_info->color_type & PNG_COLOR_MASK_ALPHA)) - 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) - 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) - png_do_chop(row_info, png_ptr->row_buf + 1); -#endif - -#ifdef PNG_READ_QUANTIZE_SUPPORTED - if (png_ptr->transformations & PNG_QUANTIZE) - { - 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 /* PNG_READ_QUANTIZE_SUPPORTED */ - -#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) - 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) && - (png_ptr->mode & PNG_BACKGROUND_IS_GRAY)) - 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) - png_do_invert(row_info, png_ptr->row_buf + 1); -#endif - -#ifdef PNG_READ_SHIFT_SUPPORTED - if (png_ptr->transformations & PNG_SHIFT) - 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) - 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) - png_do_bgr(row_info, png_ptr->row_buf + 1); -#endif - -#ifdef PNG_READ_PACKSWAP_SUPPORTED - if (png_ptr->transformations & PNG_PACKSWAP) - png_do_packswap(row_info, png_ptr->row_buf + 1); -#endif - -#ifdef PNG_READ_FILLER_SUPPORTED - if (png_ptr->transformations & PNG_FILLER) - png_do_read_filler(row_info, png_ptr->row_buf + 1, - (png_uint_32)png_ptr->filler, png_ptr->flags); -#endif - -#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED - if (png_ptr->transformations & PNG_INVERT_ALPHA) - png_do_read_invert_alpha(row_info, png_ptr->row_buf + 1); -#endif - -#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED - if (png_ptr->transformations & PNG_SWAP_ALPHA) - 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) - 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) - { - 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 */ - /* png_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) - row_info->bit_depth = png_ptr->user_transform_depth; - - if (png_ptr->user_transform_channels) - 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 -} - -#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. - */ -void /* PRIVATE */ -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 + (png_size_t)((row_width - 1) >> 3); - png_bytep dp = row + (png_size_t)row_width - 1; - png_uint_32 shift = 7 - (int)((row_width + 7) & 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 + (png_size_t)((row_width - 1) >> 2); - png_bytep dp = row + (png_size_t)row_width - 1; - png_uint_32 shift = (int)((3 - ((row_width + 3) & 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 + (png_size_t)((row_width - 1) >> 1); - png_bytep dp = row + (png_size_t)row_width - 1; - png_uint_32 shift = (int)((1 - ((row_width + 1) & 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. - */ -void /* PRIVATE */ -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) - { - 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) - { - 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) - 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 & 0xff); - } - break; - } -#endif - } - } -} -#endif - -#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED -/* Scale rows of bit depth 16 down to 8 accurately */ -void /* PRIVATE */ -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 -void /* PRIVATE */ -/* 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 -void /* PRIVATE */ -png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_read_swap_alpha"); - - { - png_uint_32 row_width = row_info->width; - 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 -void /* PRIVATE */ -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 */ -void /* PRIVATE */ -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) & 0xff); -#endif - png_byte lo_filler = (png_byte)(filler & 0xff); - - 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) - { - /* This changes the data from G to GX */ - png_bytep sp = row + (png_size_t)row_width; - png_bytep dp = sp + (png_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 + (png_size_t)row_width; - png_bytep dp = sp + (png_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) - { - /* This changes the data from GG to GGXX */ - png_bytep sp = row + (png_size_t)row_width * 2; - png_bytep dp = sp + (png_size_t)row_width * 2; - for (i = 1; i < row_width; i++) - { - *(--dp) = hi_filler; - *(--dp) = lo_filler; - *(--dp) = *(--sp); - *(--dp) = *(--sp); - } - *(--dp) = hi_filler; - *(--dp) = lo_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 + (png_size_t)row_width * 2; - png_bytep dp = sp + (png_size_t)row_width * 2; - for (i = 0; i < row_width; i++) - { - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = hi_filler; - *(--dp) = lo_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) - { - /* This changes the data from RGB to RGBX */ - png_bytep sp = row + (png_size_t)row_width * 3; - png_bytep dp = sp + (png_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 + (png_size_t)row_width * 3; - png_bytep dp = sp + (png_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) - { - /* This changes the data from RRGGBB to RRGGBBXX */ - png_bytep sp = row + (png_size_t)row_width * 6; - png_bytep dp = sp + (png_size_t)row_width * 2; - for (i = 1; i < row_width; i++) - { - *(--dp) = hi_filler; - *(--dp) = lo_filler; - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - } - *(--dp) = hi_filler; - *(--dp) = lo_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 + (png_size_t)row_width * 6; - png_bytep dp = sp + (png_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) = hi_filler; - *(--dp) = lo_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 */ -void /* PRIVATE */ -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)) - { - if (row_info->color_type == PNG_COLOR_TYPE_GRAY) - { - if (row_info->bit_depth == 8) - { - /* This changes G to RGB */ - png_bytep sp = row + (png_size_t)row_width - 1; - png_bytep dp = sp + (png_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 + (png_size_t)row_width * 2 - 1; - png_bytep dp = sp + (png_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 + (png_size_t)row_width * 2 - 1; - png_bytep dp = sp + (png_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 + (png_size_t)row_width * 4 - 1; - png_bytep dp = sp + (png_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 - * http://web.archive.org/web/20000816232553/http://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 coefficents 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. - */ -int /* PRIVATE */ -png_do_rgb_to_gray(png_structp 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) && - (row_info->color_type & PNG_COLOR_MASK_COLOR)) - { - 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) - { -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_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) - *(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) - *(dp++) = *(sp++); - } - } - } - - else /* RGB bit_depth == 16 */ - { -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_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; - - red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; - green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; - blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; - - 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) - { - *(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; - - red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; - green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; - blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; - - 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) - { - *(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 -#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ - -#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED -/* 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; - palette[i].green = (png_byte)v; - palette[i].blue = (png_byte)v; - } -} -#endif - - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -#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. - */ -void /* PRIVATE */ -png_do_compose(png_row_infop row_info, png_bytep row, png_structp 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; -#endif - - png_bytep sp; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - int optimize = (png_ptr->flags & PNG_FLAG_OPTIMIZE_ALPHA) != 0; - 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) - { - *sp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); - *sp |= (png_byte)(png_ptr->background.gray << shift); - } - - if (!shift) - { - 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) - { - *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); - *sp |= (png_byte)(png_ptr->background.gray << shift); - } - - else - { - png_byte p = (png_byte)((*sp >> shift) & 0x03); - png_byte g = (png_byte)((gamma_table [p | (p << 2) | - (p << 4) | (p << 6)] >> 6) & 0x03); - *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); - *sp |= (png_byte)(g << shift); - } - - if (!shift) - { - 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) - { - *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); - *sp |= (png_byte)(png_ptr->background.gray << shift); - } - - if (!shift) - { - 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) - { - *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); - *sp |= (png_byte)(png_ptr->background.gray << shift); - } - - else - { - png_byte p = (png_byte)((*sp >> shift) & 0x0f); - png_byte g = (png_byte)((gamma_table[p | - (p << 4)] >> 4) & 0x0f); - *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); - *sp |= (png_byte)(g << shift); - } - - if (!shift) - { - 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) - { - *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); - *sp |= (png_byte)(png_ptr->background.gray << shift); - } - - if (!shift) - { - 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) - 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_1.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) - 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_1.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) 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) 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) 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) - 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) - 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) - 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 /* PNG_READ_BACKGROUND_SUPPORTED || PNG_READ_ALPHA_MODE_SUPPORTED */ - -#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(). - */ -void /* PRIVATE */ -png_do_gamma(png_row_infop row_info, png_bytep row, png_structp 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. - */ -void /* PRIVATE */ -png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structp 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) - { - 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. - */ -void /* PRIVATE */ -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 + (png_size_t)((row_width - 1) >> 3); - dp = row + (png_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 + (png_size_t)((row_width - 1) >> 2); - dp = row + (png_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 + (png_size_t)((row_width - 1) >> 1); - dp = row + (png_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 + (png_size_t)row_width - 1; - dp = row + (png_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 + (png_size_t)row_width - 1; - dp = row + (png_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. - */ -void /* PRIVATE */ -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) - { - png_uint_16 gray = (png_uint_16)(trans_color ? trans_color->gray : 0); - - if (row_info->bit_depth < 8) - { - switch (row_info->bit_depth) - { - case 1: - { - gray = (png_uint_16)((gray & 0x01) * 0xff); - sp = row + (png_size_t)((row_width - 1) >> 3); - dp = row + (png_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 = (png_uint_16)((gray & 0x03) * 0x55); - sp = row + (png_size_t)((row_width - 1) >> 2); - dp = row + (png_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 = (png_uint_16)((gray & 0x0f) * 0x11); - sp = row + (png_size_t)((row_width - 1) >> 1); - dp = row + (png_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 + (png_size_t)row_width - 1; - dp = row + (png_size_t)(row_width << 1) - 1; - - for (i = 0; i < row_width; i++) - { - if (*sp == gray) - *dp-- = 0; - - else - *dp-- = 0xff; - - *dp-- = *sp--; - } - } - - else if (row_info->bit_depth == 16) - { - png_byte gray_high = (png_byte)((gray >> 8) & 0xff); - png_byte gray_low = (png_byte)(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) == gray_high && *(sp) == 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) - { - 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 + (png_size_t)row_info->rowbytes - 1; - dp = row + (png_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 + (png_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. - */ -void /* PRIVATE */ -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 -void /* PRIVATE */ -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 /* PNG_READ_QUANTIZE_SUPPORTED */ -#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ - -#ifdef PNG_MNG_FEATURES_SUPPORTED -/* Undoes intrapixel differencing */ -void /* PRIVATE */ -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)) - { - 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 = (*(rp ) << 8) | *(rp + 1); - png_uint_32 s1 = (*(rp + 2) << 8) | *(rp + 3); - png_uint_32 s2 = (*(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 /* PNG_MNG_FEATURES_SUPPORTED */ -#endif /* PNG_READ_SUPPORTED */ diff --git a/Source/LibPNG/pngrutil.c b/Source/LibPNG/pngrutil.c deleted file mode 100644 index 4ef05fe..0000000 --- a/Source/LibPNG/pngrutil.c +++ /dev/null @@ -1,4159 +0,0 @@ - -/* pngrutil.c - utilities to read a PNG file - * - * Last changed in libpng 1.5.10 [March 8, 2012] - * Copyright (c) 1998-2012 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 - -#define png_strtod(p,a,b) strtod(a,b) - -png_uint_32 PNGAPI -png_get_uint_31(png_structp 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_structp 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 uval; - - uval = (uval ^ 0xffffffff) + 1; /* 2's complement: -x = ~x+1 */ - return -(png_int_32)uval; -} - -/* 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 accomodate 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 /* PNG_READ_INT_FUNCTIONS_SUPPORTED */ - -/* Read and check the PNG file signature */ -void /* PRIVATE */ -png_read_sig(png_structp png_ptr, png_infop info_ptr) -{ - png_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)) - { - 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_structp 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); - -#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_structp png_ptr, png_bytep buf, png_size_t 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 a 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_structp png_ptr, png_uint_32 skip) -{ - png_size_t i; - png_size_t istop = png_ptr->zbuf_size; - - for (i = (png_size_t)skip; i > istop; i -= istop) - { - png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); - } - - if (i) - { - png_crc_read(png_ptr, png_ptr->zbuf, i); - } - - if (png_crc_error(png_ptr)) - { - if (PNG_CHUNK_ANCILLIARY(png_ptr->chunk_name) ? - !(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN) : - (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_USE)) - { - png_chunk_warning(png_ptr, "CRC error"); - } - - else - { - png_chunk_benign_error(png_ptr, "CRC error"); - return (0); - } - - 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_structp png_ptr) -{ - png_byte crc_bytes[4]; - png_uint_32 crc; - int need_crc = 1; - - if (PNG_CHUNK_ANCILLIARY(png_ptr->chunk_name)) - { - 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) - 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) - { - crc = png_get_uint_32(crc_bytes); - return ((int)(crc != png_ptr->crc)); - } - - else - return (0); -} - -#ifdef PNG_READ_COMPRESSED_TEXT_SUPPORTED -static png_size_t -png_inflate(png_structp png_ptr, png_bytep data, png_size_t size, - png_bytep output, png_size_t output_size) -{ - png_size_t count = 0; - - /* 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 forces access of the input data to be separated from - * at least some of the use by some period of time. - */ - png_ptr->zstream.next_in = data; - /* avail_in is set below from 'size' */ - png_ptr->zstream.avail_in = 0; - - while (1) - { - int ret, avail; - - /* 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 o - * 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. - */ - if (png_ptr->zstream.avail_in == 0 && size > 0) - { - if (size <= ZLIB_IO_MAX) - { - /* The value is less than ZLIB_IO_MAX so the cast is safe: */ - png_ptr->zstream.avail_in = (uInt)size; - size = 0; - } - - else - { - png_ptr->zstream.avail_in = ZLIB_IO_MAX; - size -= ZLIB_IO_MAX; - } - } - - /* Reset the output buffer each time round - we empty it - * after every inflate call. - */ - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = png_ptr->zbuf_size; - - ret = inflate(&png_ptr->zstream, Z_NO_FLUSH); - avail = png_ptr->zbuf_size - png_ptr->zstream.avail_out; - - /* First copy/count any new output - but only if we didn't - * get an error code. - */ - if ((ret == Z_OK || ret == Z_STREAM_END) && avail > 0) - { - png_size_t space = avail; /* > 0, see above */ - - if (output != 0 && output_size > count) - { - png_size_t copy = output_size - count; - - if (space < copy) - copy = space; - - png_memcpy(output + count, png_ptr->zbuf, copy); - } - count += space; - } - - if (ret == Z_OK) - continue; - - /* Termination conditions - always reset the zstream, it - * must be left in inflateInit state. - */ - png_ptr->zstream.avail_in = 0; - inflateReset(&png_ptr->zstream); - - if (ret == Z_STREAM_END) - return count; /* NOTE: may be zero. */ - - /* Now handle the error codes - the API always returns 0 - * and the error message is dumped into the uncompressed - * buffer if available. - */ -# ifdef PNG_WARNINGS_SUPPORTED - { - png_const_charp msg; - - if (png_ptr->zstream.msg != 0) - msg = png_ptr->zstream.msg; - - else switch (ret) - { - case Z_BUF_ERROR: - msg = "Buffer error in compressed datastream"; - break; - - case Z_DATA_ERROR: - msg = "Data error in compressed datastream"; - break; - - default: - msg = "Incomplete compressed datastream"; - break; - } - - png_chunk_warning(png_ptr, msg); - } -# endif - - /* 0 means an error - notice that this code simply ignores - * zero length compressed chunks as a result. - */ - return 0; - } -} - -/* - * Decompress trailing data in a chunk. The assumption is that chunkdata - * 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). - */ -void /* PRIVATE */ -png_decompress_chunk(png_structp png_ptr, int comp_type, - png_size_t chunklength, - png_size_t prefix_size, png_size_t *newlength) -{ - /* The caller should guarantee this */ - if (prefix_size > chunklength) - { - /* The recovery is to delete the chunk. */ - png_warning(png_ptr, "invalid chunklength"); - prefix_size = 0; /* To delete everything */ - } - - else if (comp_type == PNG_COMPRESSION_TYPE_BASE) - { - png_size_t expanded_size = png_inflate(png_ptr, - (png_bytep)(png_ptr->chunkdata + prefix_size), - chunklength - prefix_size, - 0, /* output */ - 0); /* output size */ - - /* Now check the limits on this chunk - if the limit fails the - * compressed data will be removed, the prefix will remain. - */ - if (prefix_size >= (~(png_size_t)0) - 1 || - expanded_size >= (~(png_size_t)0) - 1 - prefix_size -#ifdef PNG_USER_LIMITS_SUPPORTED - || (png_ptr->user_chunk_malloc_max && - (prefix_size + expanded_size >= png_ptr->user_chunk_malloc_max - 1)) -#else - || ((PNG_USER_CHUNK_MALLOC_MAX > 0) && - prefix_size + expanded_size >= PNG_USER_CHUNK_MALLOC_MAX - 1) -#endif - ) - png_warning(png_ptr, "Exceeded size limit while expanding chunk"); - - /* If the size is zero either there was an error and a message - * has already been output (warning) or the size really is zero - * and we have nothing to do - the code will exit through the - * error case below. - */ - else if (expanded_size > 0) - { - /* Success (maybe) - really uncompress the chunk. */ - png_size_t new_size = 0; - png_charp text = (png_charp)png_malloc_warn(png_ptr, - prefix_size + expanded_size + 1); - - if (text != NULL) - { - png_memcpy(text, png_ptr->chunkdata, prefix_size); - new_size = png_inflate(png_ptr, - (png_bytep)(png_ptr->chunkdata + prefix_size), - chunklength - prefix_size, - (png_bytep)(text + prefix_size), expanded_size); - text[prefix_size + expanded_size] = 0; /* just in case */ - - if (new_size == expanded_size) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = text; - *newlength = prefix_size + expanded_size; - return; /* The success return! */ - } - - png_warning(png_ptr, "png_inflate logic error"); - png_free(png_ptr, text); - } - - else - png_warning(png_ptr, "Not enough memory to decompress chunk"); - } - } - - else /* if (comp_type != PNG_COMPRESSION_TYPE_BASE) */ - { - PNG_WARNING_PARAMETERS(p) - png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_d, comp_type); - png_formatted_warning(png_ptr, p, "Unknown compression type @1"); - - /* The recovery is to simply drop the data. */ - } - - /* Generic error return - leave the prefix, delete the compressed - * data, reallocate the chunkdata to remove the potentially large - * amount of compressed data. - */ - { - png_charp text = (png_charp)png_malloc_warn(png_ptr, prefix_size + 1); - - if (text != NULL) - { - if (prefix_size > 0) - png_memcpy(text, png_ptr->chunkdata, prefix_size); - - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = text; - - /* This is an extra zero in the 'uncompressed' part. */ - *(png_ptr->chunkdata + prefix_size) = 0x00; - } - /* Ignore a malloc error here - it is safe. */ - } - - *newlength = prefix_size; -} -#endif /* PNG_READ_COMPRESSED_TEXT_SUPPORTED */ - -/* Read and check the IDHR chunk */ -void /* PRIVATE */ -png_handle_IHDR(png_structp png_ptr, png_infop 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) - png_error(png_ptr, "Out of place IHDR"); - - /* Check the length */ - if (length != 13) - png_error(png_ptr, "Invalid IHDR chunk"); - - 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_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_color palette[PNG_MAX_PALETTE_LENGTH]; - int 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)) - png_error(png_ptr, "Missing IHDR before PLTE"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid PLTE after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - - else if (png_ptr->mode & PNG_HAVE_PLTE) - png_error(png_ptr, "Duplicate PLTE chunk"); - - png_ptr->mode |= PNG_HAVE_PLTE; - - if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR)) - { - png_warning(png_ptr, - "Ignoring PLTE chunk in grayscale PNG"); - png_crc_finish(png_ptr, length); - 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) - { - if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE) - { - png_warning(png_ptr, "Invalid palette chunk"); - png_crc_finish(png_ptr, length); - return; - } - - else - { - png_error(png_ptr, "Invalid palette chunk"); - } - } - - num = (int)length / 3; - -#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, 0); - } - -#ifndef PNG_READ_OPT_PLTE_SUPPORTED - else if (png_crc_error(png_ptr)) /* 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). - */ - if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_USE)) - { - if (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN) - { - png_chunk_benign_error(png_ptr, "CRC error"); - } - - else - { - png_chunk_warning(png_ptr, "CRC error"); - return; - } - } - - /* Otherwise, we (optionally) emit a warning and use the chunk. */ - else if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)) - { - png_chunk_warning(png_ptr, "CRC error"); - } - } -#endif - - png_set_PLTE(png_ptr, info_ptr, palette, num); - -#ifdef PNG_READ_tRNS_SUPPORTED - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) - { - if (png_ptr->num_trans > (png_uint_16)num) - { - png_warning(png_ptr, "Truncating incorrect tRNS chunk length"); - png_ptr->num_trans = (png_uint_16)num; - } - - if (info_ptr->num_trans > (png_uint_16)num) - { - png_warning(png_ptr, "Truncating incorrect info tRNS chunk length"); - info_ptr->num_trans = (png_uint_16)num; - } - } - } -#endif - -} - -void /* PRIVATE */ -png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_debug(1, "in png_handle_IEND"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR) || !(png_ptr->mode & PNG_HAVE_IDAT)) - { - png_error(png_ptr, "No image in file"); - } - - png_ptr->mode |= (PNG_AFTER_IDAT | PNG_HAVE_IEND); - - if (length != 0) - { - png_warning(png_ptr, "Incorrect IEND chunk length"); - } - - png_crc_finish(png_ptr, length); - - PNG_UNUSED(info_ptr) /* Quiet compiler warnings about unused info_ptr */ -} - -#ifdef PNG_READ_gAMA_SUPPORTED -void /* PRIVATE */ -png_handle_gAMA(png_structp png_ptr, png_infop 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)) - png_error(png_ptr, "Missing IHDR before gAMA"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid gAMA after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - - else if (png_ptr->mode & PNG_HAVE_PLTE) - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Out of place gAMA chunk"); - - if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) -#ifdef PNG_READ_sRGB_SUPPORTED - && !(info_ptr->valid & PNG_INFO_sRGB) -#endif - ) - { - png_warning(png_ptr, "Duplicate gAMA chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 4) - { - png_warning(png_ptr, "Incorrect gAMA chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 4); - - if (png_crc_finish(png_ptr, 0)) - return; - - igamma = png_get_fixed_point(NULL, buf); - - /* Check for zero gamma or an error. */ - if (igamma <= 0) - { - png_warning(png_ptr, - "Ignoring gAMA chunk with out of range gamma"); - - return; - } - -# ifdef PNG_READ_sRGB_SUPPORTED - if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)) - { - if (PNG_OUT_OF_RANGE(igamma, 45500, 500)) - { - PNG_WARNING_PARAMETERS(p) - png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_fixed, igamma); - png_formatted_warning(png_ptr, p, - "Ignoring incorrect gAMA value @1 when sRGB is also present"); - return; - } - } -# endif /* PNG_READ_sRGB_SUPPORTED */ - -# ifdef PNG_READ_GAMMA_SUPPORTED - /* Gamma correction on read is supported. */ - png_ptr->gamma = igamma; -# endif - /* And set the 'info' structure members. */ - png_set_gAMA_fixed(png_ptr, info_ptr, igamma); -} -#endif - -#ifdef PNG_READ_sBIT_SUPPORTED -void /* PRIVATE */ -png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_size_t truelen; - png_byte buf[4]; - - png_debug(1, "in png_handle_sBIT"); - - buf[0] = buf[1] = buf[2] = buf[3] = 0; - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before sBIT"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid sBIT after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - - else if (png_ptr->mode & PNG_HAVE_PLTE) - { - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Out of place sBIT chunk"); - } - - if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT)) - { - png_warning(png_ptr, "Duplicate sBIT chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - truelen = 3; - - else - truelen = (png_size_t)png_ptr->channels; - - if (length != truelen || length > 4) - { - png_warning(png_ptr, "Incorrect sBIT chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, truelen); - - if (png_crc_finish(png_ptr, 0)) - return; - - if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) - { - 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_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_byte buf[32]; - png_fixed_point x_white, y_white, x_red, y_red, x_green, y_green, x_blue, - y_blue; - - png_debug(1, "in png_handle_cHRM"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before cHRM"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid cHRM after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - - else if (png_ptr->mode & PNG_HAVE_PLTE) - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Out of place cHRM chunk"); - - if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM) -# ifdef PNG_READ_sRGB_SUPPORTED - && !(info_ptr->valid & PNG_INFO_sRGB) -# endif - ) - { - png_warning(png_ptr, "Duplicate cHRM chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 32) - { - png_warning(png_ptr, "Incorrect cHRM chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 32); - - if (png_crc_finish(png_ptr, 0)) - return; - - x_white = png_get_fixed_point(NULL, buf); - y_white = png_get_fixed_point(NULL, buf + 4); - x_red = png_get_fixed_point(NULL, buf + 8); - y_red = png_get_fixed_point(NULL, buf + 12); - x_green = png_get_fixed_point(NULL, buf + 16); - y_green = png_get_fixed_point(NULL, buf + 20); - x_blue = png_get_fixed_point(NULL, buf + 24); - y_blue = png_get_fixed_point(NULL, buf + 28); - - if (x_white == PNG_FIXED_ERROR || - y_white == PNG_FIXED_ERROR || - x_red == PNG_FIXED_ERROR || - y_red == PNG_FIXED_ERROR || - x_green == PNG_FIXED_ERROR || - y_green == PNG_FIXED_ERROR || - x_blue == PNG_FIXED_ERROR || - y_blue == PNG_FIXED_ERROR) - { - png_warning(png_ptr, "Ignoring cHRM chunk with negative chromaticities"); - return; - } - -#ifdef PNG_READ_sRGB_SUPPORTED - if ((info_ptr != NULL) && (info_ptr->valid & PNG_INFO_sRGB)) - { - if (PNG_OUT_OF_RANGE(x_white, 31270, 1000) || - PNG_OUT_OF_RANGE(y_white, 32900, 1000) || - PNG_OUT_OF_RANGE(x_red, 64000, 1000) || - PNG_OUT_OF_RANGE(y_red, 33000, 1000) || - PNG_OUT_OF_RANGE(x_green, 30000, 1000) || - PNG_OUT_OF_RANGE(y_green, 60000, 1000) || - PNG_OUT_OF_RANGE(x_blue, 15000, 1000) || - PNG_OUT_OF_RANGE(y_blue, 6000, 1000)) - { - PNG_WARNING_PARAMETERS(p) - - png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_fixed, x_white); - png_warning_parameter_signed(p, 2, PNG_NUMBER_FORMAT_fixed, y_white); - png_warning_parameter_signed(p, 3, PNG_NUMBER_FORMAT_fixed, x_red); - png_warning_parameter_signed(p, 4, PNG_NUMBER_FORMAT_fixed, y_red); - png_warning_parameter_signed(p, 5, PNG_NUMBER_FORMAT_fixed, x_green); - png_warning_parameter_signed(p, 6, PNG_NUMBER_FORMAT_fixed, y_green); - png_warning_parameter_signed(p, 7, PNG_NUMBER_FORMAT_fixed, x_blue); - png_warning_parameter_signed(p, 8, PNG_NUMBER_FORMAT_fixed, y_blue); - - png_formatted_warning(png_ptr, p, - "Ignoring incorrect cHRM white(@1,@2) r(@3,@4)g(@5,@6)b(@7,@8) " - "when sRGB is also present"); - } - return; - } -#endif /* PNG_READ_sRGB_SUPPORTED */ - -#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED - /* Store the _white values as default coefficients for the rgb to gray - * operation if it is supported. Check if the transform is already set to - * avoid destroying the transform values. - */ - if (!png_ptr->rgb_to_gray_coefficients_set) - { - /* png_set_background has not been called and we haven't seen an sRGB - * chunk yet. Find the XYZ of the three end points. - */ - png_XYZ XYZ; - png_xy xy; - - xy.redx = x_red; - xy.redy = y_red; - xy.greenx = x_green; - xy.greeny = y_green; - xy.bluex = x_blue; - xy.bluey = y_blue; - xy.whitex = x_white; - xy.whitey = y_white; - - if (png_XYZ_from_xy_checked(png_ptr, &XYZ, xy)) - { - /* The success case, because XYZ_from_xy normalises to a reference - * white Y of 1.0 we just need to scale the numbers. This should - * always work just fine. It is an internal error if this overflows. - */ - { - png_fixed_point r, g, b; - if (png_muldiv(&r, XYZ.redY, 32768, PNG_FP_1) && - r >= 0 && r <= 32768 && - png_muldiv(&g, XYZ.greenY, 32768, PNG_FP_1) && - g >= 0 && g <= 32768 && - png_muldiv(&b, XYZ.blueY, 32768, PNG_FP_1) && - 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"); - - 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 - - png_set_cHRM_fixed(png_ptr, info_ptr, x_white, y_white, x_red, y_red, - x_green, y_green, x_blue, y_blue); -} -#endif - -#ifdef PNG_READ_sRGB_SUPPORTED -void /* PRIVATE */ -png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - int intent; - png_byte buf[1]; - - png_debug(1, "in png_handle_sRGB"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before sRGB"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid sRGB after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - - else if (png_ptr->mode & PNG_HAVE_PLTE) - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Out of place sRGB chunk"); - - if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)) - { - png_warning(png_ptr, "Duplicate sRGB chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 1) - { - png_warning(png_ptr, "Incorrect sRGB chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 1); - - if (png_crc_finish(png_ptr, 0)) - return; - - intent = buf[0]; - - /* Check for bad intent */ - if (intent >= PNG_sRGB_INTENT_LAST) - { - png_warning(png_ptr, "Unknown sRGB intent"); - return; - } - -#if defined(PNG_READ_gAMA_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED) - if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)) - { - if (PNG_OUT_OF_RANGE(info_ptr->gamma, 45500, 500)) - { - PNG_WARNING_PARAMETERS(p) - - png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_fixed, - info_ptr->gamma); - - png_formatted_warning(png_ptr, p, - "Ignoring incorrect gAMA value @1 when sRGB is also present"); - } - } -#endif /* PNG_READ_gAMA_SUPPORTED */ - -#ifdef PNG_READ_cHRM_SUPPORTED - if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)) - if (PNG_OUT_OF_RANGE(info_ptr->x_white, 31270, 1000) || - PNG_OUT_OF_RANGE(info_ptr->y_white, 32900, 1000) || - PNG_OUT_OF_RANGE(info_ptr->x_red, 64000, 1000) || - PNG_OUT_OF_RANGE(info_ptr->y_red, 33000, 1000) || - PNG_OUT_OF_RANGE(info_ptr->x_green, 30000, 1000) || - PNG_OUT_OF_RANGE(info_ptr->y_green, 60000, 1000) || - PNG_OUT_OF_RANGE(info_ptr->x_blue, 15000, 1000) || - PNG_OUT_OF_RANGE(info_ptr->y_blue, 6000, 1000)) - { - png_warning(png_ptr, - "Ignoring incorrect cHRM value when sRGB is also present"); - } -#endif /* PNG_READ_cHRM_SUPPORTED */ - - /* This is recorded for use when handling the cHRM chunk above. An sRGB - * chunk unconditionally overwrites the coefficients for grayscale conversion - * too. - */ - png_ptr->is_sRGB = 1; - -# ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED - /* Don't overwrite user supplied values: */ - if (!png_ptr->rgb_to_gray_coefficients_set) - { - /* These numbers come from the sRGB specification (or, since one has to - * pay much money to get a copy, the wikipedia sRGB page) the - * chromaticity values quoted have been inverted to get the reverse - * transformation from RGB to XYZ and the 'Y' coefficients scaled by - * 32768 (then rounded). - * - * sRGB and ITU Rec-709 both truncate the values for the D65 white - * point to four digits and, even though it actually stores five - * digits, the PNG spec gives the truncated value. - * - * This means that when the chromaticities are converted back to XYZ - * end points we end up with (6968,23435,2366), which, as described in - * pngrtran.c, would overflow. If the five digit precision and up is - * used we get, instead: - * - * 6968*R + 23435*G + 2365*B - * - * (Notice that this rounds the blue coefficient down, rather than the - * choice used in pngrtran.c which is to round the green one down.) - */ - png_ptr->rgb_to_gray_red_coeff = 6968; /* 0.212639005871510 */ - png_ptr->rgb_to_gray_green_coeff = 23434; /* 0.715168678767756 */ - /* png_ptr->rgb_to_gray_blue_coeff = 2366; 0.072192315360734 */ - - /* The following keeps the cHRM chunk from destroying the - * coefficients again in the event that it follows the sRGB chunk. - */ - png_ptr->rgb_to_gray_coefficients_set = 1; - } -# endif - - png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, intent); -} -#endif /* PNG_READ_sRGB_SUPPORTED */ - -#ifdef PNG_READ_iCCP_SUPPORTED -void /* PRIVATE */ -png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -/* Note: this does not properly handle chunks that are > 64K under DOS */ -{ - png_byte compression_type; - png_bytep pC; - png_charp profile; - png_uint_32 skip = 0; - png_uint_32 profile_size; - png_alloc_size_t profile_length; - png_size_t slength, prefix_length, data_length; - - png_debug(1, "in png_handle_iCCP"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before iCCP"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid iCCP after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - - else if (png_ptr->mode & PNG_HAVE_PLTE) - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Out of place iCCP chunk"); - - if ((png_ptr->mode & PNG_HAVE_iCCP) || (info_ptr != NULL && - (info_ptr->valid & (PNG_INFO_iCCP|PNG_INFO_sRGB)))) - { - png_warning(png_ptr, "Duplicate iCCP chunk"); - png_crc_finish(png_ptr, length); - return; - } - - png_ptr->mode |= PNG_HAVE_iCCP; - -#ifdef PNG_MAX_MALLOC_64K - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "iCCP chunk too large to fit in memory"); - skip = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; - } -#endif - - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = (png_charp)png_malloc(png_ptr, length + 1); - slength = length; - png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); - - if (png_crc_finish(png_ptr, skip)) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - png_ptr->chunkdata[slength] = 0x00; - - for (profile = png_ptr->chunkdata; *profile; profile++) - /* Empty loop to find end of name */ ; - - ++profile; - - /* There should be at least one zero (the compression type byte) - * following the separator, and we should be on it - */ - if (profile >= png_ptr->chunkdata + slength - 1) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_warning(png_ptr, "Malformed iCCP chunk"); - return; - } - - /* Compression_type should always be zero */ - compression_type = *profile++; - - if (compression_type) - { - png_warning(png_ptr, "Ignoring nonzero compression type in iCCP chunk"); - compression_type = 0x00; /* Reset it to zero (libpng-1.0.6 through 1.0.8 - wrote nonzero) */ - } - - prefix_length = profile - png_ptr->chunkdata; - png_decompress_chunk(png_ptr, compression_type, - slength, prefix_length, &data_length); - - profile_length = data_length - prefix_length; - - if (prefix_length > data_length || profile_length < 4) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_warning(png_ptr, "Profile size field missing from iCCP chunk"); - return; - } - - /* Check the profile_size recorded in the first 32 bits of the ICC profile */ - pC = (png_bytep)(png_ptr->chunkdata + prefix_length); - profile_size = ((*(pC )) << 24) | - ((*(pC + 1)) << 16) | - ((*(pC + 2)) << 8) | - ((*(pC + 3)) ); - - /* NOTE: the following guarantees that 'profile_length' fits into 32 bits, - * because profile_size is a 32 bit value. - */ - if (profile_size < profile_length) - profile_length = profile_size; - - /* And the following guarantees that profile_size == profile_length. */ - if (profile_size > profile_length) - { - PNG_WARNING_PARAMETERS(p) - - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - - png_warning_parameter_unsigned(p, 1, PNG_NUMBER_FORMAT_u, profile_size); - png_warning_parameter_unsigned(p, 2, PNG_NUMBER_FORMAT_u, profile_length); - png_formatted_warning(png_ptr, p, - "Ignoring iCCP chunk with declared size = @1 and actual length = @2"); - return; - } - - png_set_iCCP(png_ptr, info_ptr, png_ptr->chunkdata, - compression_type, (png_bytep)png_ptr->chunkdata + prefix_length, - profile_size); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; -} -#endif /* PNG_READ_iCCP_SUPPORTED */ - -#ifdef PNG_READ_sPLT_SUPPORTED -void /* PRIVATE */ -png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -/* Note: this does not properly handle chunks that are > 64K under DOS */ -{ - png_bytep entry_start; - png_sPLT_t new_palette; - png_sPLT_entryp pp; - png_uint_32 data_length; - int entry_size, i; - png_uint_32 skip = 0; - png_size_t slength; - png_uint_32 dl; - png_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)) - png_error(png_ptr, "Missing IHDR before sPLT"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid sPLT after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - -#ifdef PNG_MAX_MALLOC_64K - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "sPLT chunk too large to fit in memory"); - skip = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; - } -#endif - - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = (png_charp)png_malloc(png_ptr, length + 1); - - /* 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. - */ - slength = length; - png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); - - if (png_crc_finish(png_ptr, skip)) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - png_ptr->chunkdata[slength] = 0x00; - - for (entry_start = (png_bytep)png_ptr->chunkdata; *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 (entry_start > (png_bytep)png_ptr->chunkdata + slength - 2) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - 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 (and use 'length', not 'slength' here for clarity - - * they are guaranteed to be the same, see the tests above.) - */ - data_length = length - (png_uint_32)(entry_start - - (png_bytep)png_ptr->chunkdata); - - /* Integrity-check the data length */ - if (data_length % entry_size) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_warning(png_ptr, "sPLT chunk has bad length"); - return; - } - - dl = (png_int_32)(data_length / entry_size); - max_dl = PNG_SIZE_MAX / png_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 / entry_size); - - new_palette.entries = (png_sPLT_entryp)png_malloc_warn( - png_ptr, new_palette.nentries * png_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_ptr->chunkdata; - - png_set_sPLT(png_ptr, info_ptr, &new_palette, 1); - - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_free(png_ptr, new_palette.entries); -} -#endif /* PNG_READ_sPLT_SUPPORTED */ - -#ifdef PNG_READ_tRNS_SUPPORTED -void /* PRIVATE */ -png_handle_tRNS(png_structp png_ptr, png_infop 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)) - png_error(png_ptr, "Missing IHDR before tRNS"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid tRNS after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) - { - png_warning(png_ptr, "Duplicate tRNS chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) - { - png_byte buf[2]; - - if (length != 2) - { - png_warning(png_ptr, "Incorrect tRNS chunk length"); - png_crc_finish(png_ptr, length); - 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_warning(png_ptr, "Incorrect tRNS chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, (png_size_t)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)) - { - /* Should be an error, but we can cope with it. */ - png_warning(png_ptr, "Missing PLTE before tRNS"); - } - - if (length > (png_uint_32)png_ptr->num_palette || - length > PNG_MAX_PALETTE_LENGTH) - { - png_warning(png_ptr, "Incorrect tRNS chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - if (length == 0) - { - png_warning(png_ptr, "Zero length tRNS chunk"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, readbuf, (png_size_t)length); - png_ptr->num_trans = (png_uint_16)length; - } - - else - { - png_warning(png_ptr, "tRNS chunk not allowed with alpha channel"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_crc_finish(png_ptr, 0)) - { - png_ptr->num_trans = 0; - return; - } - - 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_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_size_t truelen; - png_byte buf[6]; - png_color_16 background; - - png_debug(1, "in png_handle_bKGD"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before bKGD"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid bKGD after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - - else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) - { - png_warning(png_ptr, "Missing PLTE before bKGD"); - png_crc_finish(png_ptr, length); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD)) - { - png_warning(png_ptr, "Duplicate bKGD chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - truelen = 1; - - else if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) - truelen = 6; - - else - truelen = 2; - - if (length != truelen) - { - png_warning(png_ptr, "Incorrect bKGD chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, truelen); - - if (png_crc_finish(png_ptr, 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 && info_ptr->num_palette) - { - if (buf[0] >= info_ptr->num_palette) - { - png_warning(png_ptr, "Incorrect bKGD chunk index value"); - 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)) /* GRAY */ - { - background.index = 0; - background.red = - background.green = - background.blue = - background.gray = png_get_uint_16(buf); - } - - else - { - 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_hIST_SUPPORTED -void /* PRIVATE */ -png_handle_hIST(png_structp png_ptr, png_infop 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)) - png_error(png_ptr, "Missing IHDR before hIST"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid hIST after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - - else if (!(png_ptr->mode & PNG_HAVE_PLTE)) - { - png_warning(png_ptr, "Missing PLTE before hIST"); - png_crc_finish(png_ptr, length); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST)) - { - png_warning(png_ptr, "Duplicate hIST chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length > 2*PNG_MAX_PALETTE_LENGTH || - length != (unsigned int) (2*png_ptr->num_palette)) - { - png_warning(png_ptr, "Incorrect hIST chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - num = length / 2 ; - - 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)) - return; - - png_set_hIST(png_ptr, info_ptr, readbuf); -} -#endif - -#ifdef PNG_READ_pHYs_SUPPORTED -void /* PRIVATE */ -png_handle_pHYs(png_structp png_ptr, png_infop 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)) - png_error(png_ptr, "Missing IHDR before pHYs"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid pHYs after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) - { - png_warning(png_ptr, "Duplicate pHYs chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 9) - { - png_warning(png_ptr, "Incorrect pHYs chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 9); - - if (png_crc_finish(png_ptr, 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_structp png_ptr, png_infop 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)) - png_error(png_ptr, "Missing IHDR before oFFs"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid oFFs after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) - { - png_warning(png_ptr, "Duplicate oFFs chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 9) - { - png_warning(png_ptr, "Incorrect oFFs chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 9); - - if (png_crc_finish(png_ptr, 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_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_int_32 X0, X1; - png_byte type, nparams; - png_charp buf, units, endptr; - png_charpp params; - png_size_t slength; - int i; - - png_debug(1, "in png_handle_pCAL"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before pCAL"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid pCAL after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL)) - { - png_warning(png_ptr, "Duplicate pCAL chunk"); - png_crc_finish(png_ptr, length); - return; - } - - png_debug1(2, "Allocating and reading pCAL chunk data (%u bytes)", - length + 1); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); - - if (png_ptr->chunkdata == NULL) - { - png_warning(png_ptr, "No memory for pCAL purpose"); - return; - } - - slength = length; - png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); - - if (png_crc_finish(png_ptr, 0)) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - png_ptr->chunkdata[slength] = 0x00; /* Null terminate the last string */ - - png_debug(3, "Finding end of pCAL purpose string"); - for (buf = png_ptr->chunkdata; *buf; buf++) - /* Empty loop */ ; - - endptr = png_ptr->chunkdata + slength; - - /* We need to have at least 12 bytes after the purpose string - * in order to get the parameter information. - */ - if (endptr <= buf + 12) - { - png_warning(png_ptr, "Invalid pCAL data"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - 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_warning(png_ptr, "Invalid pCAL parameters for equation type"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - else if (type >= PNG_EQUATION_LAST) - { - png_warning(png_ptr, "Unrecognized equation type for pCAL chunk"); - } - - for (buf = units; *buf; buf++) - /* Empty loop to move past the units string. */ ; - - png_debug(3, "Allocating pCAL parameters array"); - - params = (png_charpp)png_malloc_warn(png_ptr, - (png_size_t)(nparams * png_sizeof(png_charp))); - - if (params == NULL) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_warning(png_ptr, "No memory for pCAL params"); - return; - } - - /* Get pointers to the start of each parameter string. */ - for (i = 0; i < (int)nparams; i++) - { - buf++; /* Skip the null string terminator from previous parameter. */ - - png_debug1(3, "Reading pCAL parameter %d", i); - - for (params[i] = buf; buf <= endptr && *buf != 0x00; buf++) - /* Empty loop to move past each parameter string */ ; - - /* Make sure we haven't run out of data yet */ - if (buf > endptr) - { - png_warning(png_ptr, "Invalid pCAL data"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_free(png_ptr, params); - return; - } - } - - png_set_pCAL(png_ptr, info_ptr, png_ptr->chunkdata, X0, X1, type, nparams, - units, params); - - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_free(png_ptr, params); -} -#endif - -#ifdef PNG_READ_sCAL_SUPPORTED -/* Read the sCAL chunk */ -void /* PRIVATE */ -png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_size_t slength, i; - int state; - - png_debug(1, "in png_handle_sCAL"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before sCAL"); - - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid sCAL after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sCAL)) - { - png_warning(png_ptr, "Duplicate sCAL chunk"); - png_crc_finish(png_ptr, length); - return; - } - - /* Need unit type, width, \0, height: minimum 4 bytes */ - else if (length < 4) - { - png_warning(png_ptr, "sCAL chunk too short"); - png_crc_finish(png_ptr, length); - return; - } - - png_debug1(2, "Allocating and reading sCAL chunk data (%u bytes)", - length + 1); - - png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); - - if (png_ptr->chunkdata == NULL) - { - png_warning(png_ptr, "Out of memory while processing sCAL chunk"); - png_crc_finish(png_ptr, length); - return; - } - - slength = length; - png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); - png_ptr->chunkdata[slength] = 0x00; /* Null terminate the last string */ - - if (png_crc_finish(png_ptr, 0)) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - /* Validate the unit. */ - if (png_ptr->chunkdata[0] != 1 && png_ptr->chunkdata[0] != 2) - { - png_warning(png_ptr, "Invalid sCAL ignored: invalid unit"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - 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_ptr->chunkdata, slength, &state, &i) || - i >= slength || png_ptr->chunkdata[i++] != 0) - png_warning(png_ptr, "Invalid sCAL chunk ignored: bad width format"); - - else if (!PNG_FP_IS_POSITIVE(state)) - png_warning(png_ptr, "Invalid sCAL chunk ignored: non-positive width"); - - else - { - png_size_t heighti = i; - - state = 0; - if (!png_check_fp_number(png_ptr->chunkdata, slength, &state, &i) || - i != slength) - png_warning(png_ptr, "Invalid sCAL chunk ignored: bad height format"); - - else if (!PNG_FP_IS_POSITIVE(state)) - png_warning(png_ptr, - "Invalid sCAL chunk ignored: non-positive height"); - - else - /* This is the (only) success case. */ - png_set_sCAL_s(png_ptr, info_ptr, png_ptr->chunkdata[0], - png_ptr->chunkdata+1, png_ptr->chunkdata+heighti); - } - - /* Clean up - just free the temporarily allocated buffer. */ - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; -} -#endif - -#ifdef PNG_READ_tIME_SUPPORTED -void /* PRIVATE */ -png_handle_tIME(png_structp png_ptr, png_infop 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)) - png_error(png_ptr, "Out of place tIME chunk"); - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME)) - { - png_warning(png_ptr, "Duplicate tIME chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_ptr->mode & PNG_HAVE_IDAT) - png_ptr->mode |= PNG_AFTER_IDAT; - - if (length != 7) - { - png_warning(png_ptr, "Incorrect tIME chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 7); - - if (png_crc_finish(png_ptr, 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_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_textp text_ptr; - png_charp key; - png_charp text; - png_uint_32 skip = 0; - png_size_t slength; - int ret; - - 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_warning(png_ptr, "No space in chunk cache for tEXt"); - png_crc_finish(png_ptr, length); - return; - } - } -#endif - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before tEXt"); - - if (png_ptr->mode & PNG_HAVE_IDAT) - png_ptr->mode |= PNG_AFTER_IDAT; - -#ifdef PNG_MAX_MALLOC_64K - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "tEXt chunk too large to fit in memory"); - skip = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; - } -#endif - - png_free(png_ptr, png_ptr->chunkdata); - - png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); - - if (png_ptr->chunkdata == NULL) - { - png_warning(png_ptr, "No memory to process text chunk"); - return; - } - - slength = length; - png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); - - if (png_crc_finish(png_ptr, skip)) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - key = png_ptr->chunkdata; - - key[slength] = 0x00; - - for (text = key; *text; text++) - /* Empty loop to find end of key */ ; - - if (text != key + slength) - text++; - - text_ptr = (png_textp)png_malloc_warn(png_ptr, - png_sizeof(png_text)); - - if (text_ptr == NULL) - { - png_warning(png_ptr, "Not enough memory to process text chunk"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - text_ptr->compression = PNG_TEXT_COMPRESSION_NONE; - text_ptr->key = key; - text_ptr->lang = NULL; - text_ptr->lang_key = NULL; - text_ptr->itxt_length = 0; - text_ptr->text = text; - text_ptr->text_length = png_strlen(text); - - ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1); - - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_free(png_ptr, text_ptr); - - if (ret) - 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_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_textp text_ptr; - png_charp text; - int comp_type; - int ret; - png_size_t slength, prefix_len, data_len; - - 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_warning(png_ptr, "No space in chunk cache for zTXt"); - png_crc_finish(png_ptr, length); - return; - } - } -#endif - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before zTXt"); - - if (png_ptr->mode & PNG_HAVE_IDAT) - png_ptr->mode |= PNG_AFTER_IDAT; - -#ifdef PNG_MAX_MALLOC_64K - /* We will no doubt have problems with chunks even half this size, but - * there is no hard and fast rule to tell us where to stop. - */ - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "zTXt chunk too large to fit in memory"); - png_crc_finish(png_ptr, length); - return; - } -#endif - - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); - - if (png_ptr->chunkdata == NULL) - { - png_warning(png_ptr, "Out of memory processing zTXt chunk"); - return; - } - - slength = length; - png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); - - if (png_crc_finish(png_ptr, 0)) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - png_ptr->chunkdata[slength] = 0x00; - - for (text = png_ptr->chunkdata; *text; text++) - /* Empty loop */ ; - - /* zTXt must have some text after the chunkdataword */ - if (text >= png_ptr->chunkdata + slength - 2) - { - png_warning(png_ptr, "Truncated zTXt chunk"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - else - { - comp_type = *(++text); - - if (comp_type != PNG_TEXT_COMPRESSION_zTXt) - { - png_warning(png_ptr, "Unknown compression type in zTXt chunk"); - comp_type = PNG_TEXT_COMPRESSION_zTXt; - } - - text++; /* Skip the compression_method byte */ - } - - prefix_len = text - png_ptr->chunkdata; - - png_decompress_chunk(png_ptr, comp_type, - (png_size_t)length, prefix_len, &data_len); - - text_ptr = (png_textp)png_malloc_warn(png_ptr, - png_sizeof(png_text)); - - if (text_ptr == NULL) - { - png_warning(png_ptr, "Not enough memory to process zTXt chunk"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - text_ptr->compression = comp_type; - text_ptr->key = png_ptr->chunkdata; - text_ptr->lang = NULL; - text_ptr->lang_key = NULL; - text_ptr->itxt_length = 0; - text_ptr->text = png_ptr->chunkdata + prefix_len; - text_ptr->text_length = data_len; - - ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1); - - png_free(png_ptr, text_ptr); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - - if (ret) - png_error(png_ptr, "Insufficient memory to store zTXt chunk"); -} -#endif - -#ifdef PNG_READ_iTXt_SUPPORTED -/* Note: this does not correctly handle chunks that are > 64K under DOS */ -void /* PRIVATE */ -png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_textp text_ptr; - png_charp key, lang, text, lang_key; - int comp_flag; - int comp_type = 0; - int ret; - png_size_t slength, prefix_len, data_len; - - 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_warning(png_ptr, "No space in chunk cache for iTXt"); - png_crc_finish(png_ptr, length); - return; - } - } -#endif - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before iTXt"); - - if (png_ptr->mode & PNG_HAVE_IDAT) - png_ptr->mode |= PNG_AFTER_IDAT; - -#ifdef PNG_MAX_MALLOC_64K - /* We will no doubt have problems with chunks even half this size, but - * there is no hard and fast rule to tell us where to stop. - */ - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "iTXt chunk too large to fit in memory"); - png_crc_finish(png_ptr, length); - return; - } -#endif - - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); - - if (png_ptr->chunkdata == NULL) - { - png_warning(png_ptr, "No memory to process iTXt chunk"); - return; - } - - slength = length; - png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); - - if (png_crc_finish(png_ptr, 0)) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - png_ptr->chunkdata[slength] = 0x00; - - for (lang = png_ptr->chunkdata; *lang; lang++) - /* Empty loop */ ; - - lang++; /* Skip NUL separator */ - - /* iTXt must have a language tag (possibly empty), two compression bytes, - * translated keyword (possibly empty), and possibly some text after the - * keyword - */ - - if (lang >= png_ptr->chunkdata + slength - 3) - { - png_warning(png_ptr, "Truncated iTXt chunk"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - else - { - comp_flag = *lang++; - comp_type = *lang++; - } - - if (comp_type || (comp_flag && comp_flag != PNG_TEXT_COMPRESSION_zTXt)) - { - png_warning(png_ptr, "Unknown iTXt compression type or method"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - for (lang_key = lang; *lang_key; lang_key++) - /* Empty loop */ ; - - lang_key++; /* Skip NUL separator */ - - if (lang_key >= png_ptr->chunkdata + slength) - { - png_warning(png_ptr, "Truncated iTXt chunk"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - for (text = lang_key; *text; text++) - /* Empty loop */ ; - - text++; /* Skip NUL separator */ - - if (text >= png_ptr->chunkdata + slength) - { - png_warning(png_ptr, "Malformed iTXt chunk"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - prefix_len = text - png_ptr->chunkdata; - - key=png_ptr->chunkdata; - - if (comp_flag) - png_decompress_chunk(png_ptr, comp_type, - (size_t)length, prefix_len, &data_len); - - else - data_len = png_strlen(png_ptr->chunkdata + prefix_len); - - text_ptr = (png_textp)png_malloc_warn(png_ptr, - png_sizeof(png_text)); - - if (text_ptr == NULL) - { - png_warning(png_ptr, "Not enough memory to process iTXt chunk"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - - text_ptr->compression = (int)comp_flag + 1; - text_ptr->lang_key = png_ptr->chunkdata + (lang_key - key); - text_ptr->lang = png_ptr->chunkdata + (lang - key); - text_ptr->itxt_length = data_len; - text_ptr->text_length = 0; - text_ptr->key = png_ptr->chunkdata; - text_ptr->text = png_ptr->chunkdata + prefix_len; - - ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1); - - png_free(png_ptr, text_ptr); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - - if (ret) - png_error(png_ptr, "Insufficient memory to store iTXt chunk"); -} -#endif - -/* This function is called when we haven't found a handler for a - * chunk. If there isn't a problem with the chunk itself (ie bad - * chunk name, CRC, or a critical chunk), the chunk is silently ignored - * -- unless the PNG_FLAG_UNKNOWN_CHUNKS_SUPPORTED flag is on in which - * case it will be saved away to be written out later. - */ -void /* PRIVATE */ -png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_uint_32 skip = 0; - - png_debug(1, "in png_handle_unknown"); - -#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 unknown chunk"); - png_crc_finish(png_ptr, length); - return; - } - } -#endif - - if (png_ptr->mode & PNG_HAVE_IDAT) - { - if (png_ptr->chunk_name != png_IDAT) - png_ptr->mode |= PNG_AFTER_IDAT; - } - - if (PNG_CHUNK_CRITICAL(png_ptr->chunk_name)) - { -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - if (png_chunk_unknown_handling(png_ptr, png_ptr->chunk_name) != - PNG_HANDLE_CHUNK_ALWAYS -#ifdef PNG_READ_USER_CHUNKS_SUPPORTED - && png_ptr->read_user_chunk_fn == NULL -#endif - ) -#endif - png_chunk_error(png_ptr, "unknown critical chunk"); - } - -#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED - if ((png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS) -#ifdef PNG_READ_USER_CHUNKS_SUPPORTED - || (png_ptr->read_user_chunk_fn != NULL) -#endif - ) - { -#ifdef PNG_MAX_MALLOC_64K - if (length > 65535) - { - png_warning(png_ptr, "unknown chunk too large to fit in memory"); - skip = length - 65535; - length = 65535; - } -#endif - - /* TODO: this code is very close to the unknown handling in pngpread.c, - * maybe it can be put into a common utility routine? - * png_struct::unknown_chunk is just used as a temporary variable, along - * with the data into which the chunk is read. These can be eliminated. - */ - PNG_CSTRING_FROM_CHUNK(png_ptr->unknown_chunk.name, png_ptr->chunk_name); - png_ptr->unknown_chunk.size = (png_size_t)length; - - if (length == 0) - png_ptr->unknown_chunk.data = NULL; - - else - { - png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, length); - png_crc_read(png_ptr, png_ptr->unknown_chunk.data, length); - } - -#ifdef PNG_READ_USER_CHUNKS_SUPPORTED - if (png_ptr->read_user_chunk_fn != NULL) - { - /* Callback to user unknown chunk handler */ - int ret; - - ret = (*(png_ptr->read_user_chunk_fn)) - (png_ptr, &png_ptr->unknown_chunk); - - if (ret < 0) - png_chunk_error(png_ptr, "error in user chunk"); - - if (ret == 0) - { - if (PNG_CHUNK_CRITICAL(png_ptr->chunk_name)) - { -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - if (png_chunk_unknown_handling(png_ptr, png_ptr->chunk_name) != - PNG_HANDLE_CHUNK_ALWAYS) -#endif - png_chunk_error(png_ptr, "unknown critical chunk"); - } - - png_set_unknown_chunks(png_ptr, info_ptr, - &png_ptr->unknown_chunk, 1); - } - } - - else -#endif - png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1); - - png_free(png_ptr, png_ptr->unknown_chunk.data); - png_ptr->unknown_chunk.data = NULL; - } - - else -#endif - skip = length; - - png_crc_finish(png_ptr, skip); - -#ifndef PNG_READ_USER_CHUNKS_SUPPORTED - PNG_UNUSED(info_ptr) /* Quiet compiler warnings about unused info_ptr */ -#endif -} - -/* 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_structp png_ptr, png_uint_32 chunk_name) -{ - int i; - - png_debug(1, "in png_check_chunk_name"); - - for (i=1; i<=4; ++i) - { - int c = chunk_name & 0xff; - - if (c < 65 || c > 122 || (c > 90 && c < 97)) - png_chunk_error(png_ptr, "invalid chunk type"); - - chunk_name >>= 8; - } -} - -/* 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_structp 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_uint_32 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) /* little-endian byte */ - end_mask = 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 png_memcpy(). A png_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 && (png_ptr->transformations & PNG_INTERLACE) && - 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), S_MASK(3,d,s), S_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 /* !PNG_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) - 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) - { - /* 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 = 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 png_memcpy there. - */ - if (bytes_to_copy < 16 /*else use png_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_uint_32p)dp; - png_const_uint_32p sp32 = (png_const_uint_32p)sp; - unsigned int 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_uint_16p)dp; - png_const_uint_16p sp16 = (png_const_uint_16p)sp; - unsigned int 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 /* PNG_ALIGN_ code */ - - /* The true default - use a png_memcpy: */ - for (;;) - { - png_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 = row_width; - } - } - - /* NOT REACHED*/ - } /* pixel_depth >= 8 */ - - /* Here if pixel_depth < 8 to check 'end_ptr' below. */ - } - else -#endif - - /* If here then the switch above wasn't used so just png_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.) - */ - png_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 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 + (png_size_t)((row_info->width - 1) >> 3); - png_bytep dp = row + (png_size_t)((final_width - 1) >> 3); - int sshift, dshift; - int s_start, s_end, s_inc; - int jstop = png_pass_inc[pass]; - png_byte v; - png_uint_32 i; - int j; - -#ifdef PNG_READ_PACKSWAP_SUPPORTED - if (transformations & PNG_PACKSWAP) - { - sshift = (int)((row_info->width + 7) & 0x07); - dshift = (int)((final_width + 7) & 0x07); - s_start = 7; - s_end = 0; - s_inc = -1; - } - - else -#endif - { - sshift = 7 - (int)((row_info->width + 7) & 0x07); - dshift = 7 - (int)((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++) - { - *dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - - else - dshift += s_inc; - } - - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - - else - 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); - int sshift, dshift; - int s_start, s_end, s_inc; - int jstop = png_pass_inc[pass]; - png_uint_32 i; - -#ifdef PNG_READ_PACKSWAP_SUPPORTED - if (transformations & PNG_PACKSWAP) - { - sshift = (int)(((row_info->width + 3) & 0x03) << 1); - dshift = (int)(((final_width + 3) & 0x03) << 1); - s_start = 6; - s_end = 0; - s_inc = -2; - } - - else -#endif - { - sshift = (int)((3 - ((row_info->width + 3) & 0x03)) << 1); - dshift = (int)((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++) - { - *dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - - else - dshift += s_inc; - } - - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - - else - sshift += s_inc; - } - break; - } - - case 4: - { - png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 1); - png_bytep dp = row + (png_size_t)((final_width - 1) >> 1); - int sshift, dshift; - int s_start, s_end, s_inc; - png_uint_32 i; - int jstop = png_pass_inc[pass]; - -#ifdef PNG_READ_PACKSWAP_SUPPORTED - if (transformations & PNG_PACKSWAP) - { - sshift = (int)(((row_info->width + 1) & 0x01) << 2); - dshift = (int)(((final_width + 1) & 0x01) << 2); - s_start = 4; - s_end = 0; - s_inc = -4; - } - - else -#endif - { - sshift = (int)((1 - ((row_info->width + 1) & 0x01)) << 2); - dshift = (int)((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++) - { - *dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - - else - dshift += s_inc; - } - - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - - else - sshift += s_inc; - } - break; - } - - default: - { - png_size_t pixel_bytes = (row_info->pixel_depth >> 3); - - png_bytep sp = row + (png_size_t)(row_info->width - 1) - * pixel_bytes; - - png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes; - - int jstop = png_pass_inc[pass]; - png_uint_32 i; - - for (i = 0; i < row_info->width; i++) - { - png_byte v[8]; - int j; - - png_memcpy(v, sp, pixel_bytes); - - for (j = 0; j < jstop; j++) - { - png_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 /* PNG_READ_INTERLACING_SUPPORTED */ - -static void -png_read_filter_row_sub(png_row_infop row_info, png_bytep row, - png_const_bytep prev_row) -{ - png_size_t i; - png_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) -{ - png_size_t i; - png_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) -{ - png_size_t i; - png_bytep rp = row; - png_const_bytep pp = prev_row; - unsigned int bpp = (row_info->pixel_depth + 7) >> 3; - png_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) -{ - 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 += 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; - - c = b; - a += *row; - *row++ = (png_byte)a; - } -} - -#ifdef PNG_ARM_NEON - -#ifdef __linux__ -#include -#include -#include - -static int png_have_hwcap(unsigned cap) -{ - FILE *f = fopen("/proc/self/auxv", "r"); - Elf32_auxv_t aux; - int have_cap = 0; - - if (!f) - return 0; - - while (fread(&aux, sizeof(aux), 1, f) > 0) - { - if (aux.a_type == AT_HWCAP && - aux.a_un.a_val & cap) - { - have_cap = 1; - break; - } - } - - fclose(f); - - return have_cap; -} -#endif /* __linux__ */ - -static void -png_init_filter_functions_neon(png_structp pp, unsigned int bpp) -{ -#ifdef __linux__ - if (!png_have_hwcap(HWCAP_NEON)) - return; -#endif - - pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up_neon; - - if (bpp == 3) - { - pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub3_neon; - pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_neon; - pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = - png_read_filter_row_paeth3_neon; - } - - else if (bpp == 4) - { - pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub4_neon; - pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg4_neon; - pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = - png_read_filter_row_paeth4_neon; - } -} -#endif /* PNG_ARM_NEON */ - -static void -png_init_filter_functions(png_structp pp) -{ - 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_ARM_NEON - png_init_filter_functions_neon(pp, bpp); -#endif -} - -void /* PRIVATE */ -png_read_filter_row(png_structp pp, png_row_infop row_info, png_bytep row, - png_const_bytep prev_row, int filter) -{ - if (pp->read_filter[0] == NULL) - png_init_filter_functions(pp); - if (filter > PNG_FILTER_VALUE_NONE && filter < PNG_FILTER_VALUE_LAST) - pp->read_filter[filter-1](row_info, row, prev_row); -} - -#ifdef PNG_SEQUENTIAL_READ_SUPPORTED -void /* PRIVATE */ -png_read_finish_row(png_structp 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[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_READ_INTERLACING_SUPPORTED */ - - png_debug(1, "in png_read_finish_row"); - png_ptr->row_number++; - if (png_ptr->row_number < png_ptr->num_rows) - return; - -#ifdef PNG_READ_INTERLACING_SUPPORTED - if (png_ptr->interlaced) - { - 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. - */ - png_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)) - { - 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; - } -#endif /* PNG_READ_INTERLACING_SUPPORTED */ - - if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) - { - char extra; - int ret; - - png_ptr->zstream.next_out = (Byte *)&extra; - png_ptr->zstream.avail_out = (uInt)1; - - for (;;) - { - if (!(png_ptr->zstream.avail_in)) - { - while (!png_ptr->idat_size) - { - png_crc_finish(png_ptr, 0); - png_ptr->idat_size = png_read_chunk_header(png_ptr); - if (png_ptr->chunk_name != png_IDAT) - png_error(png_ptr, "Not enough image data"); - } - - png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_in = png_ptr->zbuf; - - if (png_ptr->zbuf_size > png_ptr->idat_size) - png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size; - - png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zstream.avail_in); - png_ptr->idat_size -= png_ptr->zstream.avail_in; - } - - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - - if (ret == Z_STREAM_END) - { - if (!(png_ptr->zstream.avail_out) || png_ptr->zstream.avail_in || - png_ptr->idat_size) - png_warning(png_ptr, "Extra compressed data"); - - png_ptr->mode |= PNG_AFTER_IDAT; - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - break; - } - - if (ret != Z_OK) - png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg : - "Decompression Error"); - - if (!(png_ptr->zstream.avail_out)) - { - png_warning(png_ptr, "Extra compressed data"); - png_ptr->mode |= PNG_AFTER_IDAT; - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - break; - } - - } - png_ptr->zstream.avail_out = 0; - } - - if (png_ptr->idat_size || png_ptr->zstream.avail_in) - png_warning(png_ptr, "Extra compression data"); - - inflateReset(&png_ptr->zstream); - - png_ptr->mode |= PNG_AFTER_IDAT; -} -#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ - -void /* PRIVATE */ -png_read_start_row(png_structp 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[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 - - int max_pixel_depth; - png_size_t row_bytes; - - png_debug(1, "in png_read_start_row"); - png_ptr->zstream.avail_in = 0; -#ifdef PNG_READ_TRANSFORMS_SUPPORTED - png_init_read_transformations(png_ptr); -#endif -#ifdef PNG_READ_INTERLACING_SUPPORTED - if (png_ptr->interlaced) - { - if (!(png_ptr->transformations & PNG_INTERLACE)) - 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 -#endif /* PNG_READ_INTERLACING_SUPPORTED */ - { - png_ptr->num_rows = png_ptr->height; - png_ptr->iwidth = png_ptr->width; - } - - max_pixel_depth = png_ptr->pixel_depth; - - /* WARNING: * png_read_transform_info (pngrtran.c) performs a simpliar 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) && png_ptr->bit_depth < 8) - max_pixel_depth = 8; -#endif - -#ifdef PNG_READ_EXPAND_SUPPORTED - if (png_ptr->transformations & PNG_EXPAND) - { - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (png_ptr->num_trans) - 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) - max_pixel_depth *= 2; - } - - else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) - { - if (png_ptr->num_trans) - { - max_pixel_depth *= 4; - max_pixel_depth /= 3; - } - } - } -#endif - -#ifdef PNG_READ_EXPAND_16_SUPPORTED - if (png_ptr->transformations & PNG_EXPAND_16) - { -# 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) - { - 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)) - { - 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) - { - if ( -#ifdef PNG_READ_EXPAND_SUPPORTED - (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND)) || -#endif -#ifdef PNG_READ_FILLER_SUPPORTED - (png_ptr->transformations & (PNG_FILLER)) || -#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) - { - 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) >> 3); - -#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) - 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"); - - png_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); - - png_ptr->flags |= PNG_FLAG_ROW_INIT; -} -#endif /* PNG_READ_SUPPORTED */ diff --git a/Source/LibPNG/pngset.c b/Source/LibPNG/pngset.c deleted file mode 100644 index 8c07eec..0000000 --- a/Source/LibPNG/pngset.c +++ /dev/null @@ -1,1311 +0,0 @@ - -/* pngset.c - storage of image information into info struct - * - * Last changed in libpng 1.5.11 [June 14, 2012] - * Copyright (c) 1998-2012 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_structp png_ptr, png_infop info_ptr, - png_const_color_16p background) -{ - png_debug1(1, "in %s storage function", "bKGD"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - png_memcpy(&(info_ptr->background), background, png_sizeof(png_color_16)); - info_ptr->valid |= PNG_INFO_bKGD; -} -#endif - -#ifdef PNG_cHRM_SUPPORTED -void PNGFAPI -png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, - png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x, - png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y, - png_fixed_point blue_x, png_fixed_point blue_y) -{ - png_debug1(1, "in %s storage function", "cHRM fixed"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - -# ifdef PNG_CHECK_cHRM_SUPPORTED - if (png_check_cHRM_fixed(png_ptr, - white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y)) -# endif - { - info_ptr->x_white = white_x; - info_ptr->y_white = white_y; - info_ptr->x_red = red_x; - info_ptr->y_red = red_y; - info_ptr->x_green = green_x; - info_ptr->y_green = green_y; - info_ptr->x_blue = blue_x; - info_ptr->y_blue = blue_y; - info_ptr->valid |= PNG_INFO_cHRM; - } -} - -void PNGFAPI -png_set_cHRM_XYZ_fixed(png_structp png_ptr, png_infop info_ptr, - png_fixed_point int_red_X, png_fixed_point int_red_Y, - png_fixed_point int_red_Z, png_fixed_point int_green_X, - png_fixed_point int_green_Y, png_fixed_point int_green_Z, - png_fixed_point int_blue_X, png_fixed_point int_blue_Y, - png_fixed_point int_blue_Z) -{ - png_XYZ XYZ; - png_xy xy; - - png_debug1(1, "in %s storage function", "cHRM XYZ fixed"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - XYZ.redX = int_red_X; - XYZ.redY = int_red_Y; - XYZ.redZ = int_red_Z; - XYZ.greenX = int_green_X; - XYZ.greenY = int_green_Y; - XYZ.greenZ = int_green_Z; - XYZ.blueX = int_blue_X; - XYZ.blueY = int_blue_Y; - XYZ.blueZ = int_blue_Z; - - if (png_xy_from_XYZ(&xy, XYZ)) - png_error(png_ptr, "XYZ values out of representable range"); - - png_set_cHRM_fixed(png_ptr, info_ptr, xy.whitex, xy.whitey, xy.redx, xy.redy, - xy.greenx, xy.greeny, xy.bluex, xy.bluey); -} - -# ifdef PNG_FLOATING_POINT_SUPPORTED -void PNGAPI -png_set_cHRM(png_structp png_ptr, png_infop 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_structp png_ptr, png_infop 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 Red X"), - png_fixed(png_ptr, green_Y, "cHRM Red Y"), - png_fixed(png_ptr, green_Z, "cHRM Red Z"), - png_fixed(png_ptr, blue_X, "cHRM Red X"), - png_fixed(png_ptr, blue_Y, "cHRM Red Y"), - png_fixed(png_ptr, blue_Z, "cHRM Red Z")); -} -# endif /* PNG_FLOATING_POINT_SUPPORTED */ - -#endif /* PNG_cHRM_SUPPORTED */ - -#ifdef PNG_gAMA_SUPPORTED -void PNGFAPI -png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point - file_gamma) -{ - png_debug1(1, "in %s storage function", "gAMA"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - /* Changed in libpng-1.5.4 to limit the values to ensure overflow can't - * occur. Since the fixed point representation is assymetrical 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.) - */ - if (file_gamma < 16 || file_gamma > 625000000) - png_warning(png_ptr, "Out of range gamma value ignored"); - - else - { - info_ptr->gamma = file_gamma; - info_ptr->valid |= PNG_INFO_gAMA; - } -} - -# ifdef PNG_FLOATING_POINT_SUPPORTED -void PNGAPI -png_set_gAMA(png_structp png_ptr, png_infop 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_structp png_ptr, png_infop 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 - */ - png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr, - PNG_MAX_PALETTE_LENGTH * png_sizeof(png_uint_16)); - - if (png_ptr->hist == NULL) - { - png_warning(png_ptr, "Insufficient memory for hIST chunk data"); - return; - } - - for (i = 0; i < info_ptr->num_palette; i++) - png_ptr->hist[i] = hist[i]; - - info_ptr->hist = png_ptr->hist; - info_ptr->valid |= PNG_INFO_hIST; - info_ptr->free_me |= PNG_FREE_HIST; -} -#endif - -void PNGAPI -png_set_IHDR(png_structp png_ptr, png_infop 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) - info_ptr->channels = 3; - - else - info_ptr->channels = 1; - - if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) - info_ptr->channels++; - - info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth); - - /* Check for potential overflow */ - if (width > - (PNG_UINT_32_MAX >> 3) /* 8-byte RRGGBBAA pixels */ - - 48 /* bigrowbuf hack */ - - 1 /* filter byte */ - - 7*8 /* rounding of width to multiple of 8 pixels */ - - 8) /* extra max_pixel_depth pad */ - info_ptr->rowbytes = 0; - else - info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width); -} - -#ifdef PNG_oFFs_SUPPORTED -void PNGAPI -png_set_oFFs(png_structp png_ptr, png_infop 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_structp png_ptr, png_infop 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) -{ - png_size_t length; - int i; - - png_debug1(1, "in %s storage function", "pCAL"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - length = png_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_error(png_ptr, "Invalid pCAL equation type"); - - /* Validate params[nparams] */ - for (i=0; ipcal_purpose = (png_charp)png_malloc_warn(png_ptr, length); - - if (info_ptr->pcal_purpose == NULL) - { - png_warning(png_ptr, "Insufficient memory for pCAL purpose"); - return; - } - - png_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 = png_strlen(units) + 1; - png_debug1(3, "allocating units for info (%lu bytes)", - (unsigned long)length); - - info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length); - - if (info_ptr->pcal_units == NULL) - { - png_warning(png_ptr, "Insufficient memory for pCAL units"); - return; - } - - png_memcpy(info_ptr->pcal_units, units, length); - - info_ptr->pcal_params = (png_charpp)png_malloc_warn(png_ptr, - (png_size_t)((nparams + 1) * png_sizeof(png_charp))); - - if (info_ptr->pcal_params == NULL) - { - png_warning(png_ptr, "Insufficient memory for pCAL params"); - return; - } - - png_memset(info_ptr->pcal_params, 0, (nparams + 1) * png_sizeof(png_charp)); - - for (i = 0; i < nparams; i++) - { - length = png_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; - } - - png_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_structp png_ptr, png_infop info_ptr, - int unit, png_const_charp swidth, png_const_charp sheight) -{ - png_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 = png_strlen(swidth)) == 0 || - swidth[0] == 45 /* '-' */ || !png_check_fp_string(swidth, lengthw)) - png_error(png_ptr, "Invalid sCAL width"); - - if (sheight == NULL || (lengthh = png_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_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; - } - - png_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_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; - } - - png_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_structp png_ptr, png_infop 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_structp png_ptr, png_infop 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_structp png_ptr, png_infop 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_structp png_ptr, png_infop info_ptr, - png_const_colorp palette, int num_palette) -{ - - png_debug1(1, "in %s storage function", "PLTE"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - if (num_palette < 0 || num_palette > PNG_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; - } - } - - /* 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. - */ - 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 that has - * too-large sample values. - */ - png_ptr->palette = (png_colorp)png_calloc(png_ptr, - PNG_MAX_PALETTE_LENGTH * png_sizeof(png_color)); - - png_memcpy(png_ptr->palette, palette, num_palette * png_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_structp png_ptr, png_infop info_ptr, - png_const_color_8p sig_bit) -{ - png_debug1(1, "in %s storage function", "sBIT"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - png_memcpy(&(info_ptr->sig_bit), sig_bit, png_sizeof(png_color_8)); - info_ptr->valid |= PNG_INFO_sBIT; -} -#endif - -#ifdef PNG_sRGB_SUPPORTED -void PNGAPI -png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int srgb_intent) -{ - png_debug1(1, "in %s storage function", "sRGB"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->srgb_intent = (png_byte)srgb_intent; - info_ptr->valid |= PNG_INFO_sRGB; -} - -void PNGAPI -png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, - int srgb_intent) -{ - png_debug1(1, "in %s storage function", "sRGB_gAMA_and_cHRM"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - png_set_sRGB(png_ptr, info_ptr, srgb_intent); - -# ifdef PNG_gAMA_SUPPORTED - png_set_gAMA_fixed(png_ptr, info_ptr, PNG_GAMMA_sRGB_INVERSE); -# endif - -# ifdef PNG_cHRM_SUPPORTED - png_set_cHRM_fixed(png_ptr, info_ptr, - /* color x y */ - /* white */ 31270, 32900, - /* red */ 64000, 33000, - /* green */ 30000, 60000, - /* blue */ 15000, 6000 - ); -# endif /* cHRM */ -} -#endif /* sRGB */ - - -#ifdef PNG_iCCP_SUPPORTED -void PNGAPI -png_set_iCCP(png_structp png_ptr, png_infop 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; - png_size_t length; - - png_debug1(1, "in %s storage function", "iCCP"); - - if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL) - return; - - length = png_strlen(name)+1; - new_iccp_name = (png_charp)png_malloc_warn(png_ptr, length); - - if (new_iccp_name == NULL) - { - png_warning(png_ptr, "Insufficient memory to process iCCP chunk"); - return; - } - - png_memcpy(new_iccp_name, name, length); - new_iccp_profile = (png_bytep)png_malloc_warn(png_ptr, proflen); - - if (new_iccp_profile == NULL) - { - png_free (png_ptr, new_iccp_name); - png_warning(png_ptr, - "Insufficient memory to process iCCP profile"); - return; - } - - png_memcpy(new_iccp_profile, profile, (png_size_t)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; - /* Compression is always zero but is here so the API and info structure - * does not have to change if we introduce multiple compression types - */ - info_ptr->iccp_compression = (png_byte)compression_type; - info_ptr->free_me |= PNG_FREE_ICCP; - info_ptr->valid |= PNG_INFO_iCCP; -} -#endif - -#ifdef PNG_TEXT_SUPPORTED -void PNGAPI -png_set_text(png_structp png_ptr, png_infop 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) - png_error(png_ptr, "Insufficient memory to store text"); -} - -int /* PRIVATE */ -png_set_text_2(png_structp png_ptr, png_infop info_ptr, - png_const_textp text_ptr, int num_text) -{ - int i; - - png_debug1(1, "in %lx storage function", png_ptr == NULL ? "unexpected" : - (unsigned long)png_ptr->chunk_name); - - if (png_ptr == NULL || info_ptr == NULL || num_text == 0) - return(0); - - /* Make sure we have enough space in the "text" array in info_struct - * to hold all of the incoming text_ptr objects. - */ - if (info_ptr->num_text + num_text > info_ptr->max_text) - { - int old_max_text = info_ptr->max_text; - int old_num_text = info_ptr->num_text; - - if (info_ptr->text != NULL) - { - png_textp old_text; - - info_ptr->max_text = info_ptr->num_text + num_text + 8; - old_text = info_ptr->text; - - info_ptr->text = (png_textp)png_malloc_warn(png_ptr, - (png_size_t)(info_ptr->max_text * png_sizeof(png_text))); - - if (info_ptr->text == NULL) - { - /* Restore to previous condition */ - info_ptr->max_text = old_max_text; - info_ptr->text = old_text; - return(1); - } - - png_memcpy(info_ptr->text, old_text, (png_size_t)(old_max_text * - png_sizeof(png_text))); - png_free(png_ptr, old_text); - } - - else - { - info_ptr->max_text = num_text + 8; - info_ptr->num_text = 0; - info_ptr->text = (png_textp)png_malloc_warn(png_ptr, - (png_size_t)(info_ptr->max_text * png_sizeof(png_text))); - if (info_ptr->text == NULL) - { - /* Restore to previous condition */ - info_ptr->num_text = old_num_text; - info_ptr->max_text = old_max_text; - return(1); - } - info_ptr->free_me |= PNG_FREE_TEXT; - } - - png_debug1(3, "allocated %d entries for info_ptr->text", - info_ptr->max_text); - } - for (i = 0; i < num_text; i++) - { - png_size_t text_length, key_len; - png_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_warning(png_ptr, "text compression mode is out of range"); - continue; - } - - key_len = png_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 = png_strlen(text_ptr[i].lang); - - else - lang_len = 0; - - if (text_ptr[i].lang_key != NULL) - lang_key_len = png_strlen(text_ptr[i].lang_key); - - else - lang_key_len = 0; - } -# else /* PNG_iTXt_SUPPORTED */ - { - png_warning(png_ptr, "iTXt chunk not supported"); - 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 = png_strlen(text_ptr[i].text); - textp->compression = text_ptr[i].compression; - } - - textp->key = (png_charp)png_malloc_warn(png_ptr, - (png_size_t) - (key_len + text_length + lang_len + lang_key_len + 4)); - - if (textp->key == NULL) - 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); - - png_memcpy(textp->key, text_ptr[i].key,(png_size_t)(key_len)); - *(textp->key + key_len) = '\0'; - - if (text_ptr[i].compression > 0) - { - textp->lang = textp->key + key_len + 1; - png_memcpy(textp->lang, text_ptr[i].lang, lang_len); - *(textp->lang + lang_len) = '\0'; - textp->lang_key = textp->lang + lang_len + 1; - png_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) - png_memcpy(textp->text, text_ptr[i].text, - (png_size_t)(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_structp png_ptr, png_infop info_ptr, png_const_timep mod_time) -{ - png_debug1(1, "in %s storage function", "tIME"); - - if (png_ptr == NULL || info_ptr == NULL || - (png_ptr->mode & PNG_WROTE_tIME)) - 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; - } - - png_memcpy(&(info_ptr->mod_time), mod_time, png_sizeof(png_time)); - info_ptr->valid |= PNG_INFO_tIME; -} -#endif - -#ifdef PNG_tRNS_SUPPORTED -void PNGAPI -png_set_tRNS(png_structp png_ptr, png_infop 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. - */ - - png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0); - - /* Changed from num_trans to PNG_MAX_PALETTE_LENGTH in version 1.2.1 */ - png_ptr->trans_alpha = info_ptr->trans_alpha = - (png_bytep)png_malloc(png_ptr, (png_size_t)PNG_MAX_PALETTE_LENGTH); - - if (num_trans > 0 && num_trans <= PNG_MAX_PALETTE_LENGTH) - png_memcpy(info_ptr->trans_alpha, trans_alpha, (png_size_t)num_trans); - } - - if (trans_color != NULL) - { - int sample_max = (1 << info_ptr->bit_depth); - - if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY && - (int)trans_color->gray > sample_max) || - (info_ptr->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_warning(png_ptr, - "tRNS chunk has out-of-range samples for bit_depth"); - - png_memcpy(&(info_ptr->trans_color), trans_color, - png_sizeof(png_color_16)); - - 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_structp png_ptr, - png_infop 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; - int i; - - if (png_ptr == NULL || info_ptr == NULL) - return; - - np = (png_sPLT_tp)png_malloc_warn(png_ptr, - (info_ptr->splt_palettes_num + nentries) * - (png_size_t)png_sizeof(png_sPLT_t)); - - if (np == NULL) - { - png_warning(png_ptr, "No memory for sPLT palettes"); - return; - } - - png_memcpy(np, info_ptr->splt_palettes, - info_ptr->splt_palettes_num * png_sizeof(png_sPLT_t)); - - png_free(png_ptr, info_ptr->splt_palettes); - info_ptr->splt_palettes=NULL; - - for (i = 0; i < nentries; i++) - { - png_sPLT_tp to = np + info_ptr->splt_palettes_num + i; - png_const_sPLT_tp from = entries + i; - png_size_t length; - - length = png_strlen(from->name) + 1; - to->name = (png_charp)png_malloc_warn(png_ptr, length); - - if (to->name == NULL) - { - png_warning(png_ptr, - "Out of memory while processing sPLT chunk"); - continue; - } - - png_memcpy(to->name, from->name, length); - to->entries = (png_sPLT_entryp)png_malloc_warn(png_ptr, - from->nentries * png_sizeof(png_sPLT_entry)); - - if (to->entries == NULL) - { - png_warning(png_ptr, - "Out of memory while processing sPLT chunk"); - png_free(png_ptr, to->name); - to->name = NULL; - continue; - } - - png_memcpy(to->entries, from->entries, - from->nentries * png_sizeof(png_sPLT_entry)); - - to->nentries = from->nentries; - to->depth = from->depth; - } - - info_ptr->splt_palettes = np; - info_ptr->splt_palettes_num += nentries; - info_ptr->valid |= PNG_INFO_sPLT; - info_ptr->free_me |= PNG_FREE_SPLT; -} -#endif /* PNG_sPLT_SUPPORTED */ - -#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED -void PNGAPI -png_set_unknown_chunks(png_structp png_ptr, - png_infop info_ptr, png_const_unknown_chunkp unknowns, int num_unknowns) -{ - png_unknown_chunkp np; - int i; - - if (png_ptr == NULL || info_ptr == NULL || num_unknowns == 0) - return; - - np = (png_unknown_chunkp)png_malloc_warn(png_ptr, - (png_size_t)(info_ptr->unknown_chunks_num + num_unknowns) * - png_sizeof(png_unknown_chunk)); - - if (np == NULL) - { - png_warning(png_ptr, - "Out of memory while processing unknown chunk"); - return; - } - - png_memcpy(np, info_ptr->unknown_chunks, - (png_size_t)info_ptr->unknown_chunks_num * - png_sizeof(png_unknown_chunk)); - - png_free(png_ptr, info_ptr->unknown_chunks); - info_ptr->unknown_chunks = NULL; - - for (i = 0; i < num_unknowns; i++) - { - png_unknown_chunkp to = np + info_ptr->unknown_chunks_num + i; - png_const_unknown_chunkp from = unknowns + i; - - png_memcpy(to->name, from->name, png_sizeof(from->name)); - to->name[png_sizeof(to->name)-1] = '\0'; - to->size = from->size; - - /* Note our location in the read or write sequence */ - to->location = (png_byte)(png_ptr->mode & 0xff); - - if (from->size == 0) - to->data=NULL; - - else - { - to->data = (png_bytep)png_malloc_warn(png_ptr, - (png_size_t)from->size); - - if (to->data == NULL) - { - png_warning(png_ptr, - "Out of memory while processing unknown chunk"); - to->size = 0; - } - - else - png_memcpy(to->data, from->data, from->size); - } - } - - info_ptr->unknown_chunks = np; - info_ptr->unknown_chunks_num += num_unknowns; - info_ptr->free_me |= PNG_FREE_UNKN; -} - -void PNGAPI -png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr, - int chunk, int location) -{ - if (png_ptr != NULL && info_ptr != NULL && chunk >= 0 && chunk < - info_ptr->unknown_chunks_num) - info_ptr->unknown_chunks[chunk].location = (png_byte)location; -} -#endif - - -#ifdef PNG_MNG_FEATURES_SUPPORTED -png_uint_32 PNGAPI -png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features) -{ - png_debug(1, "in png_permit_mng_features"); - - if (png_ptr == NULL) - return (png_uint_32)0; - - png_ptr->mng_features_permitted = - (png_byte)(mng_features & PNG_ALL_MNG_FEATURES); - - return (png_uint_32)png_ptr->mng_features_permitted; -} -#endif - -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED -void PNGAPI -png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_const_bytep - chunk_list, int num_chunks) -{ - png_bytep new_list, p; - int i, old_num_chunks; - if (png_ptr == NULL) - return; - - if (num_chunks == 0) - { - if (keep == PNG_HANDLE_CHUNK_ALWAYS || keep == PNG_HANDLE_CHUNK_IF_SAFE) - png_ptr->flags |= PNG_FLAG_KEEP_UNKNOWN_CHUNKS; - - else - png_ptr->flags &= ~PNG_FLAG_KEEP_UNKNOWN_CHUNKS; - - if (keep == PNG_HANDLE_CHUNK_ALWAYS) - png_ptr->flags |= PNG_FLAG_KEEP_UNSAFE_CHUNKS; - - else - png_ptr->flags &= ~PNG_FLAG_KEEP_UNSAFE_CHUNKS; - - return; - } - - if (chunk_list == NULL) - return; - - old_num_chunks = png_ptr->num_chunk_list; - new_list=(png_bytep)png_malloc(png_ptr, - (png_size_t)(5*(num_chunks + old_num_chunks))); - - if (png_ptr->chunk_list != NULL) - { - png_memcpy(new_list, png_ptr->chunk_list, - (png_size_t)(5*old_num_chunks)); - png_free(png_ptr, png_ptr->chunk_list); - png_ptr->chunk_list=NULL; - } - - png_memcpy(new_list + 5*old_num_chunks, chunk_list, - (png_size_t)(5*num_chunks)); - - for (p = new_list + 5*old_num_chunks + 4, i = 0; inum_chunk_list = old_num_chunks + num_chunks; - png_ptr->chunk_list = new_list; - png_ptr->free_me |= PNG_FREE_LIST; -} -#endif - -#ifdef PNG_READ_USER_CHUNKS_SUPPORTED -void PNGAPI -png_set_read_user_chunk_fn(png_structp 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_structp png_ptr, png_infop 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 && (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) - info_ptr->valid |= PNG_INFO_IDAT; -} -#endif - -void PNGAPI -png_set_compression_buffer_size(png_structp png_ptr, png_size_t size) -{ - if (png_ptr == NULL) - return; - - png_free(png_ptr, png_ptr->zbuf); - - if (size > ZLIB_IO_MAX) - { - png_warning(png_ptr, "Attempt to set buffer size beyond max ignored"); - png_ptr->zbuf_size = ZLIB_IO_MAX; - size = ZLIB_IO_MAX; /* must fit */ - } - - else - png_ptr->zbuf_size = (uInt)size; - - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, size); - - /* The following ensures a relatively safe failure if this gets called while - * the buffer is actually in use. - */ - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = 0; - png_ptr->zstream.avail_in = 0; -} - -void PNGAPI -png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask) -{ - if (png_ptr && info_ptr) - info_ptr->valid &= ~mask; -} - - - -#ifdef PNG_SET_USER_LIMITS_SUPPORTED -/* This function was added to libpng 1.2.6 */ -void PNGAPI -png_set_user_limits (png_structp 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 0x7ffffffL. - */ - 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_structp png_ptr, - png_uint_32 user_chunk_cache_max) -{ - if (png_ptr) - 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_structp png_ptr, - png_alloc_size_t user_chunk_malloc_max) -{ - if (png_ptr) - png_ptr->user_chunk_malloc_max = user_chunk_malloc_max; -} -#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ - - -#ifdef PNG_BENIGN_ERRORS_SUPPORTED -void PNGAPI -png_set_benign_errors(png_structp png_ptr, int allowed) -{ - png_debug(1, "in png_set_benign_errors"); - - if (allowed) - png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN; - - else - png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN; -} -#endif /* PNG_BENIGN_ERRORS_SUPPORTED */ - -#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED -/* Whether to report invalid palette index; added at libng-1.5.10 - * allowed - one of 0: disable; 1: enable - */ -void PNGAPI -png_set_check_for_invalid_index(png_structp png_ptr, int allowed) -{ - png_debug(1, "in png_set_check_for_invalid_index"); - - if (allowed) - png_ptr->num_palette_max = 0; - - else - png_ptr->num_palette_max = -1; -} -#endif - -#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/Source/LibPNG/pngstruct.h b/Source/LibPNG/pngstruct.h deleted file mode 100644 index db0d4e4..0000000 --- a/Source/LibPNG/pngstruct.h +++ /dev/null @@ -1,358 +0,0 @@ - -/* pngstruct.h - header file for PNG reference library - * - * Copyright (c) 1998-2012 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.) - * - * Last changed in libpng 1.5.9 [February 18, 2012] - * - * 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. - */ -#include "zlib.h" - -struct png_struct_def -{ -#ifdef PNG_SETJMP_SUPPORTED - jmp_buf longjmp_buffer; /* used in png_error */ - png_longjmp_ptr longjmp_fn;/* setjmp non-local goto function. */ -#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 */ - - z_stream zstream; /* pointer to decompression structure (below) */ - png_bytep zbuf; /* buffer for zlib */ - uInt zbuf_size; /* size of zbuf (typically 65536) */ -#ifdef PNG_WRITE_SUPPORTED - -/* Added in 1.5.4: state to keep track of whether the zstream has been - * initialized and if so whether it is for IDAT or some other chunk. - */ -#define PNG_ZLIB_UNINITIALIZED 0 -#define PNG_ZLIB_FOR_IDAT 1 -#define PNG_ZLIB_FOR_TEXT 2 /* anything other than IDAT */ -#define PNG_ZLIB_USE_MASK 3 /* bottom two bits */ -#define PNG_ZLIB_IN_USE 4 /* a flag value */ - - png_uint_32 zlib_state; /* State of zlib initialization */ -/* End of material added at libpng 1.5.4 */ - - 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 */ -#if defined(PNG_WRITE_COMPRESSED_TEXT_SUPPORTED) || \ - defined(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 */ - - 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 */ - png_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. - * This is a pointer into big_prev_row - */ - png_bytep row_buf; /* buffer to save current (unfiltered) row. - * This is a pointer into big_row_buf - */ - png_bytep sub_row; /* buffer to save "sub" row when filtering */ - png_bytep up_row; /* buffer to save "up" row when filtering */ - png_bytep avg_row; /* buffer to save "avg" row when filtering */ - png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */ - png_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_ below ) */ - 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 */ - png_byte usr_channels; /* channels at start of write: write only */ - 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 */ - png_byte io_chunk_string[5]; - /* string name of chunk */ - -#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 /* PNG_bKGD_SUPPORTED */ - -#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 gamma; /* file gamma value */ - 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 tranformation */ -#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 */ - png_size_t save_buffer_size; /* amount of data now in save_buffer */ - png_size_t save_buffer_max; /* total size of save_buffer */ - png_size_t buffer_size; /* total amount of available input data */ - png_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 /* PNG_PROGRESSIVE_READ_SUPPORTED */ - -#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 - -#if defined(PNG_READ_QUANTIZE_SUPPORTED) || defined(PNG_hIST_SUPPORTED) - png_uint_16p hist; /* histogram */ -#endif - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - png_byte heuristic_method; /* heuristic for row filter selection */ - png_byte num_prev_filters; /* number of weights for previous rows */ - png_bytep prev_filters; /* filter type(s) of previous row(s) */ - png_uint_16p filter_weights; /* weight(s) for previous line(s) */ - png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */ - png_uint_16p filter_costs; /* relative filter calculation cost */ - png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */ -#endif - -#ifdef PNG_TIME_RFC1123_SUPPORTED - /* This is going to be unused in libpng16 and removed from libpng17 */ - char time_buffer[29]; /* String to hold RFC 1123 time text */ -#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; - png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */ -#endif - -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - int num_chunk_list; - png_bytep chunk_list; -#endif - -#ifdef PNG_READ_sRGB_SUPPORTED - /* Added in 1.5.5 to record an sRGB chunk in the png. */ - png_byte is_sRGB; -#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_UNKNOWN_CHUNKS_SUPPORTED - /* Storage for unknown chunk that the library doesn't recognize. */ - png_unknown_chunk unknown_chunk; -#endif - -/* New member added in libpng-1.2.26 */ - png_size_t old_big_row_buf_size; - -/* New member added in libpng-1.2.30 */ - png_charp chunkdata; /* buffer for reading chunk data */ - -#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; - - void (*read_filter[PNG_FILTER_VALUE_LAST-1])(png_row_infop row_info, - png_bytep row, png_const_bytep prev_row); -}; -#endif /* PNGSTRUCT_H */ diff --git a/Source/LibPNG/pngtest.c b/Source/LibPNG/pngtest.c deleted file mode 100644 index 1a06cd1..0000000 --- a/Source/LibPNG/pngtest.c +++ /dev/null @@ -1,1820 +0,0 @@ - -/* pngtest.c - a simple test program to test libpng - * - * Last changed in libpng 1.5.6 [November 3, 2011] - * Copyright (c) 1998-2011 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 "zlib.h" -#include "png.h" -/* Copied from pngpriv.h but only used in error messages below. */ -#ifndef PNG_ZBUF_SIZE -# define PNG_ZBUF_SIZE 8192 -#endif -# include -# include -# include -# 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 - -/* The code uses memcmp and memcpy on large objects (typically row pointers) so - * it is necessary to do soemthing special on certain architectures, note that - * the actual support for this was effectively removed in 1.4, so only the - * memory remains in this program: - */ -#define CVT_PTR(ptr) (ptr) -#define CVT_PTR_NOCHECK(ptr) (ptr) -#define png_memcmp memcmp -#define png_memcpy memcpy -#define png_memset memset - -/* 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"; -#endif - -static int verbose = 0; -static int strict = 0; - -int test_one_file PNGARG((PNG_CONST char *inname, PNG_CONST char *outname)); - -#ifdef __TURBOC__ -#include -#endif - -/* Defined so I can write to a file on gui/windowing platforms */ -/* #define STDERR stderr */ -#define STDERR stdout /* For DOS */ - -/* 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 - -/* 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; - -void PNGCBAPI -read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass); -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"); -} - -void PNGCBAPI -write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass); -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"); -} - - -#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED -/* Example of using user transform callback (we don't transform anything, - * but merely examine the row filters. We set this to 256 rather than - * 5 in case illegal filter values are present.) - */ -static png_uint_32 filters_used[256]; -void PNGCBAPI -count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data); -void PNGCBAPI -count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data) -{ - if (png_ptr != NULL && row_info != NULL) - ++filters_used[*(data - 1)]; -} -#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; - -void PNGCBAPI -count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data); -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 /* PNG_WRITE_USER_TRANSFORM_SUPPORTED */ - -static int wrote_question = 0; - -#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, png_size_t data_length, - png_uint_32 io_op); -void -pngtest_check_io_state(png_structp png_ptr, png_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) - png_error(png_ptr, "Bad I/O state or buffer size"); -} -#endif - -#ifndef USE_FAR_KEYWORD -static void PNGCBAPI -pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_size_t check = 0; - png_voidp io_ptr; - - /* fread() returns 0 on error, so it is OK to store this in a png_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 -} -#else -/* This is the model-independent version. Since the standard I/O library - can't handle far buffers in the medium and small models, we have to copy - the data. -*/ - -#define NEAR_BUF_SIZE 1024 -#define MIN(a,b) (a <= b ? a : b) - -static void PNGCBAPI -pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_size_t check; - png_byte *n_data; - png_FILE_p io_ptr; - - /* Check if data really is near. If so, use usual code. */ - n_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (png_FILE_p)CVT_PTR(png_get_io_ptr(png_ptr)); - if ((png_bytep)n_data == data) - { - check = fread(n_data, 1, length, io_ptr); - } - else - { - png_byte buf[NEAR_BUF_SIZE]; - png_size_t read, remaining, err; - check = 0; - remaining = length; - - do - { - read = MIN(NEAR_BUF_SIZE, remaining); - err = fread(buf, 1, 1, io_ptr); - png_memcpy(data, buf, read); /* Copy far buffer to near buffer */ - if (err != read) - break; - else - check += err; - data += read; - remaining -= read; - } - while (remaining != 0); - } - - 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 -} -#endif /* USE_FAR_KEYWORD */ - -#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. - */ -#ifndef USE_FAR_KEYWORD -static void PNGCBAPI -pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_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 -} -#else -/* This is the model-independent version. Since the standard I/O library - can't handle far buffers in the medium and small models, we have to copy - the data. -*/ - -#define NEAR_BUF_SIZE 1024 -#define MIN(a,b) (a <= b ? a : b) - -static void PNGCBAPI -pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_size_t check; - png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */ - png_FILE_p io_ptr; - - /* Check if data really is near. If so, use usual code. */ - near_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (png_FILE_p)CVT_PTR(png_get_io_ptr(png_ptr)); - - if ((png_bytep)near_data == data) - { - check = fwrite(near_data, 1, length, io_ptr); - } - - else - { - png_byte buf[NEAR_BUF_SIZE]; - png_size_t written, remaining, err; - check = 0; - remaining = length; - - do - { - written = MIN(NEAR_BUF_SIZE, remaining); - png_memcpy(buf, data, written); /* Copy far buffer to near buffer */ - err = fwrite(buf, 1, written, io_ptr); - if (err != written) - break; - else - check += err; - data += written; - remaining -= written; - } - while (remaining != 0); - } - - 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 /* USE_FAR_KEYWORD */ - -/* 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. - */ -static void PNGCBAPI -pngtest_warning(png_structp png_ptr, png_const_charp message) -{ - PNG_CONST char *name = "UNKNOWN (ERROR!)"; - char *test; - test = png_get_error_ptr(png_ptr); - - if (test == NULL) - fprintf(STDERR, "%s: libpng warning: %s\n", name, message); - - else - fprintf(STDERR, "%s: libpng warning: %s\n", test, 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) -{ - pngtest_warning(png_ptr, message); - /* We can return because png_error calls the default handler, which is - * actually OK in this case. - */ -} -#endif /* !PNG_STDIO_SUPPORTED */ -/* 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 then 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 FAR *next; -} memory_information; -typedef memory_information FAR *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, - png_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. */ - png_memset(pinfo->pointer, 0xdd, pinfo->size); - - if (verbose) - 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. */ - { - memory_infop FAR *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. */ - png_memset(ptr, 0x55, pinfo->size); - png_free_default(png_ptr, pinfo); - pinfo = NULL; - break; - } - - if (pinfo->next == NULL) - { - fprintf(STDERR, "Pointer %x not found\n", (unsigned int)ptr); - break; - } - - ppinfo = &pinfo->next; - } - } - - /* Finally free the data. */ - if (verbose) - printf("Freeing %p\n", ptr); - - png_free_default(png_ptr, ptr); - ptr = NULL; -} -#endif /* PNG_USER_MEM_SUPPORTED && PNG_DEBUG */ -/* END of code to test memory allocation/deallocation */ - - -/* Demonstration of user chunk support of the sTER and vpAg chunks */ -#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED - -/* (sTER is a public chunk not yet known by libpng. vpAg is a private -chunk used in ImageMagick to store "virtual page" size). */ - -static png_uint_32 user_chunk_data[4]; - - /* 0: sTER mode + 1 - * 1: vpAg width - * 2: vpAg height - * 3: vpAg units - */ - -static int PNGCBAPI read_user_chunk_callback(png_struct *png_ptr, - png_unknown_chunkp chunk) -{ - png_uint_32 - *my_user_chunk_data; - - /* 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; - * png_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 */ - - my_user_chunk_data=(png_uint_32 *) png_get_user_chunk_ptr(png_ptr); - my_user_chunk_data[0]=chunk->data[0]+1; - return (1); - } - - 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 */ - - my_user_chunk_data=(png_uint_32 *) png_get_user_chunk_ptr(png_ptr); - - my_user_chunk_data[1]=png_get_uint_31(png_ptr, chunk->data); - my_user_chunk_data[2]=png_get_uint_31(png_ptr, chunk->data + 4); - my_user_chunk_data[3]=(png_uint_32)chunk->data[8]; - - return (1); - -} -#endif -/* END of code to demonstrate user chunk support */ - -/* Test one file */ -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 */ - 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; -#else - png_structp write_ptr = NULL; - png_infop write_info_ptr = NULL; - png_infop write_end_info_ptr = NULL; -#endif - png_bytep row_buf; - png_uint_32 y; - png_uint_32 width, height; - int num_pass, pass; - int bit_depth, color_type; -#ifdef PNG_SETJMP_SUPPORTED -#ifdef USE_FAR_KEYWORD - jmp_buf tmp_jmpbuf; -#endif -#endif - - char inbuf[256], outbuf[256]; - - row_buf = NULL; - - 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 -#ifndef PNG_STDIO_SUPPORTED - png_set_error_fn(read_ptr, (png_voidp)inname, pngtest_error, - pngtest_warning); -#endif - -#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED - user_chunk_data[0] = 0; - user_chunk_data[1] = 0; - user_chunk_data[2] = 0; - user_chunk_data[3] = 0; - png_set_read_user_chunk_fn(read_ptr, user_chunk_data, - read_user_chunk_callback); - -#endif -#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 -#ifndef PNG_STDIO_SUPPORTED - png_set_error_fn(write_ptr, (png_voidp)inname, pngtest_error, - pngtest_warning); -#endif -#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_SETJMP_SUPPORTED - pngtest_debug("Setting jmpbuf for read struct"); -#ifdef USE_FAR_KEYWORD - if (setjmp(tmp_jmpbuf)) -#else - if (setjmp(png_jmpbuf(read_ptr))) -#endif - { - fprintf(STDERR, "%s -> %s: libpng read error\n", inname, outname); - png_free(read_ptr, row_buf); - row_buf = NULL; - png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); -#ifdef PNG_WRITE_SUPPORTED - 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 USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(read_ptr), tmp_jmpbuf, png_sizeof(jmp_buf)); -#endif - -#ifdef PNG_WRITE_SUPPORTED - pngtest_debug("Setting jmpbuf for write struct"); -#ifdef USE_FAR_KEYWORD - - if (setjmp(tmp_jmpbuf)) -#else - if (setjmp(png_jmpbuf(write_ptr))) -#endif - { - fprintf(STDERR, "%s -> %s: libpng write error\n", inname, outname); - png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); - png_destroy_info_struct(write_ptr, &write_end_info_ptr); -#ifdef PNG_WRITE_SUPPORTED - png_destroy_write_struct(&write_ptr, &write_info_ptr); -#endif - FCLOSE(fpin); - FCLOSE(fpout); - return (1); - } - -#ifdef USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(write_ptr), tmp_jmpbuf, png_sizeof(jmp_buf)); -#endif -#endif -#endif - - 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 - -#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 - - 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 - { - int i; - - for (i = 0; i<256; i++) - filters_used[i] = 0; - - png_set_read_user_transform_fn(read_ptr, count_filters); - } -#endif -#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED - zero_samples = 0; - png_set_write_user_transform_fn(write_ptr, count_zero_samples); -#endif - -#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED -# ifndef PNG_HANDLE_CHUNK_ALWAYS -# define PNG_HANDLE_CHUNK_ALWAYS 3 -# endif - png_set_keep_unknown_chunks(read_ptr, PNG_HANDLE_CHUNK_ALWAYS, - NULL, 0); -#endif -#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED -# ifndef PNG_HANDLE_CHUNK_IF_SAFE -# define PNG_HANDLE_CHUNK_IF_SAFE 2 -# endif - png_set_keep_unknown_chunks(write_ptr, PNG_HANDLE_CHUNK_IF_SAFE, - NULL, 0); -#endif - - pngtest_debug("Reading info struct"); - png_read_info(read_ptr, read_info_ptr); - - 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)) - { - png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth, -#ifdef PNG_WRITE_INTERLACING_SUPPORTED - color_type, interlace_type, compression_type, filter_type); -#else - color_type, PNG_INTERLACE_NONE, compression_type, filter_type); -#endif - } - } -#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)) - { - 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)) - 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)) - { - 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)) - 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)) - { - 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)) - 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)) - 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)) - { - png_set_bKGD(write_ptr, write_info_ptr, background); - } - } -#endif -#ifdef PNG_hIST_SUPPORTED - { - png_uint_16p hist; - - if (png_get_hIST(read_ptr, read_info_ptr, &hist)) - 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)) - { - 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)) - { - 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)) - 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)) - png_set_sBIT(write_ptr, write_info_ptr, sig_bit); - } -#endif -#ifdef PNG_sCAL_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED - { - int unit; - double scal_width, scal_height; - - if (png_get_sCAL(read_ptr, read_info_ptr, &unit, &scal_width, - &scal_height)) - { - 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)) - { - png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, - scal_height); - } - } -#endif -#endif -#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); - - if (verbose) - printf("\n Text compression=%d\n", text_ptr->compression); - - png_set_text(write_ptr, write_info_ptr, text_ptr, num_text); - } - } -#endif -#ifdef PNG_tIME_SUPPORTED - { - png_timep mod_time; - - if (png_get_tIME(read_ptr, read_info_ptr, &mod_time)) - { - png_set_tIME(write_ptr, write_info_ptr, mod_time); -#ifdef PNG_TIME_RFC1123_SUPPORTED - /* We have to use png_memcpy instead of "=" because the string - * pointed to by png_convert_to_rfc1123() gets free'ed before - * we use it. - */ - png_memcpy(tIME_string, - png_convert_to_rfc1123(read_ptr, mod_time), - png_sizeof(tIME_string)); - - tIME_string[png_sizeof(tIME_string) - 1] = '\0'; - tIME_chunk_present++; -#endif /* PNG_TIME_RFC1123_SUPPORTED */ - } - } -#endif -#ifdef PNG_tRNS_SUPPORTED - { - png_bytep trans_alpha; - int num_trans; - png_color_16p trans_color; - - if (png_get_tRNS(read_ptr, read_info_ptr, &trans_alpha, &num_trans, - &trans_color)) - { - int sample_max = (1 << bit_depth); - /* libpng doesn't reject a tRNS chunk with out-of-range samples */ - if (!((color_type == PNG_COLOR_TYPE_GRAY && - (int)trans_color->gray > 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) - { - int i; - png_set_unknown_chunks(write_ptr, write_info_ptr, unknowns, - num_unknowns); - /* Copy the locations from the read_info_ptr. The automatically - * generated locations in write_info_ptr are wrong because we - * haven't written anything yet. - */ - for (i = 0; i < num_unknowns; i++) - png_set_unknown_chunk_location(write_ptr, write_info_ptr, i, - unknowns[i].location); - } - } -#endif - -#ifdef PNG_WRITE_SUPPORTED - pngtest_debug("Writing info struct"); - -/* If we wanted, we could write info in two steps: - * png_write_info_before_PLTE(write_ptr, write_info_ptr); - */ - png_write_info(write_ptr, write_info_ptr); - -#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED - if (user_chunk_data[0] != 0) - { - png_byte png_sTER[5] = {115, 84, 69, 82, '\0'}; - - unsigned char - ster_chunk_data[1]; - - if (verbose) - fprintf(STDERR, "\n stereo mode = %lu\n", - (unsigned long)(user_chunk_data[0] - 1)); - - ster_chunk_data[0]=(unsigned char)(user_chunk_data[0] - 1); - png_write_chunk(write_ptr, png_sTER, ster_chunk_data, 1); - } - - if (user_chunk_data[1] != 0 || user_chunk_data[2] != 0) - { - png_byte png_vpAg[5] = {118, 112, 65, 103, '\0'}; - - unsigned char - vpag_chunk_data[9]; - - if (verbose) - fprintf(STDERR, " vpAg = %lu x %lu, units = %lu\n", - (unsigned long)user_chunk_data[1], - (unsigned long)user_chunk_data[2], - (unsigned long)user_chunk_data[3]); - - png_save_uint_32(vpag_chunk_data, user_chunk_data[1]); - png_save_uint_32(vpag_chunk_data + 4, user_chunk_data[2]); - vpag_chunk_data[8] = (unsigned char)(user_chunk_data[3] & 0xff); - png_write_chunk(write_ptr, png_vpAg, vpag_chunk_data, 9); - } - -#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) - num_pass = png_set_interlace_handling(read_ptr); -# ifdef PNG_WRITE_SUPPORTED - png_set_interlace_handling(write_ptr); -# endif -#else - num_pass = 1; -#endif - -#ifdef PNGTEST_TIMING - t_stop = (float)clock(); - t_misc += (t_stop - t_start); - t_start = t_stop; -#endif - for (pass = 0; pass < num_pass; pass++) - { - pngtest_debug1("Writing row data for pass %d", pass); - for (y = 0; y < 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 (%u bytes)", (unsigned long)row_buf, - 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 /* PNG_WRITE_SUPPORTED */ - -#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_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 - - 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); - png_set_text(write_ptr, write_end_info_ptr, text_ptr, num_text); - } - } -#endif -#ifdef PNG_tIME_SUPPORTED - { - png_timep mod_time; - - if (png_get_tIME(read_ptr, end_info_ptr, &mod_time)) - { - png_set_tIME(write_ptr, write_end_info_ptr, mod_time); -#ifdef PNG_TIME_RFC1123_SUPPORTED - /* We have to use png_memcpy instead of "=" because the string - pointed to by png_convert_to_rfc1123() gets free'ed before - we use it */ - png_memcpy(tIME_string, - png_convert_to_rfc1123(read_ptr, mod_time), - png_sizeof(tIME_string)); - - tIME_string[png_sizeof(tIME_string) - 1] = '\0'; - tIME_chunk_present++; -#endif /* PNG_TIME_RFC1123_SUPPORTED */ - } - } -#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) - { - int i; - png_set_unknown_chunks(write_ptr, write_end_info_ptr, unknowns, - num_unknowns); - /* Copy the locations from the read_info_ptr. The automatically - * generated locations in write_end_info_ptr are wrong because we - * haven't written the end_info yet. - */ - for (i = 0; i < num_unknowns; i++) - png_set_unknown_chunk_location(write_ptr, write_end_info_ptr, i, - unknowns[i].location); - } - } -#endif -#ifdef PNG_WRITE_SUPPORTED - png_write_end(write_ptr, write_end_info_ptr); -#endif - -#ifdef PNG_EASY_ACCESS_SUPPORTED - if (verbose) - { - 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); - - 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); - } - - for (;;) - { - png_size_t num_in, num_out; - - num_in = fread(inbuf, 1, 1, fpin); - num_out = fread(outbuf, 1, 1, fpout); - - if (num_in != num_out) - { - fprintf(STDERR, "\nFiles %s and %s are of a different size\n", - inname, outname); - - if (wrote_question == 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) - return (1); - - else - return (0); - } - - if (!num_in) - break; - - if (png_memcmp(inbuf, outbuf, num_in)) - { - fprintf(STDERR, "\nFiles %s and %s are different\n", inname, outname); - - if (wrote_question == 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) - return (1); - - else - return (0); - } - } - - 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; - - 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++; - } - - else - { - inname = argv[1]; - status_dots_requested = 0; - } - } - - if (!multiple && argc == 3 + verbose) - outname = argv[2 + verbose]; - - if ((!multiple && argc > 3 + verbose) || (multiple && 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) - { - int i; -#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG - int allocation_now = current_allocation; -#endif - for (i=2; isize, - (unsigned int)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); - - kerror = test_one_file(inname, outname); - - if (kerror == 0) - { - if (verbose == 1 || i == 2) - { -#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED - int k; -#endif -#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_READ_USER_TRANSFORM_SUPPORTED - for (k = 0; k<256; k++) - if (filters_used[k]) - fprintf(STDERR, " Filter %d was used %lu times\n", - k, (unsigned long)filters_used[k]); -#endif -#ifdef PNG_TIME_RFC1123_SUPPORTED - if (tIME_chunk_present != 0) - fprintf(STDERR, " tIME = %s\n", tIME_string); -#endif /* PNG_TIME_RFC1123_SUPPORTED */ - } - } - - else - { - if (verbose == 0 && i != 2) - fprintf(STDERR, "\n Testing %s:", inname); - - 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 %x\n", - (unsigned long)pinfo->size, (unsigned int)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"); - - return (int)(ierror != 0); -} - -/* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_5_13 Your_png_h_is_not_version_1_5_13; diff --git a/Source/LibPNG/pngtrans.c b/Source/LibPNG/pngtrans.c deleted file mode 100644 index ee60957..0000000 --- a/Source/LibPNG/pngtrans.c +++ /dev/null @@ -1,781 +0,0 @@ - -/* pngtrans.c - transforms the data in a row (used by both readers and writers) - * - * Last changed in libpng 1.5.11 [June 14, 2012] - * Copyright (c) 1998-2012 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_structp 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_structp 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_structp 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; - png_ptr->usr_bit_depth = 8; - } -} -#endif - -#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED) -/* Turn on packed pixel swapping */ -void PNGAPI -png_set_packswap(png_structp 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_structp 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_structp png_ptr) -{ - png_debug(1, "in png_set_interlace handling"); - - if (png_ptr && png_ptr->interlaced) - { - 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_structp png_ptr, png_uint_32 filler, int filler_loc) -{ - png_debug(1, "in png_set_filler"); - - if (png_ptr == NULL) - return; - - png_ptr->transformations |= PNG_FILLER; - png_ptr->filler = (png_uint_16)filler; - - if (filler_loc == PNG_FILLER_AFTER) - png_ptr->flags |= PNG_FLAG_FILLER_AFTER; - - else - png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER; - - /* This should probably go in the "do_read_filler" routine. - * I attempted to do that in libpng-1.0.1a but that caused problems - * so I restored it in libpng-1.0.2a - */ - - if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) - { - png_ptr->usr_channels = 4; - } - - /* Also I added this in libpng-1.0.2a (what happens when we expand - * a less-than-8-bit grayscale to GA?) */ - - if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY && png_ptr->bit_depth >= 8) - { - png_ptr->usr_channels = 2; - } -} - -/* Added to libpng-1.2.7 */ -void PNGAPI -png_set_add_alpha(png_structp 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); - 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_structp 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_structp 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_structp 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; - png_size_t i; - png_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; - png_size_t i; - png_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; - png_size_t i; - png_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) - { - png_byte t = *rp; - *rp = *(rp + 1); - *(rp + 1) = t; - } - } -} -#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 /* PNG_READ_PACKSWAP_SUPPORTED or PNG_WRITE_PACKSWAP_SUPPORTED */ - -#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) /* 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) /* 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) /* 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) /* 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 = 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)) - { - 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 /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */ - -#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_structp 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 = (-row_info->pixel_depth * row_info->width) & 7; - png_bytep rp = png_ptr->row_buf + row_info->rowbytes; - - switch (row_info->bit_depth) - { - case 1: - { - /* in this case, all bytes must be 0 so we don't need - * to unpack the pixels except for the rightmost one. - */ - for (; rp > png_ptr->row_buf; rp--) - { - if (*rp >> padding != 0) - png_ptr->num_palette_max = 1; - padding = 0; - } - - break; - } - - case 2: - { - for (; rp > png_ptr->row_buf; rp--) - { - int i = ((*rp >> padding) & 0x03); - - if (i > png_ptr->num_palette_max) - png_ptr->num_palette_max = i; - - i = (((*rp >> padding) >> 2) & 0x03); - - if (i > png_ptr->num_palette_max) - png_ptr->num_palette_max = i; - - i = (((*rp >> padding) >> 4) & 0x03); - - if (i > png_ptr->num_palette_max) - png_ptr->num_palette_max = i; - - i = (((*rp >> padding) >> 6) & 0x03); - - if (i > png_ptr->num_palette_max) - png_ptr->num_palette_max = i; - - padding = 0; - } - - break; - } - - case 4: - { - for (; rp > png_ptr->row_buf; rp--) - { - int i = ((*rp >> padding) & 0x0f); - - if (i > png_ptr->num_palette_max) - png_ptr->num_palette_max = i; - - i = (((*rp >> padding) >> 4) & 0x0f); - - if (i > png_ptr->num_palette_max) - png_ptr->num_palette_max = i; - - padding = 0; - } - - break; - } - - case 8: - { - for (; rp > png_ptr->row_buf; rp--) - { - if (*rp > png_ptr->num_palette_max) - png_ptr->num_palette_max = (int) *rp; - } - - break; - } - - default: - break; - } - } -} -#endif /* PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED */ - -#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_structp 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; - 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_structp png_ptr) -{ - if (png_ptr == NULL) - return (NULL); - - return ((png_voidp)png_ptr->user_transform_ptr); -} -#endif - -#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED -png_uint_32 PNGAPI -png_get_current_row_number(png_const_structp png_ptr) -{ - /* See the comments in png.h - this is the sub-image row when reading and - * 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_structp png_ptr) -{ - if (png_ptr != NULL) - return png_ptr->pass; - return 8; /* invalid */ -} -#endif /* PNG_USER_TRANSFORM_INFO_SUPPORTED */ -#endif /* PNG_READ_USER_TRANSFORM_SUPPORTED || - PNG_WRITE_USER_TRANSFORM_SUPPORTED */ -#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/Source/LibPNG/pngwio.c b/Source/LibPNG/pngwio.c deleted file mode 100644 index 95ffb34..0000000 --- a/Source/LibPNG/pngwio.c +++ /dev/null @@ -1,254 +0,0 @@ - -/* pngwio.c - functions for data output - * - * Last changed in libpng 1.5.0 [January 6, 2011] - * Copyright (c) 1998-2011 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_structp png_ptr, png_const_bytep data, png_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_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. - */ -#ifndef USE_FAR_KEYWORD -void PNGCBAPI -png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_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"); -} -#else -/* This is the model-independent version. Since the standard I/O library - * can't handle far buffers in the medium and small models, we have to copy - * the data. - */ - -#define NEAR_BUF_SIZE 1024 -#define MIN(a,b) (a <= b ? a : b) - -void PNGCBAPI -png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_uint_32 check; - png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */ - png_FILE_p io_ptr; - - if (png_ptr == NULL) - return; - - /* Check if data really is near. If so, use usual code. */ - near_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); - - if ((png_bytep)near_data == data) - { - check = fwrite(near_data, 1, length, io_ptr); - } - - else - { - png_byte buf[NEAR_BUF_SIZE]; - png_size_t written, remaining, err; - check = 0; - remaining = length; - - do - { - written = MIN(NEAR_BUF_SIZE, remaining); - png_memcpy(buf, data, written); /* Copy far buffer to near buffer */ - err = fwrite(buf, 1, written, io_ptr); - - if (err != written) - break; - - else - check += err; - - data += written; - remaining -= written; - } - while (remaining != 0); - } - - if (check != length) - png_error(png_ptr, "Write Error"); -} - -#endif -#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_structp 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_FILE_p)CVT_PTR((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_structp 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 -#endif /* PNG_WRITE_FLUSH_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"); - } -} - -#ifdef USE_FAR_KEYWORD -# ifdef _MSC_VER -void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check) -{ - void *near_ptr; - void FAR *far_ptr; - FP_OFF(near_ptr) = FP_OFF(ptr); - far_ptr = (void FAR *)near_ptr; - - if (check != 0) - if (FP_SEG(ptr) != FP_SEG(far_ptr)) - png_error(png_ptr, "segment lost in conversion"); - - return(near_ptr); -} -# else -void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check) -{ - void *near_ptr; - void FAR *far_ptr; - near_ptr = (void FAR *)ptr; - far_ptr = (void FAR *)near_ptr; - - if (check != 0) - if (far_ptr != ptr) - png_error(png_ptr, "segment lost in conversion"); - - return(near_ptr); -} -# endif -#endif -#endif /* PNG_WRITE_SUPPORTED */ diff --git a/Source/LibPNG/pngwrite.c b/Source/LibPNG/pngwrite.c deleted file mode 100644 index 2a72ad3..0000000 --- a/Source/LibPNG/pngwrite.c +++ /dev/null @@ -1,1668 +0,0 @@ - -/* pngwrite.c - general routines to write a PNG file - * - * Last changed in libpng 1.5.11 [June 14, 2012] - * Copyright (c) 1998-2012 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 - -/* 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_structp png_ptr, png_infop 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)) - { - /* Write PNG signature */ - png_write_sig(png_ptr); - -#ifdef PNG_MNG_FEATURES_SUPPORTED - if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) && \ - (png_ptr->mng_features_permitted)) - { - 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. - */ -#ifdef PNG_WRITE_gAMA_SUPPORTED - if (info_ptr->valid & PNG_INFO_gAMA) - png_write_gAMA_fixed(png_ptr, info_ptr->gamma); -#endif -#ifdef PNG_WRITE_sRGB_SUPPORTED - if (info_ptr->valid & PNG_INFO_sRGB) - png_write_sRGB(png_ptr, (int)info_ptr->srgb_intent); -#endif - -#ifdef PNG_WRITE_iCCP_SUPPORTED - if (info_ptr->valid & PNG_INFO_iCCP) - png_write_iCCP(png_ptr, info_ptr->iccp_name, PNG_COMPRESSION_TYPE_BASE, - (png_charp)info_ptr->iccp_profile, (int)info_ptr->iccp_proflen); -#endif -#ifdef PNG_WRITE_sBIT_SUPPORTED - if (info_ptr->valid & PNG_INFO_sBIT) - png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type); -#endif -#ifdef PNG_WRITE_cHRM_SUPPORTED - if (info_ptr->valid & PNG_INFO_cHRM) - png_write_cHRM_fixed(png_ptr, - info_ptr->x_white, info_ptr->y_white, - info_ptr->x_red, info_ptr->y_red, - info_ptr->x_green, info_ptr->y_green, - info_ptr->x_blue, info_ptr->y_blue); -#endif - -#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED - if (info_ptr->unknown_chunks_num) - { - png_unknown_chunk *up; - - png_debug(5, "writing extra chunks"); - - for (up = info_ptr->unknown_chunks; - up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; - up++) - { - int keep = png_handle_as_unknown(png_ptr, up->name); - - if (keep != PNG_HANDLE_CHUNK_NEVER && - up->location && - !(up->location & PNG_HAVE_PLTE) && - !(up->location & PNG_HAVE_IDAT) && - !(up->location & PNG_AFTER_IDAT) && - ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || - (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) - { - 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 - png_ptr->mode |= PNG_WROTE_INFO_BEFORE_PLTE; - } -} - -void PNGAPI -png_write_info(png_structp png_ptr, png_infop 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) - 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) - { -#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED - /* Invert the alpha channel (in tRNS) */ - if ((png_ptr->transformations & PNG_INVERT_ALPHA) && - info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - int j; - for (j = 0; j<(int)info_ptr->num_trans; j++) - info_ptr->trans_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) - png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type); -#endif - -#ifdef PNG_WRITE_hIST_SUPPORTED - if (info_ptr->valid & PNG_INFO_hIST) - 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) - 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) - 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) - 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) - 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) - { - 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) - 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); -#else - png_warning(png_ptr, "Unable to write international text"); -#endif - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; - } - - /* 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, 0, - info_ptr->text[i].compression); -#else - png_warning(png_ptr, "Unable to write compressed text"); -#endif - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; - } - - 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 - if (info_ptr->unknown_chunks_num) - { - png_unknown_chunk *up; - - png_debug(5, "writing extra chunks"); - - for (up = info_ptr->unknown_chunks; - up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; - up++) - { - int keep = png_handle_as_unknown(png_ptr, up->name); - if (keep != PNG_HANDLE_CHUNK_NEVER && - up->location && - (up->location & PNG_HAVE_PLTE) && - !(up->location & PNG_HAVE_IDAT) && - !(up->location & PNG_AFTER_IDAT) && - ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || - (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) - { - png_write_chunk(png_ptr, up->name, up->data, up->size); - } - } - } -#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_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_write_end"); - - if (png_ptr == NULL) - return; - - if (!(png_ptr->mode & PNG_HAVE_IDAT)) - 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) && - !(png_ptr->mode & PNG_WROTE_tIME)) - 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); -#else - png_warning(png_ptr, "Unable to write international text"); -#endif - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; - } - - 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, 0, - info_ptr->text[i].compression); -#else - png_warning(png_ptr, "Unable to write compressed text"); -#endif - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; - } - - 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); -#else - png_warning(png_ptr, "Unable to write uncompressed text"); -#endif - - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; - } - } -#endif -#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED - if (info_ptr->unknown_chunks_num) - { - png_unknown_chunk *up; - - png_debug(5, "writing extra chunks"); - - for (up = info_ptr->unknown_chunks; - up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; - up++) - { - int keep = png_handle_as_unknown(png_ptr, up->name); - if (keep != PNG_HANDLE_CHUNK_NEVER && - up->location && - (up->location & PNG_AFTER_IDAT) && - ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || - (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) - { - png_write_chunk(png_ptr, up->name, up->data, up->size); - } - } - } -#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 -/* "tm" structure is not supported on WindowsCE */ -void PNGAPI -png_convert_from_struct_tm(png_timep ptime, PNG_CONST struct tm FAR * 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) -{ -#ifdef PNG_USER_MEM_SUPPORTED - 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 */ -static void png_reset_filter_heuristics(png_structp png_ptr); /* forward decl */ - -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) -{ -#endif /* PNG_USER_MEM_SUPPORTED */ - volatile int png_cleanup_needed = 0; -#ifdef PNG_SETJMP_SUPPORTED - volatile -#endif - png_structp png_ptr; -#ifdef PNG_SETJMP_SUPPORTED -#ifdef USE_FAR_KEYWORD - jmp_buf tmp_jmpbuf; -#endif -#endif - - png_debug(1, "in png_create_write_struct"); - -#ifdef PNG_USER_MEM_SUPPORTED - png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG, - (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr); -#else - png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); -#endif /* PNG_USER_MEM_SUPPORTED */ - if (png_ptr == NULL) - return (NULL); - - /* Added at libpng-1.2.6 */ -#ifdef PNG_SET_USER_LIMITS_SUPPORTED - png_ptr->user_width_max = PNG_USER_WIDTH_MAX; - png_ptr->user_height_max = PNG_USER_HEIGHT_MAX; -#endif - -#ifdef PNG_SETJMP_SUPPORTED -/* Applications that neglect to set up their own setjmp() and then - * encounter a png_error() will longjmp here. Since the jmpbuf is - * then meaningless we abort instead of returning. - */ -#ifdef USE_FAR_KEYWORD - if (setjmp(tmp_jmpbuf)) -#else - if (setjmp(png_jmpbuf(png_ptr))) /* sets longjmp to match setjmp */ -#endif -#ifdef USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(png_ptr), tmp_jmpbuf, png_sizeof(jmp_buf)); -#endif - PNG_ABORT(); -#endif - -#ifdef PNG_USER_MEM_SUPPORTED - png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn); -#endif /* PNG_USER_MEM_SUPPORTED */ - png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); - - if (!png_user_version_check(png_ptr, user_png_ver)) - png_cleanup_needed = 1; - - /* Initialize zbuf - compression buffer */ - png_ptr->zbuf_size = PNG_ZBUF_SIZE; - - if (!png_cleanup_needed) - { - png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr, - png_ptr->zbuf_size); - if (png_ptr->zbuf == NULL) - png_cleanup_needed = 1; - } - - if (png_cleanup_needed) - { - /* Clean up PNG structure and deallocate any memory. */ - png_free(png_ptr, png_ptr->zbuf); - png_ptr->zbuf = NULL; -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)png_ptr, - (png_free_ptr)free_fn, (png_voidp)mem_ptr); -#else - png_destroy_struct((png_voidp)png_ptr); -#endif - return (NULL); - } - - png_set_write_fn(png_ptr, NULL, NULL, NULL); - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - png_reset_filter_heuristics(png_ptr); -#endif - - 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_structp 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_structp 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); - } - } -} - -/* Called by user to write a row of image data */ -void PNGAPI -png_write_row(png_structp 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)) - 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) - 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) - 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) - 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) - 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) - 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) - 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) - 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 && (png_ptr->transformations & PNG_INTERLACE)) - { - switch (png_ptr->pass) - { - case 0: - if (png_ptr->row_number & 0x07) - { - png_write_finish_row(png_ptr); - return; - } - break; - - case 1: - if ((png_ptr->row_number & 0x07) || 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) || 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) || png_ptr->width < 2) - { - png_write_finish_row(png_ptr); - return; - } - break; - - case 6: - if (!(png_ptr->row_number & 0x01)) - { - 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. */ - png_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)) - { - 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)) - { - png_write_finish_row(png_ptr); - return; - } - } -#endif - -#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED - /* Handle other transformations */ - if (png_ptr->transformations) - 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) && - (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_structp png_ptr, int nrows) -{ - png_debug(1, "in png_set_flush"); - - if (png_ptr == NULL) - return; - - png_ptr->flush_dist = (nrows < 0 ? 0 : nrows); -} - -/* Flush the current output buffers now */ -void PNGAPI -png_write_flush(png_structp png_ptr) -{ - int wrote_IDAT; - - 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; - - do - { - int ret; - - /* Compress the data */ - ret = deflate(&png_ptr->zstream, Z_SYNC_FLUSH); - wrote_IDAT = 0; - - /* Check for compression errors */ - if (ret != Z_OK) - { - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - - else - png_error(png_ptr, "zlib error"); - } - - if (!(png_ptr->zstream.avail_out)) - { - /* Write the IDAT and reset the zlib output buffer */ - png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); - wrote_IDAT = 1; - } - } while (wrote_IDAT == 1); - - /* If there is any data left to be output, write it into a new IDAT */ - if (png_ptr->zbuf_size != png_ptr->zstream.avail_out) - { - /* Write the IDAT and reset the zlib output buffer */ - png_write_IDAT(png_ptr, png_ptr->zbuf, - png_ptr->zbuf_size - png_ptr->zstream.avail_out); - } - png_ptr->flush_rows = 0; - png_flush(png_ptr); -} -#endif /* PNG_WRITE_FLUSH_SUPPORTED */ - -/* Free all memory used by the write */ -void PNGAPI -png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr) -{ - png_structp png_ptr = NULL; - png_infop info_ptr = NULL; -#ifdef PNG_USER_MEM_SUPPORTED - png_free_ptr free_fn = NULL; - png_voidp mem_ptr = NULL; -#endif - - png_debug(1, "in png_destroy_write_struct"); - - if (png_ptr_ptr != NULL) - png_ptr = *png_ptr_ptr; - -#ifdef PNG_USER_MEM_SUPPORTED - if (png_ptr != NULL) - { - free_fn = png_ptr->free_fn; - mem_ptr = png_ptr->mem_ptr; - } -#endif - - if (info_ptr_ptr != NULL) - info_ptr = *info_ptr_ptr; - - if (info_ptr != NULL) - { - if (png_ptr != NULL) - { - png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); - -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - if (png_ptr->num_chunk_list) - { - png_free(png_ptr, png_ptr->chunk_list); - png_ptr->num_chunk_list = 0; - } -#endif - } - -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn, - (png_voidp)mem_ptr); -#else - png_destroy_struct((png_voidp)info_ptr); -#endif - *info_ptr_ptr = NULL; - } - - if (png_ptr != NULL) - { - png_write_destroy(png_ptr); -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn, - (png_voidp)mem_ptr); -#else - png_destroy_struct((png_voidp)png_ptr); -#endif - *png_ptr_ptr = NULL; - } -} - - -/* Free any memory used in png_ptr struct (old method) */ -void /* PRIVATE */ -png_write_destroy(png_structp png_ptr) -{ -#ifdef PNG_SETJMP_SUPPORTED - jmp_buf tmp_jmp; /* Save jump buffer */ -#endif - png_error_ptr error_fn; -#ifdef PNG_WARNINGS_SUPPORTED - png_error_ptr warning_fn; -#endif - png_voidp error_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - png_free_ptr free_fn; -#endif - - png_debug(1, "in png_write_destroy"); - - /* Free any memory zlib uses */ - if (png_ptr->zlib_state != PNG_ZLIB_UNINITIALIZED) - deflateEnd(&png_ptr->zstream); - - /* Free our memory. png_free checks NULL for us. */ - png_free(png_ptr, png_ptr->zbuf); - png_free(png_ptr, png_ptr->row_buf); -#ifdef PNG_WRITE_FILTER_SUPPORTED - png_free(png_ptr, png_ptr->prev_row); - png_free(png_ptr, png_ptr->sub_row); - png_free(png_ptr, png_ptr->up_row); - png_free(png_ptr, png_ptr->avg_row); - png_free(png_ptr, png_ptr->paeth_row); -#endif - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - /* Use this to save a little code space, it doesn't free the filter_costs */ - png_reset_filter_heuristics(png_ptr); - png_free(png_ptr, png_ptr->filter_costs); - png_free(png_ptr, png_ptr->inv_filter_costs); -#endif - -#ifdef PNG_SETJMP_SUPPORTED - /* Reset structure */ - png_memcpy(tmp_jmp, png_ptr->longjmp_buffer, png_sizeof(jmp_buf)); -#endif - - error_fn = png_ptr->error_fn; -#ifdef PNG_WARNINGS_SUPPORTED - warning_fn = png_ptr->warning_fn; -#endif - error_ptr = png_ptr->error_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - free_fn = png_ptr->free_fn; -#endif - - png_memset(png_ptr, 0, png_sizeof(png_struct)); - - png_ptr->error_fn = error_fn; -#ifdef PNG_WARNINGS_SUPPORTED - png_ptr->warning_fn = warning_fn; -#endif - png_ptr->error_ptr = error_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - png_ptr->free_fn = free_fn; -#endif - -#ifdef PNG_SETJMP_SUPPORTED - png_memcpy(png_ptr->longjmp_buffer, tmp_jmp, png_sizeof(jmp_buf)); -#endif -} - -/* Allow the application to select one or more row filters to use. */ -void PNGAPI -png_set_filter(png_structp 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) && - (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_warning(png_ptr, "Unknown row filter for method 0"); -#endif /* PNG_WRITE_FILTER_SUPPORTED */ - 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_warning(png_ptr, "Unknown row filter for method 0"); -#endif /* 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 add and - * remove them after the start of compression. - */ - if (png_ptr->row_buf != NULL) - { -#ifdef PNG_WRITE_FILTER_SUPPORTED - if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL) - { - png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB; - } - - if ((png_ptr->do_filter & PNG_FILTER_UP) && png_ptr->up_row == NULL) - { - if (png_ptr->prev_row == NULL) - { - png_warning(png_ptr, "Can't add Up filter after starting"); - png_ptr->do_filter = (png_byte)(png_ptr->do_filter & - ~PNG_FILTER_UP); - } - - else - { - png_ptr->up_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->up_row[0] = PNG_FILTER_VALUE_UP; - } - } - - if ((png_ptr->do_filter & PNG_FILTER_AVG) && png_ptr->avg_row == NULL) - { - if (png_ptr->prev_row == NULL) - { - png_warning(png_ptr, "Can't add Average filter after starting"); - png_ptr->do_filter = (png_byte)(png_ptr->do_filter & - ~PNG_FILTER_AVG); - } - - else - { - png_ptr->avg_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG; - } - } - - if ((png_ptr->do_filter & PNG_FILTER_PAETH) && - png_ptr->paeth_row == NULL) - { - if (png_ptr->prev_row == NULL) - { - png_warning(png_ptr, "Can't add Paeth filter after starting"); - png_ptr->do_filter &= (png_byte)(~PNG_FILTER_PAETH); - } - - else - { - png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH; - } - } - - if (png_ptr->do_filter == PNG_NO_FILTERS) -#endif /* PNG_WRITE_FILTER_SUPPORTED */ - png_ptr->do_filter = PNG_FILTER_NONE; - } - } - else - png_error(png_ptr, "Unknown custom filter method"); -} - -/* This allows us to influence the way in which libpng chooses the "best" - * filter for the current scanline. While the "minimum-sum-of-absolute- - * differences metric is relatively fast and effective, there is some - * question as to whether it can be improved upon by trying to keep the - * filtered data going to zlib more consistent, hopefully resulting in - * better compression. - */ -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* GRR 970116 */ -/* Convenience reset API. */ -static void -png_reset_filter_heuristics(png_structp png_ptr) -{ - /* Clear out any old values in the 'weights' - this must be done because if - * the app calls set_filter_heuristics multiple times with different - * 'num_weights' values we would otherwise potentially have wrong sized - * arrays. - */ - png_ptr->num_prev_filters = 0; - png_ptr->heuristic_method = PNG_FILTER_HEURISTIC_UNWEIGHTED; - if (png_ptr->prev_filters != NULL) - { - png_bytep old = png_ptr->prev_filters; - png_ptr->prev_filters = NULL; - png_free(png_ptr, old); - } - if (png_ptr->filter_weights != NULL) - { - png_uint_16p old = png_ptr->filter_weights; - png_ptr->filter_weights = NULL; - png_free(png_ptr, old); - } - - if (png_ptr->inv_filter_weights != NULL) - { - png_uint_16p old = png_ptr->inv_filter_weights; - png_ptr->inv_filter_weights = NULL; - png_free(png_ptr, old); - } - - /* Leave the filter_costs - this array is fixed size. */ -} - -static int -png_init_filter_heuristics(png_structp png_ptr, int heuristic_method, - int num_weights) -{ - if (png_ptr == NULL) - return 0; - - /* Clear out the arrays */ - png_reset_filter_heuristics(png_ptr); - - /* Check arguments; the 'reset' function makes the correct settings for the - * unweighted case, but we must handle the weight case by initializing the - * arrays for the caller. - */ - if (heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int i; - - if (num_weights > 0) - { - png_ptr->prev_filters = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(png_sizeof(png_byte) * num_weights)); - - /* To make sure that the weighting starts out fairly */ - for (i = 0; i < num_weights; i++) - { - png_ptr->prev_filters[i] = 255; - } - - png_ptr->filter_weights = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(png_sizeof(png_uint_16) * num_weights)); - - png_ptr->inv_filter_weights = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(png_sizeof(png_uint_16) * num_weights)); - - for (i = 0; i < num_weights; i++) - { - png_ptr->inv_filter_weights[i] = - png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; - } - - /* Safe to set this now */ - png_ptr->num_prev_filters = (png_byte)num_weights; - } - - /* If, in the future, there are other filter methods, this would - * need to be based on png_ptr->filter. - */ - if (png_ptr->filter_costs == NULL) - { - png_ptr->filter_costs = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST)); - - png_ptr->inv_filter_costs = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST)); - } - - for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) - { - png_ptr->inv_filter_costs[i] = - png_ptr->filter_costs[i] = PNG_COST_FACTOR; - } - - /* All the arrays are inited, safe to set this: */ - png_ptr->heuristic_method = PNG_FILTER_HEURISTIC_WEIGHTED; - - /* Return the 'ok' code. */ - return 1; - } - else if (heuristic_method == PNG_FILTER_HEURISTIC_DEFAULT || - heuristic_method == PNG_FILTER_HEURISTIC_UNWEIGHTED) - { - return 1; - } - else - { - png_warning(png_ptr, "Unknown filter heuristic method"); - return 0; - } -} - -/* Provide floating and fixed point APIs */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -void PNGAPI -png_set_filter_heuristics(png_structp png_ptr, int heuristic_method, - int num_weights, png_const_doublep filter_weights, - png_const_doublep filter_costs) -{ - png_debug(1, "in png_set_filter_heuristics"); - - /* The internal API allocates all the arrays and ensures that the elements of - * those arrays are set to the default value. - */ - if (!png_init_filter_heuristics(png_ptr, heuristic_method, num_weights)) - return; - - /* If using the weighted method copy in the weights. */ - if (heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int i; - for (i = 0; i < num_weights; i++) - { - if (filter_weights[i] <= 0.0) - { - png_ptr->inv_filter_weights[i] = - png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; - } - - else - { - png_ptr->inv_filter_weights[i] = - (png_uint_16)(PNG_WEIGHT_FACTOR*filter_weights[i]+.5); - - png_ptr->filter_weights[i] = - (png_uint_16)(PNG_WEIGHT_FACTOR/filter_weights[i]+.5); - } - } - - /* Here is where we set the relative costs of the different filters. We - * should take the desired compression level into account when setting - * the costs, so that Paeth, for instance, has a high relative cost at low - * compression levels, while it has a lower relative cost at higher - * compression settings. The filter types are in order of increasing - * relative cost, so it would be possible to do this with an algorithm. - */ - for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) if (filter_costs[i] >= 1.0) - { - png_ptr->inv_filter_costs[i] = - (png_uint_16)(PNG_COST_FACTOR / filter_costs[i] + .5); - - png_ptr->filter_costs[i] = - (png_uint_16)(PNG_COST_FACTOR * filter_costs[i] + .5); - } - } -} -#endif /* FLOATING_POINT */ - -#ifdef PNG_FIXED_POINT_SUPPORTED -void PNGAPI -png_set_filter_heuristics_fixed(png_structp png_ptr, int heuristic_method, - int num_weights, png_const_fixed_point_p filter_weights, - png_const_fixed_point_p filter_costs) -{ - png_debug(1, "in png_set_filter_heuristics_fixed"); - - /* The internal API allocates all the arrays and ensures that the elements of - * those arrays are set to the default value. - */ - if (!png_init_filter_heuristics(png_ptr, heuristic_method, num_weights)) - return; - - /* If using the weighted method copy in the weights. */ - if (heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int i; - for (i = 0; i < num_weights; i++) - { - if (filter_weights[i] <= 0) - { - png_ptr->inv_filter_weights[i] = - png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; - } - - else - { - png_ptr->inv_filter_weights[i] = (png_uint_16) - ((PNG_WEIGHT_FACTOR*filter_weights[i]+PNG_FP_HALF)/PNG_FP_1); - - png_ptr->filter_weights[i] = (png_uint_16)((PNG_WEIGHT_FACTOR* - PNG_FP_1+(filter_weights[i]/2))/filter_weights[i]); - } - } - - /* Here is where we set the relative costs of the different filters. We - * should take the desired compression level into account when setting - * the costs, so that Paeth, for instance, has a high relative cost at low - * compression levels, while it has a lower relative cost at higher - * compression settings. The filter types are in order of increasing - * relative cost, so it would be possible to do this with an algorithm. - */ - for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) - if (filter_costs[i] >= PNG_FP_1) - { - png_uint_32 tmp; - - /* Use a 32 bit unsigned temporary here because otherwise the - * intermediate value will be a 32 bit *signed* integer (ANSI rules) - * and this will get the wrong answer on division. - */ - tmp = PNG_COST_FACTOR*PNG_FP_1 + (filter_costs[i]/2); - tmp /= filter_costs[i]; - - png_ptr->inv_filter_costs[i] = (png_uint_16)tmp; - - tmp = PNG_COST_FACTOR * filter_costs[i] + PNG_FP_HALF; - tmp /= PNG_FP_1; - - png_ptr->filter_costs[i] = (png_uint_16)tmp; - } - } -} -#endif /* FIXED_POINT */ -#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ - -void PNGAPI -png_set_compression_level(png_structp png_ptr, int level) -{ - png_debug(1, "in png_set_compression_level"); - - if (png_ptr == NULL) - return; - - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_LEVEL; - png_ptr->zlib_level = level; -} - -void PNGAPI -png_set_compression_mem_level(png_structp png_ptr, int mem_level) -{ - png_debug(1, "in png_set_compression_mem_level"); - - if (png_ptr == NULL) - return; - - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL; - png_ptr->zlib_mem_level = mem_level; -} - -void PNGAPI -png_set_compression_strategy(png_structp png_ptr, int strategy) -{ - png_debug(1, "in png_set_compression_strategy"); - - if (png_ptr == NULL) - return; - - 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_structp 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"); - - else if (window_bits < 8) - png_warning(png_ptr, "Only compression windows >= 256 supported by PNG"); - -#ifndef WBITS_8_OK - /* Avoid libpng bug with 256-byte windows */ - if (window_bits == 8) - { - png_warning(png_ptr, "Compression window is being reset to 512"); - window_bits = 9; - } - -#endif - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS; - png_ptr->zlib_window_bits = window_bits; -} - -void PNGAPI -png_set_compression_method(png_structp png_ptr, int method) -{ - png_debug(1, "in png_set_compression_method"); - - if (png_ptr == NULL) - return; - - if (method != 8) - png_warning(png_ptr, "Only compression method 8 is supported by PNG"); - - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_METHOD; - png_ptr->zlib_method = method; -} - -/* The following were added to libpng-1.5.4 */ -#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED -void PNGAPI -png_set_text_compression_level(png_structp png_ptr, int level) -{ - png_debug(1, "in png_set_text_compression_level"); - - if (png_ptr == NULL) - return; - - png_ptr->flags |= PNG_FLAG_ZTXT_CUSTOM_LEVEL; - png_ptr->zlib_text_level = level; -} - -void PNGAPI -png_set_text_compression_mem_level(png_structp png_ptr, int mem_level) -{ - png_debug(1, "in png_set_text_compression_mem_level"); - - if (png_ptr == NULL) - return; - - png_ptr->flags |= PNG_FLAG_ZTXT_CUSTOM_MEM_LEVEL; - png_ptr->zlib_text_mem_level = mem_level; -} - -void PNGAPI -png_set_text_compression_strategy(png_structp png_ptr, int strategy) -{ - png_debug(1, "in png_set_text_compression_strategy"); - - if (png_ptr == NULL) - return; - - png_ptr->flags |= PNG_FLAG_ZTXT_CUSTOM_STRATEGY; - 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_structp 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"); - - else if (window_bits < 8) - png_warning(png_ptr, "Only compression windows >= 256 supported by PNG"); - -#ifndef WBITS_8_OK - /* Avoid libpng bug with 256-byte windows */ - if (window_bits == 8) - { - png_warning(png_ptr, "Text compression window is being reset to 512"); - window_bits = 9; - } - -#endif - png_ptr->flags |= PNG_FLAG_ZTXT_CUSTOM_WINDOW_BITS; - png_ptr->zlib_text_window_bits = window_bits; -} - -void PNGAPI -png_set_text_compression_method(png_structp 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->flags |= PNG_FLAG_ZTXT_CUSTOM_METHOD; - png_ptr->zlib_text_method = method; -} -#endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */ -/* end of API added to libpng-1.5.4 */ - -void PNGAPI -png_set_write_status_fn(png_structp 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_structp 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_structp png_ptr, png_infop info_ptr, - int transforms, voidp params) -{ - if (png_ptr == NULL || info_ptr == NULL) - return; - - /* Write the file header information. */ - png_write_info(png_ptr, info_ptr); - - /* ------ these transformations don't touch the info structure ------- */ - -#ifdef PNG_WRITE_INVERT_SUPPORTED - /* Invert monochrome pixels */ - if (transforms & PNG_TRANSFORM_INVERT_MONO) - png_set_invert_mono(png_ptr); -#endif - -#ifdef PNG_WRITE_SHIFT_SUPPORTED - /* Shift the pixels up to a legal bit depth and fill in - * as appropriate to correctly scale the image. - */ - if ((transforms & PNG_TRANSFORM_SHIFT) - && (info_ptr->valid & PNG_INFO_sBIT)) - png_set_shift(png_ptr, &info_ptr->sig_bit); -#endif - -#ifdef PNG_WRITE_PACK_SUPPORTED - /* Pack pixels into bytes */ - if (transforms & PNG_TRANSFORM_PACKING) - png_set_packing(png_ptr); -#endif - -#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED - /* Swap location of alpha bytes from ARGB to RGBA */ - if (transforms & PNG_TRANSFORM_SWAP_ALPHA) - png_set_swap_alpha(png_ptr); -#endif - -#ifdef PNG_WRITE_FILLER_SUPPORTED - /* Pack XRGB/RGBX/ARGB/RGBA into RGB (4 channels -> 3 channels) */ - if (transforms & PNG_TRANSFORM_STRIP_FILLER_AFTER) - png_set_filler(png_ptr, 0, PNG_FILLER_AFTER); - - else if (transforms & PNG_TRANSFORM_STRIP_FILLER_BEFORE) - png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); -#endif - -#ifdef PNG_WRITE_BGR_SUPPORTED - /* Flip BGR pixels to RGB */ - if (transforms & PNG_TRANSFORM_BGR) - png_set_bgr(png_ptr); -#endif - -#ifdef PNG_WRITE_SWAP_SUPPORTED - /* Swap bytes of 16-bit files to most significant byte first */ - if (transforms & PNG_TRANSFORM_SWAP_ENDIAN) - png_set_swap(png_ptr); -#endif - -#ifdef PNG_WRITE_PACKSWAP_SUPPORTED - /* Swap bits of 1, 2, 4 bit packed pixel formats */ - if (transforms & PNG_TRANSFORM_PACKSWAP) - png_set_packswap(png_ptr); -#endif - -#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED - /* Invert the alpha channel from opacity to transparency */ - if (transforms & PNG_TRANSFORM_INVERT_ALPHA) - png_set_invert_alpha(png_ptr); -#endif - - /* ----------------------- end of transformations ------------------- */ - - /* Write the bits */ - if (info_ptr->valid & PNG_INFO_IDAT) - 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(transforms) /* Quiet compiler warnings */ - PNG_UNUSED(params) -} -#endif -#endif /* PNG_WRITE_SUPPORTED */ diff --git a/Source/LibPNG/pngwtran.c b/Source/LibPNG/pngwtran.c deleted file mode 100644 index 7435813..0000000 --- a/Source/LibPNG/pngwtran.c +++ /dev/null @@ -1,645 +0,0 @@ - -/* pngwtran.c - transforms the data in a row for PNG writers - * - * Last changed in libpng 1.5.13 [September 27, 2012] - * Copyright (c) 1998-2012 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 -/* Transform the data according to the user's wishes. The order of - * transformations is significant. - */ -void /* PRIVATE */ -png_do_write_transformations(png_structp 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) - 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 */ - /* png_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) - { - if (png_ptr->color_type & (PNG_COLOR_MASK_ALPHA|PNG_COLOR_MASK_PALETTE)) - { - /* GA, RGBA or palette; in any of these cases libpng will not do the - * the correct thing (whatever that might be). - */ - png_warning(png_ptr, "incorrect png_set_filler call ignored"); - png_ptr->transformations &= ~PNG_FILLER; - } - - else - 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) - png_do_packswap(row_info, png_ptr->row_buf + 1); -#endif - -#ifdef PNG_WRITE_PACK_SUPPORTED - if (png_ptr->transformations & PNG_PACK) - png_do_pack(row_info, png_ptr->row_buf + 1, - (png_uint_32)png_ptr->bit_depth); -#endif - -#ifdef PNG_WRITE_SWAP_SUPPORTED - if (png_ptr->transformations & PNG_SWAP_BYTES) - png_do_swap(row_info, png_ptr->row_buf + 1); -#endif - -#ifdef PNG_WRITE_SHIFT_SUPPORTED - if (png_ptr->transformations & PNG_SHIFT) - 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) - 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) - png_do_write_invert_alpha(row_info, png_ptr->row_buf + 1); -#endif - -#ifdef PNG_WRITE_BGR_SUPPORTED - if (png_ptr->transformations & PNG_BGR) - png_do_bgr(row_info, png_ptr->row_buf + 1); -#endif - -#ifdef PNG_WRITE_INVERT_SUPPORTED - if (png_ptr->transformations & PNG_INVERT_MONO) - png_do_invert(row_info, png_ptr->row_buf + 1); -#endif -} - -#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). - */ -void /* PRIVATE */ -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; - int shift, 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; - int shift, 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. - */ -void /* PRIVATE */ -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]; - int channels = 0; - - if (row_info->color_type & PNG_COLOR_MASK_COLOR) - { - 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) - { - 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; - png_size_t i; - png_byte mask; - png_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++) - { - png_uint_16 v; - int j; - - v = *bp; - *bp = 0; - - for (j = shift_start[0]; j > -shift_dec[0]; j -= shift_dec[0]) - { - if (j > 0) - *bp |= (png_byte)((v << j) & 0xff); - - else - *bp |= (png_byte)((v >> (-j)) & mask); - } - } - } - - 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++) - { - - png_uint_16 v; - int j; - int c = (int)(i%channels); - - v = *bp; - *bp = 0; - - for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) - { - if (j > 0) - *bp |= (png_byte)((v << j) & 0xff); - - else - *bp |= (png_byte)((v >> (-j)) & 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++) - { - int c = (int)(i%channels); - png_uint_16 value, v; - int j; - - v = (png_uint_16)(((png_uint_16)(*bp) << 8) + *(bp + 1)); - value = 0; - - for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) - { - if (j > 0) - value |= (png_uint_16)((v << j) & (png_uint_16)0xffff); - - else - value |= (png_uint_16)((v >> (-j)) & (png_uint_16)0xffff); - } - *bp++ = (png_byte)(value >> 8); - *bp++ = (png_byte)(value & 0xff); - } - } - } -} -#endif - -#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED -void /* PRIVATE */ -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 /* PNG_WRITE_16BIT_SUPPORTED */ - } - - 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 /* PNG_WRITE_16BIT_SUPPORTED */ - } - } -} -#endif - -#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED -void /* PRIVATE */ -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 /* PNG_WRITE_16BIT_SUPPORTED */ - } - - 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 /* PNG_WRITE_16BIT_SUPPORTED */ - } - } -} -#endif -#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */ - -#ifdef PNG_MNG_FEATURES_SUPPORTED -/* Undoes intrapixel differencing */ -void /* PRIVATE */ -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)) - { - 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)) & 0xff); - *(rp + 2) = (png_byte)((*(rp + 2) - *(rp + 1)) & 0xff); - } - } - -#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 = (*(rp ) << 8) | *(rp + 1); - png_uint_32 s1 = (*(rp + 2) << 8) | *(rp + 3); - png_uint_32 s2 = (*(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) & 0xff); - *(rp + 1) = (png_byte)(red & 0xff); - *(rp + 4) = (png_byte)((blue >> 8) & 0xff); - *(rp + 5) = (png_byte)(blue & 0xff); - } - } -#endif /* PNG_WRITE_16BIT_SUPPORTED */ - } -} -#endif /* PNG_MNG_FEATURES_SUPPORTED */ -#endif /* PNG_WRITE_SUPPORTED */ diff --git a/Source/LibPNG/pngwutil.c b/Source/LibPNG/pngwutil.c deleted file mode 100644 index 19b75af..0000000 --- a/Source/LibPNG/pngwutil.c +++ /dev/null @@ -1,3180 +0,0 @@ - -/* pngwutil.c - utilities to write a PNG file - * - * Last changed in libpng 1.5.10 [March 8, 2012] - * Copyright (c) 1998-2012 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) & 0xff); - buf[1] = (png_byte)((i >> 16) & 0xff); - buf[2] = (png_byte)((i >> 8) & 0xff); - buf[3] = (png_byte)(i & 0xff); -} - -#ifdef PNG_SAVE_INT_32_SUPPORTED -/* The png_save_int_32 function assumes integers are stored in two's - * complement format. If this isn't the case, then this routine needs to - * be modified to write data in two's complement format. Note that, - * the following works correctly even if png_int_32 has more than 32 bits - * (compare the more complex code required on read for sign extention.) - */ -void PNGAPI -png_save_int_32(png_bytep buf, png_int_32 i) -{ - buf[0] = (png_byte)((i >> 24) & 0xff); - buf[1] = (png_byte)((i >> 16) & 0xff); - buf[2] = (png_byte)((i >> 8) & 0xff); - buf[3] = (png_byte)(i & 0xff); -} -#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. - */ -void PNGAPI -png_save_uint_16(png_bytep buf, unsigned int i) -{ - buf[0] = (png_byte)((i >> 8) & 0xff); - buf[1] = (png_byte)(i & 0xff); -} -#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_structp 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], - (png_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_structp 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_structp 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_structp png_ptr, png_const_bytep data, - png_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 that 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_structp 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, (png_size_t)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_structp png_ptr, png_uint_32 chunk_name, - png_const_bytep data, png_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_32_MAX) - png_error(png_ptr, "length exceeds PNG maxima"); - - 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_structp png_ptr, png_const_bytep chunk_string, - png_const_bytep data, png_size_t length) -{ - png_write_complete_chunk(png_ptr, PNG_CHUNK_FROM_STRING(chunk_string), data, - length); -} - -/* Initialize the compressor for the appropriate type of compression. */ -static void -png_zlib_claim(png_structp png_ptr, png_uint_32 state) -{ - if (!(png_ptr->zlib_state & PNG_ZLIB_IN_USE)) - { - /* If already initialized for 'state' do not re-init. */ - if (png_ptr->zlib_state != state) - { - int ret = Z_OK; - png_const_charp who = "-"; - - /* If actually initialized for another state do a deflateEnd. */ - if (png_ptr->zlib_state != PNG_ZLIB_UNINITIALIZED) - { - ret = deflateEnd(&png_ptr->zstream); - who = "end"; - png_ptr->zlib_state = PNG_ZLIB_UNINITIALIZED; - } - - /* zlib itself detects an incomplete state on deflateEnd */ - if (ret == Z_OK) switch (state) - { -# ifdef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED - case PNG_ZLIB_FOR_TEXT: - ret = deflateInit2(&png_ptr->zstream, - png_ptr->zlib_text_level, png_ptr->zlib_text_method, - png_ptr->zlib_text_window_bits, - png_ptr->zlib_text_mem_level, png_ptr->zlib_text_strategy); - who = "text"; - break; -# endif - - case PNG_ZLIB_FOR_IDAT: - ret = deflateInit2(&png_ptr->zstream, png_ptr->zlib_level, - png_ptr->zlib_method, png_ptr->zlib_window_bits, - png_ptr->zlib_mem_level, png_ptr->zlib_strategy); - who = "IDAT"; - break; - - default: - png_error(png_ptr, "invalid zlib state"); - } - - if (ret == Z_OK) - png_ptr->zlib_state = state; - - else /* an error in deflateEnd or deflateInit2 */ - { - size_t pos = 0; - char msg[64]; - - pos = png_safecat(msg, sizeof msg, pos, - "zlib failed to initialize compressor ("); - pos = png_safecat(msg, sizeof msg, pos, who); - - switch (ret) - { - case Z_VERSION_ERROR: - pos = png_safecat(msg, sizeof msg, pos, ") version error"); - break; - - case Z_STREAM_ERROR: - pos = png_safecat(msg, sizeof msg, pos, ") stream error"); - break; - - case Z_MEM_ERROR: - pos = png_safecat(msg, sizeof msg, pos, ") memory error"); - break; - - default: - pos = png_safecat(msg, sizeof msg, pos, ") unknown error"); - break; - } - - png_error(png_ptr, msg); - } - } - - /* Here on success, claim the zstream: */ - png_ptr->zlib_state |= PNG_ZLIB_IN_USE; - } - - else - png_error(png_ptr, "zstream already in use (internal error)"); -} - -/* The opposite: release the stream. It is also reset, this API will warn on - * error but will not fail. - */ -static void -png_zlib_release(png_structp png_ptr) -{ - if (png_ptr->zlib_state & PNG_ZLIB_IN_USE) - { - int ret = deflateReset(&png_ptr->zstream); - - png_ptr->zlib_state &= ~PNG_ZLIB_IN_USE; - - if (ret != Z_OK) - { - png_const_charp err; - PNG_WARNING_PARAMETERS(p) - - switch (ret) - { - case Z_VERSION_ERROR: - err = "version"; - break; - - case Z_STREAM_ERROR: - err = "stream"; - break; - - case Z_MEM_ERROR: - err = "memory"; - break; - - default: - err = "unknown"; - break; - } - - png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_d, ret); - png_warning_parameter(p, 2, err); - - if (png_ptr->zstream.msg) - err = png_ptr->zstream.msg; - else - err = "[no zlib message]"; - - png_warning_parameter(p, 3, err); - - png_formatted_warning(png_ptr, p, - "zlib failed to reset compressor: @1(@2): @3"); - } - } - - else - png_warning(png_ptr, "zstream not in use (internal error)"); -} - -#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 in order to make the whole mess thread-safe. - */ - -typedef struct -{ - png_const_bytep input; /* The uncompressed input data */ - png_size_t input_len; /* Its length */ - int num_output_ptr; /* Number of output pointers used */ - int max_output_ptr; /* Size of output_ptr */ - png_bytep *output_ptr; /* Array of pointers to output */ -} compression_state; - -/* Compress given text into storage in the png_ptr structure */ -static int /* PRIVATE */ -png_text_compress(png_structp png_ptr, - png_const_charp text, png_size_t text_len, int compression, - compression_state *comp) -{ - int ret; - - comp->num_output_ptr = 0; - comp->max_output_ptr = 0; - comp->output_ptr = NULL; - comp->input = NULL; - comp->input_len = text_len; - - /* We may just want to pass the text right through */ - if (compression == PNG_TEXT_COMPRESSION_NONE) - { - comp->input = (png_const_bytep)text; - return((int)text_len); - } - - if (compression >= PNG_TEXT_COMPRESSION_LAST) - { - PNG_WARNING_PARAMETERS(p) - - png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_d, - compression); - png_formatted_warning(png_ptr, p, "Unknown compression type @1"); - } - - /* We can't write the chunk until we find out how much data we have, - * which means we need to run the compressor first and save the - * output. This shouldn't be a problem, as the vast majority of - * comments should be reasonable, but we will set up an array of - * malloc'd pointers to be sure. - * - * If we knew the application was well behaved, we could simplify this - * greatly by assuming we can always malloc an output buffer large - * enough to hold the compressed text ((1001 * text_len / 1000) + 12) - * and malloc this directly. The only time this would be a bad idea is - * if we can't malloc more than 64K and we have 64K of random input - * data, or if the input string is incredibly large (although this - * wouldn't cause a failure, just a slowdown due to swapping). - */ - png_zlib_claim(png_ptr, PNG_ZLIB_FOR_TEXT); - - /* Set up the compression buffers */ - /* TODO: the following cast hides a potential overflow problem. */ - png_ptr->zstream.avail_in = (uInt)text_len; - - /* NOTE: assume zlib doesn't overwrite the input */ - png_ptr->zstream.next_in = (Bytef *)text; - png_ptr->zstream.avail_out = png_ptr->zbuf_size; - png_ptr->zstream.next_out = png_ptr->zbuf; - - /* This is the same compression loop as in png_write_row() */ - do - { - /* Compress the data */ - ret = deflate(&png_ptr->zstream, Z_NO_FLUSH); - - if (ret != Z_OK) - { - /* Error */ - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - - else - png_error(png_ptr, "zlib error"); - } - - /* Check to see if we need more room */ - if (!(png_ptr->zstream.avail_out)) - { - /* Make sure the output array has room */ - if (comp->num_output_ptr >= comp->max_output_ptr) - { - int old_max; - - old_max = comp->max_output_ptr; - comp->max_output_ptr = comp->num_output_ptr + 4; - if (comp->output_ptr != NULL) - { - png_bytepp old_ptr; - - old_ptr = comp->output_ptr; - - comp->output_ptr = (png_bytepp)png_malloc(png_ptr, - (png_alloc_size_t) - (comp->max_output_ptr * png_sizeof(png_charpp))); - - png_memcpy(comp->output_ptr, old_ptr, old_max - * png_sizeof(png_charp)); - - png_free(png_ptr, old_ptr); - } - else - comp->output_ptr = (png_bytepp)png_malloc(png_ptr, - (png_alloc_size_t) - (comp->max_output_ptr * png_sizeof(png_charp))); - } - - /* Save the data */ - comp->output_ptr[comp->num_output_ptr] = - (png_bytep)png_malloc(png_ptr, - (png_alloc_size_t)png_ptr->zbuf_size); - - png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf, - png_ptr->zbuf_size); - - comp->num_output_ptr++; - - /* and reset the buffer */ - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_out = png_ptr->zbuf; - } - /* Continue until we don't have any more to compress */ - } while (png_ptr->zstream.avail_in); - - /* Finish the compression */ - do - { - /* Tell zlib we are finished */ - ret = deflate(&png_ptr->zstream, Z_FINISH); - - if (ret == Z_OK) - { - /* Check to see if we need more room */ - if (!(png_ptr->zstream.avail_out)) - { - /* Check to make sure our output array has room */ - if (comp->num_output_ptr >= comp->max_output_ptr) - { - int old_max; - - old_max = comp->max_output_ptr; - comp->max_output_ptr = comp->num_output_ptr + 4; - if (comp->output_ptr != NULL) - { - png_bytepp old_ptr; - - old_ptr = comp->output_ptr; - - /* This could be optimized to realloc() */ - comp->output_ptr = (png_bytepp)png_malloc(png_ptr, - (png_alloc_size_t)(comp->max_output_ptr * - png_sizeof(png_charp))); - - png_memcpy(comp->output_ptr, old_ptr, - old_max * png_sizeof(png_charp)); - - png_free(png_ptr, old_ptr); - } - - else - comp->output_ptr = (png_bytepp)png_malloc(png_ptr, - (png_alloc_size_t)(comp->max_output_ptr * - png_sizeof(png_charp))); - } - - /* Save the data */ - comp->output_ptr[comp->num_output_ptr] = - (png_bytep)png_malloc(png_ptr, - (png_alloc_size_t)png_ptr->zbuf_size); - - png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf, - png_ptr->zbuf_size); - - comp->num_output_ptr++; - - /* and reset the buffer pointers */ - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_out = png_ptr->zbuf; - } - } - else if (ret != Z_STREAM_END) - { - /* We got an error */ - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - - else - png_error(png_ptr, "zlib error"); - } - } while (ret != Z_STREAM_END); - - /* Text length is number of buffers plus last buffer */ - text_len = png_ptr->zbuf_size * comp->num_output_ptr; - - if (png_ptr->zstream.avail_out < png_ptr->zbuf_size) - text_len += png_ptr->zbuf_size - (png_size_t)png_ptr->zstream.avail_out; - - return((int)text_len); -} - -/* Ship the compressed text out via chunk writes */ -static void /* PRIVATE */ -png_write_compressed_data_out(png_structp png_ptr, compression_state *comp, - png_size_t data_len) -{ - int i; - - /* Handle the no-compression case */ - if (comp->input) - { - png_write_chunk_data(png_ptr, comp->input, data_len); - - return; - } - -#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED - /* The zbuf_size test is because the code below doesn't work if zbuf_size is - * '1'; simply skip it to avoid memory overwrite. - */ - if (data_len >= 2 && comp->input_len < 16384 && png_ptr->zbuf_size > 1) - { - unsigned int z_cmf; /* zlib compression method and flags */ - - /* Optimize the CMF field in the zlib stream. This hack of the zlib - * stream is compliant to the stream specification. - */ - - if (comp->num_output_ptr) - z_cmf = comp->output_ptr[0][0]; - else - z_cmf = png_ptr->zbuf[0]; - - if ((z_cmf & 0x0f) == 8 && (z_cmf & 0xf0) <= 0x70) - { - unsigned int z_cinfo; - unsigned int half_z_window_size; - png_size_t uncompressed_text_size = comp->input_len; - - z_cinfo = z_cmf >> 4; - half_z_window_size = 1 << (z_cinfo + 7); - - while (uncompressed_text_size <= half_z_window_size && - half_z_window_size >= 256) - { - z_cinfo--; - half_z_window_size >>= 1; - } - - z_cmf = (z_cmf & 0x0f) | (z_cinfo << 4); - - if (comp->num_output_ptr) - { - - if (comp->output_ptr[0][0] != z_cmf) - { - int tmp; - - comp->output_ptr[0][0] = (png_byte)z_cmf; - tmp = comp->output_ptr[0][1] & 0xe0; - tmp += 0x1f - ((z_cmf << 8) + tmp) % 0x1f; - comp->output_ptr[0][1] = (png_byte)tmp; - } - } - else - { - int tmp; - - png_ptr->zbuf[0] = (png_byte)z_cmf; - tmp = png_ptr->zbuf[1] & 0xe0; - tmp += 0x1f - ((z_cmf << 8) + tmp) % 0x1f; - png_ptr->zbuf[1] = (png_byte)tmp; - } - } - - else - png_error(png_ptr, - "Invalid zlib compression method or flags in non-IDAT chunk"); - } -#endif /* PNG_WRITE_OPTIMIZE_CMF_SUPPORTED */ - - /* Write saved output buffers, if any */ - for (i = 0; i < comp->num_output_ptr; i++) - { - png_write_chunk_data(png_ptr, comp->output_ptr[i], - (png_size_t)png_ptr->zbuf_size); - - png_free(png_ptr, comp->output_ptr[i]); - } - - if (comp->max_output_ptr != 0) - png_free(png_ptr, comp->output_ptr); - - /* Write anything left in zbuf */ - if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size) - png_write_chunk_data(png_ptr, png_ptr->zbuf, - (png_size_t)(png_ptr->zbuf_size - png_ptr->zstream.avail_out)); - - /* Reset zlib for another zTXt/iTXt or image data */ - png_zlib_release(png_ptr); -} -#endif /* PNG_WRITE_COMPRESSED_TEXT_SUPPORTED */ - -/* 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_structp 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 */ - - 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: -#ifdef PNG_WRITE_16BIT_SUPPORTED - if (bit_depth != 8 && bit_depth != 16) -#else - if (bit_depth != 8) -#endif - 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: - if (bit_depth != 8 && bit_depth != 16) - png_error(png_ptr, "Invalid bit depth for grayscale+alpha image"); - - png_ptr->channels = 2; - break; - - case PNG_COLOR_TYPE_RGB_ALPHA: -#ifdef PNG_WRITE_16BIT_SUPPORTED - if (bit_depth != 8 && bit_depth != 16) -#else - if (bit_depth != 8) -#endif - 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) && - ((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 relevent 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, (png_size_t)13); - - /* Initialize zlib with PNG info */ - png_ptr->zstream.zalloc = png_zalloc; - png_ptr->zstream.zfree = png_zfree; - png_ptr->zstream.opaque = (voidpf)png_ptr; - - if (!(png_ptr->do_filter)) - { - 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; - } - - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY)) - { - if (png_ptr->do_filter != PNG_FILTER_NONE) - png_ptr->zlib_strategy = Z_FILTERED; - - else - png_ptr->zlib_strategy = Z_DEFAULT_STRATEGY; - } - - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_LEVEL)) - png_ptr->zlib_level = Z_DEFAULT_COMPRESSION; - - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL)) - png_ptr->zlib_mem_level = 8; - - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS)) - png_ptr->zlib_window_bits = 15; - - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_METHOD)) - png_ptr->zlib_method = 8; - -#ifdef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED -#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED - if (!(png_ptr->flags & PNG_FLAG_ZTXT_CUSTOM_STRATEGY)) - png_ptr->zlib_text_strategy = Z_DEFAULT_STRATEGY; - - if (!(png_ptr->flags & PNG_FLAG_ZTXT_CUSTOM_LEVEL)) - png_ptr->zlib_text_level = png_ptr->zlib_level; - - if (!(png_ptr->flags & PNG_FLAG_ZTXT_CUSTOM_MEM_LEVEL)) - png_ptr->zlib_text_mem_level = png_ptr->zlib_mem_level; - - if (!(png_ptr->flags & PNG_FLAG_ZTXT_CUSTOM_WINDOW_BITS)) - png_ptr->zlib_text_window_bits = png_ptr->zlib_window_bits; - - if (!(png_ptr->flags & PNG_FLAG_ZTXT_CUSTOM_METHOD)) - png_ptr->zlib_text_method = png_ptr->zlib_method; -#else - png_ptr->zlib_text_strategy = Z_DEFAULT_STRATEGY; - png_ptr->zlib_text_level = png_ptr->zlib_level; - png_ptr->zlib_text_mem_level = png_ptr->zlib_mem_level; - png_ptr->zlib_text_window_bits = png_ptr->zlib_window_bits; - png_ptr->zlib_text_method = png_ptr->zlib_method; -#endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */ -#endif /* PNG_WRITE_COMPRESSED_TEXT_SUPPORTED */ - - /* Record that the compressor has not yet been initialized. */ - png_ptr->zlib_state = PNG_ZLIB_UNINITIALIZED; - - 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_structp png_ptr, png_const_colorp palette, - png_uint_32 num_pal) -{ - png_uint_32 i; - png_const_colorp pal_ptr; - png_byte buf[3]; - - png_debug(1, "in png_write_PLTE"); - - if (( -#ifdef PNG_MNG_FEATURES_SUPPORTED - !(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) && -#endif - num_pal == 0) || num_pal > 256) - { - 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)) - { - 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, (png_size_t)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, (png_size_t)3); - } - -#endif - png_write_chunk_end(png_ptr); - png_ptr->mode |= PNG_HAVE_PLTE; -} - -/* Write an IDAT chunk */ -void /* PRIVATE */ -png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_debug(1, "in png_write_IDAT"); - -#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED - if (!(png_ptr->mode & PNG_HAVE_IDAT) && - png_ptr->compression_type == PNG_COMPRESSION_TYPE_BASE) - { - /* Optimize the CMF field in the zlib stream. This hack of the zlib - * stream is compliant to the stream specification. - */ - unsigned int z_cmf = data[0]; /* zlib compression method and flags */ - - if ((z_cmf & 0x0f) == 8 && (z_cmf & 0xf0) <= 0x70) - { - /* Avoid memory underflows and multiplication overflows. - * - * The conditions below are practically always satisfied; - * however, they still must be checked. - */ - if (length >= 2 && - png_ptr->height < 16384 && png_ptr->width < 16384) - { - /* Compute the maximum possible length of the datastream */ - - /* Number of pixels, plus for each row a filter byte - * and possibly a padding byte, so increase the maximum - * size to account for these. - */ - unsigned int z_cinfo; - unsigned int half_z_window_size; - png_uint_32 uncompressed_idat_size = png_ptr->height * - ((png_ptr->width * - png_ptr->channels * png_ptr->bit_depth + 15) >> 3); - - /* If it's interlaced, each block of 8 rows is sent as up to - * 14 rows, i.e., 6 additional rows, each with a filter byte - * and possibly a padding byte - */ - if (png_ptr->interlaced) - uncompressed_idat_size += ((png_ptr->height + 7)/8) * - (png_ptr->bit_depth < 8 ? 12 : 6); - - z_cinfo = z_cmf >> 4; - half_z_window_size = 1 << (z_cinfo + 7); - - while (uncompressed_idat_size <= half_z_window_size && - half_z_window_size >= 256) - { - z_cinfo--; - half_z_window_size >>= 1; - } - - z_cmf = (z_cmf & 0x0f) | (z_cinfo << 4); - - if (data[0] != z_cmf) - { - int tmp; - data[0] = (png_byte)z_cmf; - tmp = data[1] & 0xe0; - tmp += 0x1f - ((z_cmf << 8) + tmp) % 0x1f; - data[1] = (png_byte)tmp; - } - } - } - - else - png_error(png_ptr, - "Invalid zlib compression method or flags in IDAT"); - } -#endif /* PNG_WRITE_OPTIMIZE_CMF_SUPPORTED */ - - png_write_complete_chunk(png_ptr, png_IDAT, data, length); - png_ptr->mode |= PNG_HAVE_IDAT; - - /* Prior to 1.5.4 this code was replicated in every caller (except at the - * end, where it isn't technically necessary). Since this function has - * flushed the data we can safely reset the zlib output buffer here. - */ - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; -} - -/* Write an IEND chunk */ -void /* PRIVATE */ -png_write_IEND(png_structp png_ptr) -{ - png_debug(1, "in png_write_IEND"); - - png_write_complete_chunk(png_ptr, png_IEND, NULL, (png_size_t)0); - png_ptr->mode |= PNG_HAVE_IEND; -} - -#ifdef PNG_WRITE_gAMA_SUPPORTED -/* Write a gAMA chunk */ -void /* PRIVATE */ -png_write_gAMA_fixed(png_structp 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, (png_size_t)4); -} -#endif - -#ifdef PNG_WRITE_sRGB_SUPPORTED -/* Write a sRGB chunk */ -void /* PRIVATE */ -png_write_sRGB(png_structp 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, (png_size_t)1); -} -#endif - -#ifdef PNG_WRITE_iCCP_SUPPORTED -/* Write an iCCP chunk */ -void /* PRIVATE */ -png_write_iCCP(png_structp png_ptr, png_const_charp name, int compression_type, - png_const_charp profile, int profile_len) -{ - png_size_t name_len; - png_charp new_name; - compression_state comp; - int embedded_profile_len = 0; - - png_debug(1, "in png_write_iCCP"); - - comp.num_output_ptr = 0; - comp.max_output_ptr = 0; - comp.output_ptr = NULL; - comp.input = NULL; - comp.input_len = 0; - - if ((name_len = png_check_keyword(png_ptr, name, &new_name)) == 0) - return; - - if (compression_type != PNG_COMPRESSION_TYPE_BASE) - png_warning(png_ptr, "Unknown compression type in iCCP chunk"); - - if (profile == NULL) - profile_len = 0; - - if (profile_len > 3) - embedded_profile_len = - ((*( (png_const_bytep)profile ))<<24) | - ((*( (png_const_bytep)profile + 1))<<16) | - ((*( (png_const_bytep)profile + 2))<< 8) | - ((*( (png_const_bytep)profile + 3)) ); - - if (embedded_profile_len < 0) - { - png_warning(png_ptr, - "Embedded profile length in iCCP chunk is negative"); - - png_free(png_ptr, new_name); - return; - } - - if (profile_len < embedded_profile_len) - { - png_warning(png_ptr, - "Embedded profile length too large in iCCP chunk"); - - png_free(png_ptr, new_name); - return; - } - - if (profile_len > embedded_profile_len) - { - png_warning(png_ptr, - "Truncating profile to actual length in iCCP chunk"); - - profile_len = embedded_profile_len; - } - - if (profile_len) - profile_len = png_text_compress(png_ptr, profile, - (png_size_t)profile_len, PNG_COMPRESSION_TYPE_BASE, &comp); - - /* Make sure we include the NULL after the name and the compression type */ - png_write_chunk_header(png_ptr, png_iCCP, - (png_uint_32)(name_len + profile_len + 2)); - - new_name[name_len + 1] = 0x00; - - png_write_chunk_data(png_ptr, (png_bytep)new_name, - (png_size_t)(name_len + 2)); - - if (profile_len) - { - png_write_compressed_data_out(png_ptr, &comp, profile_len); - } - - png_write_chunk_end(png_ptr); - png_free(png_ptr, new_name); -} -#endif - -#ifdef PNG_WRITE_sPLT_SUPPORTED -/* Write a sPLT chunk */ -void /* PRIVATE */ -png_write_sPLT(png_structp png_ptr, png_const_sPLT_tp spalette) -{ - png_size_t name_len; - png_charp new_name; - png_byte entrybuf[10]; - png_size_t entry_size = (spalette->depth == 8 ? 6 : 10); - png_size_t palette_size = entry_size * spalette->nentries; - png_sPLT_entryp ep; -#ifndef PNG_POINTER_INDEXING_SUPPORTED - int i; -#endif - - png_debug(1, "in png_write_sPLT"); - - if ((name_len = png_check_keyword(png_ptr,spalette->name, &new_name))==0) - return; - - /* 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, - (png_size_t)(name_len + 1)); - - png_write_chunk_data(png_ptr, &spalette->depth, (png_size_t)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, (png_size_t)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, (png_size_t)entry_size); - } -#endif - - png_write_chunk_end(png_ptr); - png_free(png_ptr, new_name); -} -#endif - -#ifdef PNG_WRITE_sBIT_SUPPORTED -/* Write the sBIT chunk */ -void /* PRIVATE */ -png_write_sBIT(png_structp png_ptr, png_const_color_8p sbit, int color_type) -{ - png_byte buf[4]; - png_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) - { - 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) - { - 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_structp png_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_byte buf[32]; - - png_debug(1, "in png_write_cHRM"); - - /* Each value is saved in 1/100,000ths */ -#ifdef PNG_CHECK_cHRM_SUPPORTED - if (png_check_cHRM_fixed(png_ptr, white_x, white_y, red_x, red_y, - green_x, green_y, blue_x, blue_y)) -#endif - { - png_save_uint_32(buf, (png_uint_32)white_x); - png_save_uint_32(buf + 4, (png_uint_32)white_y); - - png_save_uint_32(buf + 8, (png_uint_32)red_x); - png_save_uint_32(buf + 12, (png_uint_32)red_y); - - png_save_uint_32(buf + 16, (png_uint_32)green_x); - png_save_uint_32(buf + 20, (png_uint_32)green_y); - - png_save_uint_32(buf + 24, (png_uint_32)blue_x); - png_save_uint_32(buf + 28, (png_uint_32)blue_y); - - png_write_complete_chunk(png_ptr, png_cHRM, buf, (png_size_t)32); - } -} -#endif - -#ifdef PNG_WRITE_tRNS_SUPPORTED -/* Write the tRNS chunk */ -void /* PRIVATE */ -png_write_tRNS(png_structp 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_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, - (png_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_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, (png_size_t)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])) -#else - if (buf[0] | buf[2] | buf[4]) -#endif - { - png_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, (png_size_t)6); - } - - else - { - png_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_structp 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 || - (!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE))) && -#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, (png_size_t)1); - } - - else if (color_type & PNG_COLOR_MASK_COLOR) - { - 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])) -#else - if (buf[0] | buf[2] | buf[4]) -#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, (png_size_t)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, (png_size_t)2); - } -} -#endif - -#ifdef PNG_WRITE_hIST_SUPPORTED -/* Write the histogram */ -void /* PRIVATE */ -png_write_hIST(png_structp 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, (png_size_t)2); - } - - png_write_chunk_end(png_ptr); -} -#endif - -#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ - defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_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 is allocated to hold the corrected keyword and must be freed - * by the calling routine. This avoids problems with trying to write to - * static keywords without having to have duplicate copies of the strings. - */ -png_size_t /* PRIVATE */ -png_check_keyword(png_structp png_ptr, png_const_charp key, png_charpp new_key) -{ - png_size_t key_len; - png_const_charp ikp; - png_charp kp, dp; - int kflag; - int kwarn=0; - - png_debug(1, "in png_check_keyword"); - - *new_key = NULL; - - if (key == NULL || (key_len = png_strlen(key)) == 0) - { - png_warning(png_ptr, "zero length keyword"); - return ((png_size_t)0); - } - - png_debug1(2, "Keyword to be checked is '%s'", key); - - *new_key = (png_charp)png_malloc_warn(png_ptr, (png_uint_32)(key_len + 2)); - - if (*new_key == NULL) - { - png_warning(png_ptr, "Out of memory while procesing keyword"); - return ((png_size_t)0); - } - - /* Replace non-printing characters with a blank and print a warning */ - for (ikp = key, dp = *new_key; *ikp != '\0'; ikp++, dp++) - { - if ((png_byte)*ikp < 0x20 || - ((png_byte)*ikp > 0x7E && (png_byte)*ikp < 0xA1)) - { - PNG_WARNING_PARAMETERS(p) - - png_warning_parameter_unsigned(p, 1, PNG_NUMBER_FORMAT_02x, - (png_byte)*ikp); - png_formatted_warning(png_ptr, p, "invalid keyword character 0x@1"); - *dp = ' '; - } - - else - { - *dp = *ikp; - } - } - *dp = '\0'; - - /* Remove any trailing white space. */ - kp = *new_key + key_len - 1; - if (*kp == ' ') - { - png_warning(png_ptr, "trailing spaces removed from keyword"); - - while (*kp == ' ') - { - *(kp--) = '\0'; - key_len--; - } - } - - /* Remove any leading white space. */ - kp = *new_key; - if (*kp == ' ') - { - png_warning(png_ptr, "leading spaces removed from keyword"); - - while (*kp == ' ') - { - kp++; - key_len--; - } - } - - png_debug1(2, "Checking for multiple internal spaces in '%s'", kp); - - /* Remove multiple internal spaces. */ - for (kflag = 0, dp = *new_key; *kp != '\0'; kp++) - { - if (*kp == ' ' && kflag == 0) - { - *(dp++) = *kp; - kflag = 1; - } - - else if (*kp == ' ') - { - key_len--; - kwarn = 1; - } - - else - { - *(dp++) = *kp; - kflag = 0; - } - } - *dp = '\0'; - if (kwarn) - png_warning(png_ptr, "extra interior spaces removed from keyword"); - - if (key_len == 0) - { - png_free(png_ptr, *new_key); - png_warning(png_ptr, "Zero length keyword"); - } - - if (key_len > 79) - { - png_warning(png_ptr, "keyword length must be 1 - 79 characters"); - (*new_key)[79] = '\0'; - key_len = 79; - } - - return (key_len); -} -#endif - -#ifdef PNG_WRITE_tEXt_SUPPORTED -/* Write a tEXt chunk */ -void /* PRIVATE */ -png_write_tEXt(png_structp png_ptr, png_const_charp key, png_const_charp text, - png_size_t text_len) -{ - png_size_t key_len; - png_charp new_key; - - png_debug(1, "in png_write_tEXt"); - - if ((key_len = png_check_keyword(png_ptr, key, &new_key))==0) - return; - - if (text == NULL || *text == '\0') - text_len = 0; - - else - text_len = png_strlen(text); - - /* Make sure we include the 0 after the key */ - png_write_chunk_header(png_ptr, png_tEXt, - (png_uint_32)(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, (png_bytep)new_key, - (png_size_t)(key_len + 1)); - - if (text_len) - png_write_chunk_data(png_ptr, (png_const_bytep)text, - (png_size_t)text_len); - - png_write_chunk_end(png_ptr); - png_free(png_ptr, new_key); -} -#endif - -#ifdef PNG_WRITE_zTXt_SUPPORTED -/* Write a compressed text chunk */ -void /* PRIVATE */ -png_write_zTXt(png_structp png_ptr, png_const_charp key, png_const_charp text, - png_size_t text_len, int compression) -{ - png_size_t key_len; - png_byte buf; - png_charp new_key; - compression_state comp; - - png_debug(1, "in png_write_zTXt"); - - comp.num_output_ptr = 0; - comp.max_output_ptr = 0; - comp.output_ptr = NULL; - comp.input = NULL; - comp.input_len = 0; - - if ((key_len = png_check_keyword(png_ptr, key, &new_key)) == 0) - { - png_free(png_ptr, new_key); - return; - } - - if (text == NULL || *text == '\0' || compression==PNG_TEXT_COMPRESSION_NONE) - { - png_write_tEXt(png_ptr, new_key, text, (png_size_t)0); - png_free(png_ptr, new_key); - return; - } - - text_len = png_strlen(text); - - /* Compute the compressed data; do it now for the length */ - text_len = png_text_compress(png_ptr, text, text_len, compression, - &comp); - - /* Write start of chunk */ - png_write_chunk_header(png_ptr, png_zTXt, - (png_uint_32)(key_len+text_len + 2)); - - /* Write key */ - png_write_chunk_data(png_ptr, (png_bytep)new_key, - (png_size_t)(key_len + 1)); - - png_free(png_ptr, new_key); - - buf = (png_byte)compression; - - /* Write compression */ - png_write_chunk_data(png_ptr, &buf, (png_size_t)1); - - /* Write the compressed data */ - png_write_compressed_data_out(png_ptr, &comp, text_len); - - /* 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_structp png_ptr, int compression, png_const_charp key, - png_const_charp lang, png_const_charp lang_key, png_const_charp text) -{ - png_size_t lang_len, key_len, lang_key_len, text_len; - png_charp new_lang; - png_charp new_key = NULL; - png_byte cbuf[2]; - compression_state comp; - - png_debug(1, "in png_write_iTXt"); - - comp.num_output_ptr = 0; - comp.max_output_ptr = 0; - comp.output_ptr = NULL; - comp.input = NULL; - - if ((key_len = png_check_keyword(png_ptr, key, &new_key)) == 0) - return; - - if ((lang_len = png_check_keyword(png_ptr, lang, &new_lang)) == 0) - { - png_warning(png_ptr, "Empty language field in iTXt chunk"); - new_lang = NULL; - lang_len = 0; - } - - if (lang_key == NULL) - lang_key_len = 0; - - else - lang_key_len = png_strlen(lang_key); - - if (text == NULL) - text_len = 0; - - else - text_len = png_strlen(text); - - /* Compute the compressed data; do it now for the length */ - text_len = png_text_compress(png_ptr, text, text_len, compression - 2, - &comp); - - - /* Make sure we include the compression flag, the compression byte, - * and the NULs after the key, lang, and lang_key parts - */ - - png_write_chunk_header(png_ptr, png_iTXt, (png_uint_32)( - 5 /* comp byte, comp flag, terminators for key, lang and lang_key */ - + key_len - + lang_len - + lang_key_len - + text_len)); - - /* 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, (png_bytep)new_key, (png_size_t)(key_len + 1)); - - /* Set the compression flag */ - if (compression == PNG_ITXT_COMPRESSION_NONE || - compression == PNG_TEXT_COMPRESSION_NONE) - cbuf[0] = 0; - - else /* compression == PNG_ITXT_COMPRESSION_zTXt */ - cbuf[0] = 1; - - /* Set the compression method */ - cbuf[1] = 0; - - png_write_chunk_data(png_ptr, cbuf, (png_size_t)2); - - cbuf[0] = 0; - png_write_chunk_data(png_ptr, (new_lang ? (png_const_bytep)new_lang : cbuf), - (png_size_t)(lang_len + 1)); - - png_write_chunk_data(png_ptr, (lang_key ? (png_const_bytep)lang_key : cbuf), - (png_size_t)(lang_key_len + 1)); - - png_write_compressed_data_out(png_ptr, &comp, text_len); - - png_write_chunk_end(png_ptr); - - png_free(png_ptr, new_key); - png_free(png_ptr, new_lang); -} -#endif - -#ifdef PNG_WRITE_oFFs_SUPPORTED -/* Write the oFFs chunk */ -void /* PRIVATE */ -png_write_oFFs(png_structp 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, (png_size_t)9); -} -#endif -#ifdef PNG_WRITE_pCAL_SUPPORTED -/* Write the pCAL chunk (described in the PNG extensions document) */ -void /* PRIVATE */ -png_write_pCAL(png_structp 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_size_t purpose_len, units_len, total_len; - png_size_tp params_len; - png_byte buf[10]; - png_charp new_purpose; - int i; - - png_debug1(1, "in png_write_pCAL (%d parameters)", nparams); - - if (type >= PNG_EQUATION_LAST) - png_warning(png_ptr, "Unrecognized equation type for pCAL chunk"); - - purpose_len = png_check_keyword(png_ptr, purpose, &new_purpose) + 1; - png_debug1(3, "pCAL purpose length = %d", (int)purpose_len); - units_len = png_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)(nparams * png_sizeof(png_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] = png_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, (png_const_bytep)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, (png_size_t)10); - png_write_chunk_data(png_ptr, (png_const_bytep)units, (png_size_t)units_len); - - png_free(png_ptr, new_purpose); - - 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_structp png_ptr, int unit, png_const_charp width, - png_const_charp height) -{ - png_byte buf[64]; - png_size_t wlen, hlen, total_len; - - png_debug(1, "in png_write_sCAL_s"); - - wlen = png_strlen(width); - hlen = png_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; - png_memcpy(buf + 1, width, wlen + 1); /* Append the '\0' here */ - png_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_structp 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, (png_size_t)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_structp 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, (png_size_t)7); -} -#endif - -/* Initializes the row writing capability of libpng */ -void /* PRIVATE */ -png_write_start_row(png_structp 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; - - 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_bytep)png_malloc(png_ptr, buf_size); - - png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE; - -#ifdef PNG_WRITE_FILTER_SUPPORTED - /* Set up filtering buffer, if using this filter */ - if (png_ptr->do_filter & PNG_FILTER_SUB) - { - png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, png_ptr->rowbytes + 1); - - png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB; - } - - /* We only need to keep the previous row if we are using one of these. */ - if (png_ptr->do_filter & (PNG_FILTER_AVG | PNG_FILTER_UP | PNG_FILTER_PAETH)) - { - /* Set up previous row buffer */ - png_ptr->prev_row = (png_bytep)png_calloc(png_ptr, buf_size); - - if (png_ptr->do_filter & PNG_FILTER_UP) - { - png_ptr->up_row = (png_bytep)png_malloc(png_ptr, - png_ptr->rowbytes + 1); - - png_ptr->up_row[0] = PNG_FILTER_VALUE_UP; - } - - if (png_ptr->do_filter & PNG_FILTER_AVG) - { - png_ptr->avg_row = (png_bytep)png_malloc(png_ptr, - png_ptr->rowbytes + 1); - - png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG; - } - - if (png_ptr->do_filter & PNG_FILTER_PAETH) - { - png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr, - png_ptr->rowbytes + 1); - - png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH; - } - } -#endif /* PNG_WRITE_FILTER_SUPPORTED */ - -#ifdef PNG_WRITE_INTERLACING_SUPPORTED - /* If interlaced, we need to set up width and height of pass */ - if (png_ptr->interlaced) - { - if (!(png_ptr->transformations & PNG_INTERLACE)) - { - 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; - } - - png_zlib_claim(png_ptr, PNG_ZLIB_FOR_IDAT); - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_out = png_ptr->zbuf; -} - -/* Internal use only. Called when finished processing a row of data. */ -void /* PRIVATE */ -png_write_finish_row(png_structp 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 - - int ret; - - 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) - { - png_ptr->row_number = 0; - if (png_ptr->transformations & PNG_INTERLACE) - { - 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) - 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) - png_memset(png_ptr->prev_row, 0, - (png_size_t)(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 */ - do - { - /* Tell the compressor we are done */ - ret = deflate(&png_ptr->zstream, Z_FINISH); - - /* Check for an error */ - if (ret == Z_OK) - { - /* Check to see if we need more room */ - if (!(png_ptr->zstream.avail_out)) - { - png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - } - } - - else if (ret != Z_STREAM_END) - { - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - - else - png_error(png_ptr, "zlib error"); - } - } while (ret != Z_STREAM_END); - - /* Write any extra space */ - if (png_ptr->zstream.avail_out < png_ptr->zbuf_size) - { - png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size - - png_ptr->zstream.avail_out); - } - - png_zlib_release(png_ptr); - png_ptr->zstream.data_type = Z_BINARY; -} - -#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; - 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 + (png_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; - 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 + (png_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; - 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 + (png_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; - png_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 + (png_size_t)i * pixel_bytes; - - /* Move the pixel */ - if (dp != sp) - png_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 png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row, - png_size_t row_bytes); - -#define PNG_MAXSUM (((png_uint_32)(-1)) >> 1) -#define PNG_HISHIFT 10 -#define PNG_LOMASK ((png_uint_32)0xffffL) -#define PNG_HIMASK ((png_uint_32)(~PNG_LOMASK >> PNG_HISHIFT)) -void /* PRIVATE */ -png_write_find_filter(png_structp png_ptr, png_row_infop row_info) -{ - png_bytep best_row; -#ifdef PNG_WRITE_FILTER_SUPPORTED - png_bytep prev_row, row_buf; - png_uint_32 mins, bpp; - png_byte filter_to_do = png_ptr->do_filter; - png_size_t row_bytes = row_info->rowbytes; -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - int num_p_filters = png_ptr->num_prev_filters; -#endif - - png_debug(1, "in png_write_find_filter"); - -#ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - if (png_ptr->row_number == 0 && filter_to_do == PNG_ALL_FILTERS) - { - /* These will never be selected so we need not test them. */ - filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH); - } -#endif - - /* Find out how many bytes offset each pixel is */ - bpp = (row_info->pixel_depth + 7) >> 3; - - prev_row = png_ptr->prev_row; -#endif - best_row = png_ptr->row_buf; -#ifdef PNG_WRITE_FILTER_SUPPORTED - row_buf = best_row; - mins = PNG_MAXSUM; - - /* 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. - */ - if ((filter_to_do & PNG_FILTER_NONE) && filter_to_do != PNG_FILTER_NONE) - { - png_bytep rp; - png_uint_32 sum = 0; - png_size_t i; - int v; - - for (i = 0, rp = row_buf + 1; i < row_bytes; i++, rp++) - { - v = *rp; - sum += (v < 128) ? v : 256 - v; - } - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - png_uint_32 sumhi, sumlo; - int j; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; /* Gives us some footroom */ - - /* Reduce the sum if we match any of the previous rows */ - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE) - { - sumlo = (sumlo * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - - sumhi = (sumhi * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - /* Factor in the cost of this filter (this is here for completeness, - * but it makes no sense to have a "cost" for the NONE filter, as - * it has the minimum possible computational cost - none). - */ - sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >> - PNG_COST_SHIFT; - - sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - mins = sum; - } - - /* Sub filter */ - if (filter_to_do == PNG_FILTER_SUB) - /* It's the only filter so no testing is needed */ - { - png_bytep rp, lp, dp; - png_size_t i; - - for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp; - i++, rp++, dp++) - { - *dp = *rp; - } - - for (lp = row_buf + 1; i < row_bytes; - i++, rp++, lp++, dp++) - { - *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff); - } - - best_row = png_ptr->sub_row; - } - - else if (filter_to_do & PNG_FILTER_SUB) - { - png_bytep rp, dp, lp; - png_uint_32 sum = 0, lmins = mins; - png_size_t i; - int v; - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - /* We temporarily increase the "minimum sum" by the factor we - * would reduce the sum of this filter, so that we can do the - * early exit comparison without scaling the sum each time. - */ - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 lmhi, lmlo; - lmlo = lmins & PNG_LOMASK; - lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB) - { - lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - - lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; - - lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; - - if (lmhi > PNG_HIMASK) - lmins = PNG_MAXSUM; - - else - lmins = (lmhi << PNG_HISHIFT) + lmlo; - } -#endif - - for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp; - i++, rp++, dp++) - { - v = *dp = *rp; - - sum += (v < 128) ? v : 256 - v; - } - - for (lp = row_buf + 1; i < row_bytes; - i++, rp++, lp++, dp++) - { - v = *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff); - - sum += (v < 128) ? v : 256 - v; - - if (sum > lmins) /* We are already worse, don't continue. */ - break; - } - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 sumhi, sumlo; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB) - { - sumlo = (sumlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - - sumhi = (sumhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - sumlo = (sumlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; - - sumhi = (sumhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - - if (sum < mins) - { - mins = sum; - best_row = png_ptr->sub_row; - } - } - - /* Up filter */ - if (filter_to_do == PNG_FILTER_UP) - { - png_bytep rp, dp, pp; - png_size_t i; - - for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1, - pp = prev_row + 1; i < row_bytes; - i++, rp++, pp++, dp++) - { - *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff); - } - - best_row = png_ptr->up_row; - } - - else if (filter_to_do & PNG_FILTER_UP) - { - png_bytep rp, dp, pp; - png_uint_32 sum = 0, lmins = mins; - png_size_t i; - int v; - - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 lmhi, lmlo; - lmlo = lmins & PNG_LOMASK; - lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP) - { - lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - - lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; - - lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; - - if (lmhi > PNG_HIMASK) - lmins = PNG_MAXSUM; - - else - lmins = (lmhi << PNG_HISHIFT) + lmlo; - } -#endif - - for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1, - pp = prev_row + 1; i < row_bytes; i++) - { - v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); - - sum += (v < 128) ? v : 256 - v; - - if (sum > lmins) /* We are already worse, don't continue. */ - break; - } - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 sumhi, sumlo; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP) - { - sumlo = (sumlo * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - - sumhi = (sumhi * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; - - sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - - if (sum < mins) - { - mins = sum; - best_row = png_ptr->up_row; - } - } - - /* Avg filter */ - if (filter_to_do == PNG_FILTER_AVG) - { - png_bytep rp, dp, pp, lp; - png_uint_32 i; - - for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1, - pp = prev_row + 1; i < bpp; i++) - { - *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff); - } - - for (lp = row_buf + 1; i < row_bytes; i++) - { - *dp++ = (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) - & 0xff); - } - best_row = png_ptr->avg_row; - } - - else if (filter_to_do & PNG_FILTER_AVG) - { - png_bytep rp, dp, pp, lp; - png_uint_32 sum = 0, lmins = mins; - png_size_t i; - int v; - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 lmhi, lmlo; - lmlo = lmins & PNG_LOMASK; - lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_AVG) - { - lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - - lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; - - lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; - - if (lmhi > PNG_HIMASK) - lmins = PNG_MAXSUM; - - else - lmins = (lmhi << PNG_HISHIFT) + lmlo; - } -#endif - - for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1, - pp = prev_row + 1; i < bpp; i++) - { - v = *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff); - - sum += (v < 128) ? v : 256 - v; - } - - for (lp = row_buf + 1; i < row_bytes; i++) - { - v = *dp++ = - (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) & 0xff); - - sum += (v < 128) ? v : 256 - v; - - if (sum > lmins) /* We are already worse, don't continue. */ - break; - } - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 sumhi, sumlo; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE) - { - sumlo = (sumlo * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - - sumhi = (sumhi * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; - - sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - - if (sum < mins) - { - mins = sum; - best_row = png_ptr->avg_row; - } - } - - /* Paeth filter */ - if (filter_to_do == PNG_FILTER_PAETH) - { - png_bytep rp, dp, pp, cp, lp; - png_size_t i; - - for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1, - pp = prev_row + 1; i < bpp; i++) - { - *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); - } - - for (lp = row_buf + 1, cp = 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); - } - best_row = png_ptr->paeth_row; - } - - else if (filter_to_do & PNG_FILTER_PAETH) - { - png_bytep rp, dp, pp, cp, lp; - png_uint_32 sum = 0, lmins = mins; - png_size_t i; - int v; - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 lmhi, lmlo; - lmlo = lmins & PNG_LOMASK; - lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH) - { - lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - - lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; - - lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; - - if (lmhi > PNG_HIMASK) - lmins = PNG_MAXSUM; - - else - lmins = (lmhi << PNG_HISHIFT) + lmlo; - } -#endif - - for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1, - pp = prev_row + 1; i < bpp; i++) - { - v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); - - sum += (v < 128) ? v : 256 - v; - } - - for (lp = row_buf + 1, cp = prev_row + 1; i < row_bytes; i++) - { - int a, b, c, pa, pb, pc, p; - - b = *pp++; - c = *cp++; - a = *lp++; - -#ifndef PNG_SLOW_PAETH - 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; -#else /* PNG_SLOW_PAETH */ - p = a + b - c; - pa = abs(p - a); - pb = abs(p - b); - pc = abs(p - c); - - if (pa <= pb && pa <= pc) - p = a; - - else if (pb <= pc) - p = b; - - else - p = c; -#endif /* PNG_SLOW_PAETH */ - - v = *dp++ = (png_byte)(((int)*rp++ - p) & 0xff); - - sum += (v < 128) ? v : 256 - v; - - if (sum > lmins) /* We are already worse, don't continue. */ - break; - } - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 sumhi, sumlo; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH) - { - sumlo = (sumlo * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - - sumhi = (sumhi * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; - - sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - - if (sum < mins) - { - best_row = png_ptr->paeth_row; - } - } -#endif /* PNG_WRITE_FILTER_SUPPORTED */ - - /* 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); - -#ifdef PNG_WRITE_FILTER_SUPPORTED -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - /* Save the type of filter we picked this time for future calculations */ - if (png_ptr->num_prev_filters > 0) - { - int j; - - for (j = 1; j < num_p_filters; j++) - { - png_ptr->prev_filters[j] = png_ptr->prev_filters[j - 1]; - } - - png_ptr->prev_filters[j] = best_row[0]; - } -#endif -#endif /* PNG_WRITE_FILTER_SUPPORTED */ -} - - -/* Do the actual writing of a previously filtered row. */ -static void -png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row, - png_size_t avail/*includes filter byte*/) -{ - png_debug(1, "in png_write_filtered_row"); - - png_debug1(2, "filter = %d", filtered_row[0]); - /* Set up the zlib input buffer */ - - png_ptr->zstream.next_in = filtered_row; - png_ptr->zstream.avail_in = 0; - /* Repeat until we have compressed all the data */ - do - { - int ret; /* Return of zlib */ - - /* Record the number of bytes available - zlib supports at least 65535 - * bytes at one step, depending on the size of the zlib type 'uInt', the - * maximum size zlib can write at once is ZLIB_IO_MAX (from pngpriv.h). - * Use this because on 16 bit systems 'rowbytes' can be up to 65536 (i.e. - * one more than 16 bits) and, in this case 'rowbytes+1' can overflow a - * uInt. ZLIB_IO_MAX can be safely reduced to cause zlib to be called - * with smaller chunks of data. - */ - if (png_ptr->zstream.avail_in == 0) - { - if (avail > ZLIB_IO_MAX) - { - png_ptr->zstream.avail_in = ZLIB_IO_MAX; - avail -= ZLIB_IO_MAX; - } - - else - { - /* So this will fit in the available uInt space: */ - png_ptr->zstream.avail_in = (uInt)avail; - avail = 0; - } - } - - /* Compress the data */ - ret = deflate(&png_ptr->zstream, Z_NO_FLUSH); - - /* Check for compression errors */ - if (ret != Z_OK) - { - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - - else - png_error(png_ptr, "zlib error"); - } - - /* See if it is time to write another IDAT */ - if (!(png_ptr->zstream.avail_out)) - { - /* Write the IDAT and reset the zlib output buffer */ - png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); - } - /* Repeat until all data has been compressed */ - } while (avail > 0 || png_ptr->zstream.avail_in > 0); - - /* 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; - } - - /* 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 -} -#endif /* PNG_WRITE_SUPPORTED */ diff --git a/Source/LibRawLite/COPYRIGHT b/Source/LibRawLite/COPYRIGHT deleted file mode 100644 index 884e9a3..0000000 --- a/Source/LibRawLite/COPYRIGHT +++ /dev/null @@ -1,23 +0,0 @@ - ** LibRaw: Raw images processing library ** - -Copyright (C) 2008-2010 LibRaw LLC (http://www.libraw.org, info@libraw.org) - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - -LibRaw uses code from dcraw.c -- Dave Coffin's raw photo decoder, -dcraw.c is copyright 1997-2010 by Dave Coffin, dcoffin a cybercom o net. - -LibRaw uses DCB demosaic and FBDD denoise licensed under BSD-like 3-clause license -DCB and FBDD are Copyright (C) 2010, Jacek Gozdz (cuniek@kft.umcs.lublin.pl) - diff --git a/Source/LibRawLite/Changelog.txt b/Source/LibRawLite/Changelog.txt deleted file mode 100644 index 0b8dca9..0000000 --- a/Source/LibRawLite/Changelog.txt +++ /dev/null @@ -1,1295 +0,0 @@ -2012-06-27 Alex Tutubalin - * Imported dcraw 9.15 (1.449): - - New cameras supported: Canon 5D Mark III, G1 X, 1D X and Powershot SX200; - Nikon D4,D800/D800E and D3200; Fuji X-S1 and HS30EXR; Casio EX-Z8; - Olympus E-M5; Panasonic GF5; Sony NEX-F3, SLT-A37 and SLT-A57; - Samsung NX20 and NX210; - - Support for updated Samsung NX200 firmware. - * Makefile.msvc: additional compiler flags - * LibRaw 0.14.7-Release - -2012-04-11 Alex Tutubalin - * Fixed thumbnail processing (esp. for Adobe Lightroom DNGs) - -2012-04-05 Alex Tutubalin - * Casio EX-Z500 support - * (possible) I/O exceptions on file open catched in open_datastream - * Fixed possible read-after-buffer in Sony ARW2 decoder - * Fixed mingw32 errors when compiling LibRaw_windows_datastream - * Makefile.msvc: support of OpenMP and LCMS (uncomment to use) - * Fixed decoding of some Leaf Aptus II files - * LibRaw 0.14.6-Release - -2011-12-24 Alex Tutubalin - * Fixed bug (uninitialized variable) in SMAL format decoding. - - * Imported new dcraw 9.12 (1.446): support for Leica V-LUX 3, - updated color data for Canon S100, Fujifilm X10, Nikon 1 J1/V1, - Panasonic GX1, Samsung NX200, Sony NEX-7 - - * LibRaw 0.14.5-Release - -2011-12-12 Alex Tutubalin - - * Fixes to Panasonic/Leica file parser to prevent crash - on broken jpegs. - - * Fixes to include order in src/libraw_datastream.cpp to - better compile with KDEWIN - - * Floating-point DNGs are rejected on early processing stage. - - * Support for new cameras: Canon S100, Fuji X10, Panasonic GX1, - Samsung NX200, Sony NEX-7. - - * LibRaw 0.14.4-Release - - -2011-10-26 Alex Tutubalin - * Bug fixes in black level subtraction code for PhaseOne files - - * New API call LibRaw::get_internal_data_pointer() for developers - who need access to libraw_internal_data fields (i.e. - Fuji SuperCCD layout). - - * doc/API-overview fixes to reflect 0.14 changes - - * LibRaw 0.14.3-Release - -2011-10-19 Alex Tutubalin - * Fixed bug in Canon 1D and 1Ds files decoding. - * New decoder information bit DECODER_HASRAWCURVE - * LibRaw 0.14.2-Release - -2011-10-11 Alex Tutubalin - * Imported dcraw 9.11/1.445: - + Support for new cameras added: Fujifilm F600EXR, Nikon P7100, - Olympus E-PL3 and E-PM1, Panasonic DMC-FZ150, Sony NEX-5N, - A65 and A77. - + Changed color data for: Olympus E-P3, Panasonic G3 and GF3, - PhaseOne H25, P40 and P65, Sony NEX-C3, NEX-5, NEX-3, A35 and A55. - + Support for dark frame extraction on Sony cameras. - - * DCB demosaicing: reserving 6 pixels instead of 3 to suppress - colored image frame. - * LibRaw 0.14.1-Release - -2011-09-21 Alex Tutubalin - * Cosmetic changes to make Visual C++/OpenMP more happy - * Fix megapixel calculation for postprocessing_benchmark in half mode - * Shlib version number increment - * LibRaw 0.14.0-Release - -2011-09-04 Alex Tutubalin - * Fixed bug with Kodak thumbnail extraction - * raw2image_ex() always return value - * LibRaw 0.14.0-Beta2 - -2011-09-02 Alex Tutubalin - * Cosmetic changes to LibRaw_file_datastream interface - - * OpenMP speedup of postprocessing steps (up to 50% for - half mode and 4-core machine) - - * LibRaw 0.14.0-Beta1 - -2011-08-20 Alex Tutubalin - - * Patch to dcraw_emu for SunStudio compiler compatibility - - * Fixed crash in unprocessed_raw sample due to uninitialized - timestamp variable. - - * Fixed crash in raw decoding if raw_width/raw_height is - less than resulting image width/height. - - * imgdata.sizes.flip is set from user_flip only on - postprocessing and/or adjust_sizes_info_only() - - * Fixed buffer overrun for some LJPEG-compressed files - - * Most of LibRaw_datastream function bodies are moved to - separate source file - - * LibRaw_windows_datastream is merged to main sourcetree - - * LibRaw 0.14.0-Alpha5 - -2011-08-11 Alex Tutubalin - * Imported dcraw 9.10 (1.444), support for new cameras added: - ARRIRAW format, Canon SX30 IS, Leica D-LUX 5 and V-LUX2, - Olympus E-P3, Panasonic G3 and GF3, Sony NEX-C3 and SLT-A35 - - * Support for RedOne digital movie cameras (R3D format). - To enable this support you should: - + install libjasper JPEG2000 support library - - + compile LibRaw with -DUSE_JASPER compiler switch (./configure - will do it for you) - - + If you use own LibRaw_datastream implementation, you should - implement make_jas_stream() call for your datastream. See - bottom of src/libraw_cxx.cpp for implementations in datafile - and mem-buffer LibRaw streams. - - * Bugfix: green matching is turned off if output image is shrinked - due to wavelet filtering or aberration correction. - - * fixed open_file()/adjust_sizes_info_only() code path - - * Removed imgdata.sizes.bottom_margin and right_margin data fields - use imgdata.sizes.raw_width - width - left_margin to get right one, - the same with bottom_margin. - - * minor ./configure cleanup - - * Qmake files and Visual Studio Project files are updated. - - * New version check macros: - For use at runtime checks: - LIBRAW_RUNTIME_CHECK_VERSION_EXACT() - checks that runtime - major/minor version numbers are same with compile-time values. - - LIBRAW_RUNTIME_CHECK_VERSION_NOTLESS() - checks that runtime - version is not less that compile-time one. - - For use at compile-time in preprocessor directives: - LIBRAW_COMPILE_CHECK_VERSION_EXACT(major,minor) - Compile-time - check that LibRaw version is exact major.minor. - - LIBRAW_COMPILE_CHECK_VERSION_NOTLESS(major,minor) - Compile-time - check that version is not less than major.minor. - - * all client code should be recompiled due to internals change. - - * LibRaw 0.14.0-Alpha4 - -2011-07-19 Alex Tutubalin - * New sample samples/postprocessing_benchmark.cpp - This sample measures postprocessing speed. - All demosaic methods, averaged white balance, median - filtering, wavelet filtration, highlight recovery, and - cropping are supported. - - * Removed LibRaw::rotate_fuji_raw() call and corresponding C-API call. - - * The LibRaw::adjust_sizes_info_only() call may be called repeated - and mixed with dcraw_process() call. - - * Postprocessing speedup and optimization, especially if cropping set. - - * Cropping works for FujiCCD raws. For the technical reasons, the position - of top-left corner of crop area will be rounded to the nearest - multiple of 4 (the corner is shifted top-left). - - * LibRaw 0.14.0-Alpha3 - -2011-07-15 Alex Tutubalin - * imported cropping code from 0.13 branch - -2011-07-12 Alex Tutubalin - * samples/multirender_test - check for different clip settings - -2011-07-11 Alex Tutubalin - * New call LibRaw::free_image(), deallocates imgdata.image buffer. - Use this call if current postprocessing results are not - needed, but it is to early to call recycle() because - dcraw_process() may be called later. - - * New C-API calls - libraw_raw2image() - C API for LibRaw::raw2image() - libraw_free_image() - C API for LibRaw::free_image() - libraw_get_decoder_info() - C API for LibRaw::get_decoder_info() - - * Bugfix: change of params.user_flip aftee open()/unpack() - calls should work. - - * LibRaw 0.14.0-Alpha2 - -2011-07-10 Alex Tutubalin - * Multiple rendering (LibRaw::dcraw_process() calls) allowed - without re-opening RAW file thrfough the sequence of open()/unpack() - calls. - You should be able to change any processing parameters (except - shot_select parameter) between dcraw_process() calls. - - + New sample in samples/multirender_test.cpp: renders data 4 times: - in half and full modes with different white balance settings. - - + Unprocessed RAW data is stored in separate data buffer: - (2 bytes per pixel for all Bayer-pattern images, - 8 bytes per pixel for Foveon, sRAW, and other full-color raw - formats), so now LibRaw uses 25% more memory for full processing of - most common Bayer images; while for just unpack memory is reduced - 4 times. - - + New call LibRaw::raw2image() fills imgdata.image array - with fresh copy of data. - There is no need to call raw2image() separately if you use - dcraw_process() or dcraw_document_mode_processing() calls. - - + New call LibRaw::get_decoder_info() to determine raw data - storage layout. See samples/unprocessed_raw.cpp for an example - of how to use it. - - If your code uses usual open()/unpack()/dcraw_process() call - sequence, then NOTHING CHANGED: your program should produce same - results. For interactive programs you may skip open()/unpack() - calls after adjusting processing parameters, so user should see - image refreshed much faster. - - If your code uses raw data (open+unpack calls), you need to call - LibRaw::raw2image(), and imgdata.image will contain same bitmap - as in LibRaw 0.13.x - - If you code uses access to masked borders data, you need to - rewrite it. See samples/unprocessed_raw.cpp as a sample. - - Unfortunately, documentation is untouched yet. This problem will be - fixed in next Alpha release. - - Other changes: - - * No separate imgdata.masked_pixels buffers, Bayer raw formats are read - to buffer with borders. So, no ugly add_masked_border_to_bitmap() - call. - - * No filtering_mode parameter. Raw tone curve is applied - at unpack() stage; zero pixels removed on postprocesing stage. - - * unprocessed_raw and 4colors samples are adjusted to use - new RAW data storage layout. - - * all client code should be recompiled due to internals change. - - * LibRaw 0.14.0-Alpha1 - -2011-07-03 Alex Tutubalin - * Cosmetic cleanup in Libraw_memmgr code - - * Permit OpenMP support on MS VS2008 - - * More general mem_image interface: - + New call get_mem_image_format returns bitmap size and bit depth - + New call copy_mem_image can copy bitmap into buffer with - different color order (RGB/BGR) and line stride - + dcraw_make_mem_image() uses calls mentioned above - + see documentation for info on these function parameters. - - * libraw/librawwindows.h implements LibRaw_datastream class based - on Windows memory mapped files.Win32/64-only - Thanks to Linc Brookes. - - * Fixed parallel make errors in configure/Makefile.am - - * LibRaw 0.13.6-Release - - -2011-05-18 Alex Tutubalin - * Imported new dcraw 9.08/1.443: - + New color data for Canon 600D and 1100D, Fuji S200EXR - + New camera supported: Fuji HS20EXR and F550EXR, Kodak Z990, - Nikon D5100, Olympus E-PL1s and XZ-1, - Samsung NX11, Sony A230 and 290. - * LibRaw 0.13.5-Release - -2011-04-02 Alex Tutubalin - * Imported new dcraw 9.07/1.442: - + Support for Canon 600D and 1100D, Hasselblad H4D-60, - Olympus E-PL2 - * Color data for Leaf Aptus II and Canon Powershot S2 IS - * LibRaw 0.13.4-Release - -2011-03-30 Alex Tutubalin - * Preliminary support for Leaf Aptus II cameras (no color data yet): - Leaf Aptus II 6,7,8,10 and 12 are tested, Aptus II 5 should work. - * Preliminary support for Fujifilm X100 camera (again, no color data). - * Fixed possible after the end of buffer read when working with - in-memory data. - * Fixed possible loss of JPEG stream sync marks in LJPEG decoder - (this bug was found only for Leaf Aptus II RAWs). - * LibRaw 0.13.3-Release - -2011-03-08 Alex Tutubalin - * Fixed broken camera white balance reading for some Sony cameras - * LibRaw 0.13.2-Release - -2011-02-25 Alex Tutubalin - * Sony A390 support (colordata from A380) - * Leica D-LUX 4: fixed typo in camera name in colordata - -2011-02-15 Alex Tutubalin - * New -mem option for dcraw_emu: I/O via allocated buffer - * Removed debug printf from LibRaw_memory_buffer code - * Preliminary shared library support - -2011-02-12 Alex Tutubalin - * Added qmake .pro and Visual Studio 2008 sln/vcproj project files -2011-02-07 Alex Tutubalin - * dcraw_emu documentation updated - * ./configure stuff changed for correct linking on some systems - * FBDD denoising is disabled for full-color images and 4-color bayer - data (including forced 4-color via four_color_rgb option) - * LibRaw 0.13.1-Release - -2011-02-05 Alex Tutubalin - * ./configure fixes for PACKAGE_REQUIRES - * Makefile.msvc: correct compiler flags for demosaic packs - * dcraw.c 9.06/1.440 imported: - + New camera support: Canon S95, Casio EX-Z1080, Panasonic GF2 - and GH2, Samsung NX100, Sony A-580 - + New color data for: Canon G12, Nikon D3100, D7000 and P7000, - Olympus E-5, Pentax K-r and K-5, Samsung NX10 and WB2000 - * green_matching() code is disabled for half-size processing - * LibRaw 0.13.0-Release - -2011-01-15 Alex Tutubalin - * Fallback to old huffman decoder for Sony files with unspecified - data length (Sony A100) - * Fixed incomplete data fields reset in LibRaw::recycle() - * LibRaw 0.13.0-Beta3 - -2011-01-13 Alex Tutubalin - * Better parsing of unknown command-line params in dcraw_emu sample - * Brigtness table in ahd_demosaic is calculated in reversed order - to prevent possible (very unlikely) multithreaded app problem. - * New exposure correction code based on linear-cubic root combination. - New working correction range is from 0.25 (-2 stops) to 8 (+3 stops) - * LibRaw 0.13.0-Beta2 - -2011-01-10 Alex Tutubalin - * Fixed file extension in half_mt.c sample - -2011-01-10 Alex Tutubalin - * Three patches provided by Jacques Desmis: - - Exposure correction before demosaic (demosaic pack GPL3) - - OpenMP speed-up in median filters (demosaic pack GPL2) - - OpenMP speed-up in green equilibration (demosaic pack GPL3) - * Merged 0.12.2-0.12.3 changes: - - Patches for ./configure system for better LCMS2 support - - Patches for ./configure system - - math.h included before any other includes to make KDE compile - with Visual C++ happy - - Fuji FinePix S5500 size adjusted to ignore (rare?) garbage - at top of frame. - * all client code should be recompiled due to internals change. - * LibRaw 0.13.0-Beta1 - -2010-12-22 Alex Tutubalin - * Zero copy huffman buffer for LibRaw_buffer_datastream - * Fixed memory leak in compressed NEFs handling - * LibRaw 0.13.0-Alpha2 - -2010-12-20 Alex Tutubalin - * Demosaic-pack-GPL3 changes: - + New noise reduction methods before demosaic - - Banding suppression - - High-frequency noise suppression - - Green channel equalization - + New chromatic abberration correction. - All three methods are written by Emil Martinec for Raw Therapee. - Adapted to LibRaw by Jacques Desmis - - * Merged Foveon code fix from LibRaw 0.12.1 - - * LJPEG decompressor speed-up (about 1.5 times for Canon cameras - and slightly less for others). Some ideas are from RawSpeed library. - - * all client code should be recompiled due to internals change. - - * LibRaw 0.13.0-Alpha1 - -2010-12-12 Alex Tutubalin - * Thread-safe and demosaic packs support for MinGW build - * Demosaic packs support for MS VC build - * LibRaw 0.12.0-Release - -2010-12-09 Alex Tutubalin - * Fixed bug in add_masked_borders_to_bitmap() call for cameras - with odd pixels border. - * New command line options for unprocessed_raw sample: - -B - subtract black level, -M - add masked pixels to bitmap. - * Foveon-sensor cameras added to supported camera list if - compiled with demosaic pack GPL2 - * LibRaw 0.12.0-Beta4 - -2010-12-05 Alex Tutubalin - * Demosaic packs support in Makefile.dist - * Foveon support in LibRaw demosaic pack GPL2 - * all client code should be recompiled due to internals change. - * LibRaw 0.12.0-Beta3 - -2010-11-27 Alex Tutubalin - * Fixed allocation bug in lmmse_interpolation (demosaic-pack-GPL2) - * In LMMSE and AMaZE interpolators allocation changed to calloc - to make valgrind happy with uninitialized values - * Changes in distribution-making scripts - * LibRaw 0.12.0-Beta2 - -2010-11-21 Alex Tutubalin - * Fixes to green_matching code by Sergey Pavlov - -2010-11-20 Alex Tutubalin - * Update for new demosaic-pack-GPL3 - * LibRaw 0.12.0-Beta1 - -2010-11-19 Alex Tutubalin - * Demosaic pack(s) supported via ./configure - -2010-11-17 Alex Tutubalin - * LCMS2 support - * afd_interpolate(2,1) instead of (5,0) - * dcraw_emu sample command line keys added and reordered - to reflect changes in LibRaw 0.12. - * Nikon P7000: color matrix data and black level patch for ISO >=400 - Thanks to Gunnar Thorburn - * Support for several industrial cameras based on Sony ICX 625/655 - sensor: JAI BB500CL/GE, SVS625CL, ptGrey GRAS-50S5C - Thanks to kaare - -2010-11-15 Alex Tutubalin - - * Several demosaic algorithms, found in other open-source RAW processing - packages are implemented in LibRaw. - - 1) DCB demosaic and FBDD denoise by Jacek Gozdz are included in - main LibRaw source. - 2) GPL2 demosaic pack with these demosaic methods: - * AFD and LMMSE implementations from PerfectRaw by Manuel Llorens - * VCD, Modified AHD, post-demosaic refinemend and median - filters by Paul Lee - 3) GPL3 demosaic pack with AMaZe interpolation by Emil Martinec - - See more details in README.demosaic-packs - - * Current implementation of dcraw_emu sample allows only selection - of demosaic method (via -q) options. All other parameters change - will be implemented later. - - * LibRaw 0.12-alpha1 - -2010-11-11 Alex Tutubalin - * Imported 0.11(2) version changes: - + Fixed dcraw_emu command line processing code - + OpenMP is completely disabled on MacOS X if compiled with -pthread - due to well-known MacOS problem. - + dcraw 9.05 (1.439) imported, many new cameras supported: - Canon: G12, SX120, 60D, - Hasselblad H4D, Nokia X2, Olympus E-5, - Nikon: D3100, D7000, P7000, - Panasonic: FZ40, FZ100, LX5, - Pentax: K-r, K-5, 645D, - Samsung GX20, WB2000 - * LibRaw 0.12-alpha0 - -2010-11-08 Alex Tutubalin - * Fixes for Sun Studio compiler compatibility - * Fixes for Visual Studio 2010 compatibility - * All russian-language files are converted to UTF-8 - * LibRaw 0.11.0-Release - -2010-10-18 Alex Tutubalin - * Disabled OpenMP for wavelet_denoise under Mac OS X - * More Visual C++ 2003 warnings cleaned in libraw/*h files - * LibRaw 0.11-Beta7 - -2010-10-16 Alex Tutubalin - * internal/dcraw_fileio.c can be compiled with -DDCRAW_VERBOSE again - * fixed comment style in libraw_datastream.h - * LibRaw 0.11-Beta6 - -2010-10-15 Alex Tutubalin - - * New changes to I/O layer. Three LibRaw_*datastream clasees are - exists: - + LibRaw_buffer_datastream - buffer reaging - + LibRaw_file_datastream - file reading using iostreams - (large files are no supported on some systems) - + LibRaw_bigfile_datastream - FILE*-based file I/O - - * file/bigfile_datastream is selected automatically by - LibRaw::open_file based on input file size. - By default, files larger than 250Mb are opened using - bigfile interface, you may change this behaviour - by using second optional parameter of open_file() - - * There is no way to use default parameter values in C API, - so new call libraw_open_file_ex added with two parameters - (file name and minimal file size for bigfile_datastream use). - - * all client code should be recompiled due to internals change. - - * All LibRaw_abstract_datastream functions are virtual again. You may - (again) use your own I/O layer. - - * new -d key for dcraw_emu sample: print timings of processing stages - - * simple_dcraw sample simplified: no mmap code - - * LibRaw 0.11-Beta5 - -2010-10-08 Alex Tutubalin - * Fixed bug in exception handling in OpenMP sections in - AHD interpolation code. - - * LibRaw_datastreams are now C++ iostreams based instead of old - plain FILE* calls. - LibRaw::open_file() in multithreaded programs are WAY faster - on many OSes (Linux, Windows, MacOSX) because of no extra locks. - - * all client code should be recompiled due to internals change. - - * LibRaw 0.11-Beta4 - - -2010-10-01 Alex Tutubalin - * Fixed bug in LibRaw::dcraw_process() code: for half_size - processing, params.four_color_rgb was set to 1 internally - and not returned back after postprocessing. - - * Several Visual Studio 2003 compatibility fixes - - * AHD interpolation refactored. Now it is about 10% faster than - dcraw in single-process mode and up to 1.5 times faster on - 4-core and OpenMP (total execution time counted, not AHD itself) - Thanks to Adam Hooper - * AHD interpolation refactored. Now it is about 10% faster than - dcraw in single-process mode and up to 1.5 times faster on - 4-core and OpenMP (total execution time counted, not AHD itself) - Thanks to Adam Hooper - - * LibRaw 0.11-Beta3 - -2010-09-07 Alex Tutubalin - * Phase One files: LibRaw::unpack() sets colordata.black to - approximately correct value. - - * Fixed minor error in setting colordata.maximum value - for Phase One files. - - * LibRaw::subtract_black() sets colordata.black and - colordata.cblack[] to zero to preserve data integrity. - - * LibRaw 0.11-Beta2 - - -2010-09-04 Alex Tutubalin - - * It is now possible to crop output image on postprocessing - stage (dcraw_process). Coordinates and size of the output box - are set via imgdata.params.cropbox[4] parameter. Look into - LibRaw documentation for more details. - - + New fatal error code LIBRAW_BAD_CROP - - + New dcraw_emu sample command line switch: -B x y w h - (sets cropbox) - - Thanks to Patrick and Jan. - - * Processing pipeline has changed: the black level is subtracted - from data on postprocessing stage either automatically - (on dcraw_process() stage) or by special LibRaw API call: - - + New API calls: LibRaw::subtract_black() (C++ API) and - libraw_subtract_black (C API). - If you use dcraw_process() or dcraw_document_mode_processing() - calls YOU DON'T NEED to call subtract_black() directly. - - + The raw preprocessing mode LIBRAW_FILTERING_NOBLACKS - is deprecated and removed from LibRaw. - - * New ./configure script. - Use ./configure -h for usage details. - Thanks to Siddhesh Poyarekar - - * New API cals static LibRaw::dcraw_clear_mem() (C++ API) - and libraw_dcraw_clear_mem(..) (C API). - This calls are used to free memory, allocated by - dcraw_make_mem_image() and dcraw_make_mem_thumb() instead - of free() call. - - In some cases LibRaw and calling process have different - memory managers, so free() of make_mem_image() data - results to program crash (especially in Win32/VisualStudio - enviroment). - - * LibRaw::free() is now private instead of public (again). - - * Minor changes and bugfixes: - - + Memory allocation exceptions (std::bad_alloc) are caught, - so LibRaw API calls will return reasonable error codes - instead of C++ exception (possibly unhandled). - This problem is very unlikely to see in wild: if application - cannot allocate small data for internal structure, it will - always fail on allocation for RAW image data. - - + WIN32/VisualStudio 2008/2010: fopen,fscanf and sscanf calls - in Libraw_datastream code are changed to *_s (secure) ones. - - + Debug print removed from fatal error handler. - - + Mmaped I/O for dcraw_emu sample is turned on via -E switch - now (because old -B switch is used for settng cropbox). - - * all client code should be recompiled due to structures size change - - * LibRaw 0.11-Beta1 - - -2010-07-31 Alex Tutubalin - * dcraw 9.04 (1.438) imported: changes in tiff metadata parser, - fixed a typo in Canon A720 model name - * small patch in Sony ARW2 unpacking code to make valgrind happy - * LibRaw 0.10.0-Beta3. - -2010-07-05 Alex Tutubalin - * dcraw 9.03 (1.437) imported: - + New cameras: Canon SX20, Nikon D3s, Olympus E-P2, Panasoni DMC-GF1, - Samsung EX1, Sony A450 - + Color data changed for some cameras - - * LibRaw 0.10.0-Beta2. - -2010-06-06 Alex Tutubalin - * dcraw 9.01 (1.434) imported: - + Separate black levels for each color channel. - + New cameras: Canon 550D, Casio EX-Z1050, Fuji HS10/HS11, - Kodak Z981, Panasonic G2 and G10, Phase One P65, - Samsung NX-10 and WB550, Sony NEX-3 and NEX-5. - + Fixed file descriptor leak in dark frame subtraction processing - - * Fixed dcraw 9.01's bug in DNG black level processing - - * Preliminary support for Sony A450 camera. - - * New command-line switch -h in mem_image sample (half_size support) - - * Some patches by Johannes Hanika (darktable author): - + OpenMP speedup for PPG-interpolation - + green_matching - suppress of 'color maze' on cameras with - different green channel sensitivity. This option is turns on - by filed with same name in imgdata.params - - * all client code should be recompiled due to structures size - change - - * LibRaw::free() is now public instead of private. - - * LibRaw 0.10.0-Beta1. - -2010-05-15 Alex Tutubalin - * Fixed bug in 8-bit RAW processing code - * LibRaw 0.9.1-Release - -2010-04-26 Alex Tutubalin - * OpenMP support: OpenMP is possible under MinGW (untested) - * LibRaw 0.9.0-Release - -2010-04-21 Alex Tutubalin - * Finally fixed inconsistency in Fuji files processing - * New COLOR(row,col) call to get bayer color index in image[] array - * Old FC() call is deprecated and will be removed in future releases - * unprocessed_raw sample switched to COLOR() call - * LibRaw 0.9.0-Beta5 - - -2010-04-10 Alex Tutubalin - * Fixed bug in unpacking DNG files made from Fuji RAFs. - * LibRaw 0.9.0-Beta4 - -2010-04-09 Alex Tutubalin - - * Fixed typecast error (problem reported only on gcc 4.2.1/32bit) - in CRW files processing. - - * C++ API call LibRaw::adjust_maximum() is now deprecated and - de-documented, use params.adjust_maximum_thr instead (on by default) - - * C-API call libraw_adjust_maximum() removed. - - * New postprocessing parameter params.adjust_maximum_thr - This parameter replaces LibRaw::adjust_maximum(), but more flexible - Defaults are reasonable (0.75, same as in old adjust_maximum), - look into documentation for more details. - - * Removed last OpenMP warning - - * dcraw_emu's -c parameter now wants numeric (float) argument. This value - is assigned to params.adjust_maximum_thr. - Use -c 0.0 for dcraw compatibility. - - * all client code should be recompiled due to structures size - change - - * LibRaw 0.9.0-Beta3 - - -2010-03-29 Alex Tutubalin - * Fixed a bug in channel_maximum[] calculation for - Panasonic cameras. - * channel_maximum[] data now calculated for ALL cameras. - * OpenMP warnings suppressed. - * Documented the -c command-line switch for dcraw_emu sample. - * Removed extra messages from dcraw_emu sample. - * LibRaw 0.9.0-Beta2 - -2010-03-28 Alex Tutubalin - - New licensing: - - * Triple licensing (selected by LibRaw user): - - + LGPL 2.1 (http://www.gnu.org/licenses/lgpl-2.1.html) - + CDDL 1.0 (http://www.opensource.org/licenses/cddl1.txt) - + LibRaw Software License (27 March 2010 version) - (http://www.libraw.org/data/LICENSE.LibRaw.pdf) - - * There is no separate LibRaw-Lite and LibRaw-Commercial versions, - only single LibRaw. - Current LibRaw-Lite and LibRaw-Commercial users should switch - to LibRaw without loss of functionality. - It is possible to change licensig too (e.g. from LGPL to CDDL - for LibRaw-Lite users and from LibRaw License to LGPL or CDDL - for LibRaw-Commercial users). - - * No Foveon support :( - It is not possible to get good color from Foveon sensors with - *any* converter. So, there is no need to support these cameras. - Dcraw's Foveon-processing code is too strict licensed (GPL), - so we choose to drop it. - - New Features: - - * New data field colordata.channel_maximum[4] - per channel data - maximum (calculated for most cameras, 0 for others). - - * New call LibRaw::adjust_maximum() (and libraw_adjust_maximum() in C API). - This call changes hardcoded colordata.maximum value to calculated - at unpack stage. This helps suppress false color in highlights - (magenta clouds and so). - - * New command line parameter -c for dcraw_emu sample. Calls adjust_maximum() - for each processed file. - - * all client code should be recompiled due to structures size - change - - * LibRaw 0.9.0-Beta1 - -2010-02-06 Alex Tutubalin - * Fixed ambiguity in pow/sqrt calls (to make Sun C++ compiler happy) - * OpenMP is not supported under MS Visual Studio - * Masked a bug in RIFF format parser - * LibRaw 0.8.6 - -2009-12-30 Alex Tutubalin - * Fixed bug in simple_dcraw sample parameters processing - * Imported dcraw 8.99 (1.432): - + New cameras: Canon: 1D mk IV, Canon S90; Casio Z750, - Nikon D3S, Pentax K-x, Sony A-500/550, Fuji S200EXR - + New color data for Canon G11 and Sony A850 - + Changes in Canon sRAW processing - + Changes in Kodak metadata processing - + Changes in uncompressed Fuji files processing (FinePix S5xxx) - * LibRaw 0.8.5 - -2009-11-21 Alex Tutubalin - + Fixed a bug in processing of uncompressed Phase One files - * LibRaw 0.8.4 - -2009-10-24 Alex Tutubalin - + Imported dcraw 8.98/1.431: - * New Cameras: Canon 7D, Panasonic GF1, Sony A850 and A380, - Casio Z850, Nikon D300s - + changes in libraw_datastream.h to make compilers more happy - * LibRaw 0.8.3 - -2009-09-02 Alex Tutubalin - + Fixed bug in Hasselblad .3FR unpacking code - * Imported dcraw 8.97/1.428: Nikon D3000 image width fix - * LibRaw 0.8.2 - -2009-08-31 Alex Tutubalin - + Enum LibRaw_thumbnail_formats (LIBRAW_IMAGE_*) values changed to - match values in enum LibRaw_image_formats (LIBRAW_THUMBNAIL_*). - You need to recompile all sources using these constants. - -2009-08-30 Alex Tutubalin - * Imported dcraw 8.97/1.427: - + new cameras: Canon A470, Canon G11 (without color data), - Nikon D3000, Olympus E-P1, Panasonic DMC-FZ35/FZ38 - + some changes in decoding code. - * Fixes for Microsoft Visual C++ 6.0 compatibility - * C-API dcraw_make_mem_thumb() call finally exported in API - * LibRaw 0.8.1 - -2009-08-24 Alex Tutubalin - * Imported dcraw 8.96/1.426 - + New cameras: Casio EX-Z60 and EX-Z75, Kodak Z980, - Nikon D5000, Olympus X200, D560Z,C350Z,E620, - Pentax K7, Sony A330. - + New color data for many cameras - + Generalized unpacker code for Canon and Casio P&S cameras - * LibRaw 0.8.0-Release - -2009-08-13 Alex Tutubalin - * RAW files larger than 2Gb are supported on: - - Unix (all supported: FreeBSD, MacOS X, Linux) - - Windows (with C runtime version >= 8.0) - * bzero replaced with memset to make Solaris users happy - * All applications on 32-bit systems should be recompiled - due to data structures size changes. - * Minor fixes in windows makefile - * LibRaw 0.8.0-Beta5 - -2009-07-21 Alex Tutubalin - * Imported dcraw 8.95 (1.425): - + new huffman tree code - + New cameras supported: AGFAPHOTO DC-833m, Casio EX-S20, - Phase One P65, Samsung S850 - + Removed hardcoded white-balance data for many P&S cameras. - It is recommended to set params.use_camera_wb to 1 for - safe WB. - * Fixes for Nikon D5000 files: no pink stripe at - right side of frame - * C-wrapper: added missed calls - libraw_dcraw_make_mem_image - libraw_dcraw_ make_mem_thumb - * Minor fixes to make non-gcc compilers more happy - * Internal structures changed, full recompilation of all client - code is needed. - * LibRaw 0.8.0-Beta4 - -2009-06-08 Alex Tutubalin - * Fixes: gamma curve processing was not performed in - dcraw_write_mem_image() - * Fixes: gamma curve processing was not performed for - Kodak thumbnails - * LibRaw 0.8.0-Beta3 - -2009-06-05 Alex Tutubalin - * Fixes in documentation: params.gamm[] described more precisely - * Fixes in version number, 0.8-beta1 was mistakenly 0.0.0-beta1 - * LibRaw 0.8.0-Beta2 - -2009-06-04 Alex Tutubalin - * Imported dcraw 8.94 (1.423): - + New camera support: - Canon: SX1, 500D/Rebel T1i, A570, A590, SX110 - Kodak Z1015, Motorola PIXL, Olympus E30, Panasonic DMC-GH1 - + Improved color data for Nikon D3X - + New gamma curve model - + Many changes in RAW unpacking code - + Canon cameras: black level is not subtracted if set - params.document_mode > 1 - - * API changed: params.gamma_16bit field removed. Gamma curve is - set via params.gamm[0]/gamm[1] values (see documentation and - samples for details) - * LibRaw::identify() splitted to avoid MS VS2008 bug (too many - nested blocks) - - * Samples: dcraw_emu and mem_image samples supports new dcraw - 16bit/gamma semantics: - -6: set 16 bit output - -4: set 16 bit output and linear gamma curve and no auto - brighness - * LibRaw 0.8.0-Beta1 - -2009-04-28 Alex Tutubalin - * Identify sample renamed to raw-identify (name conflict - with ImageMagic) - * Copyright notice changes - * Many compiler warnings removed - -2009-04-07 Alex Tutubalin - * More accurate types conversion in libraw_datastream.h - * New postprocessing parameter auto_bright_thr: set portion of - clipped pixels for auto brightening code (instead of - dcraw-derived hardcoded 1%) - * -U option for dcraw_emu sample sets auto_bright_thr parameter - * all client code should be recompiled due to structures size - change - * LibRaw 0.7.2-Release - -2009-03-22 Alex Tutubalin - * Fixed typo in OpenMP support code - * MinGW support - * dcraw source is included in distribution - * LibRaw 0.7.1-Release - -2009-03-15 Alex Tutubalin - * Fuji SuperCCD RAWs: color channels unshuffled on RAW - read stage (moved from postprocessing stage) - - * LibRaw 0.7.0-Release - -2009-03-13 Alex Tutubalin - * dcraw 8.93/1.421 imported: - + more accurate pentax dSLR support - + fixes in Kodak 620x/720x identification - + faster identification procedure for some formats. - * LibRaw 0.7.0-Beta5 - - -2009-03-08 Alex Tutubalin - * dcraw 8.92/1.420 imported: - + user-specified gamma curve - + Pentax K2000/Km support - + Changes in Canon sRAW processing (support for 5D2 fw 1.07) - - * all client code should be recompiled - - * LibRaw 0.7.0-Beta4 - -2009-02-13 Alex Tutubalin - * bugfix: 4channels sample finally subtracts black by default - * dcraw 8.91/1.419 imported: - + fixes in RIFF files parsing - - * LibRaw 0.7.0-Beta3 - -2009-02-12 Alex Tutubalin - * Black level was not calculated for Canon RAWs in - some filtering modes - - * 4channels sample prints calculated black level - (scaled if autoscaling used). - Also output file names for this sample now includes - color channel name (R/G/B/G2 or C/M/Y/G) - - * LibRaw 0.7.0-Beta2 - -2009-02-09 Alex Tutubalin - * New sample 4channels: splits RAW color channels into four - separate TIFFs - - * LibRaw 0.7.0-Beta1 - -2009-02-07 Alex Tutubalin - * Fixed bug in external jpeg metadata reading code. - - * Cleaned some C++ warnings - - * dcraw 8.91/1.418 imported - + Hasselblad V96C support - - * You need to clean and recompile client code which - uses LibRaw_*_datastream classes. - - * LibRaw 0.7.0-Alpha6 - -2009-01-30 Alex Tutubalin - - * New data input framework is created. It is possible now to - easyly implement your own data input interface for LibRaw - (e.g. for reading RAW data from network data stream) - - * All older programs using previous LibRaw versions are - compatible at source code level. - - * LibRaw can read RAW data from memory buffer via - new LibRaw::open_buffer() API call (implemented on top of - new input framework). - This call used in sample application dcraw_emu and simple_dcraw - (with -B command-line switch) to test new API. - - * Error handling callback functions now can be called with - NULL filename passed (if underlying data stream object - does not know file name). - So, client error handling callbacks should work with NULL - filename. - - * All client code should be recompiled - - * Imported dcraw 8.90/1.417: - + Support for loading White Balance data from - Sony ARW files edited with Sony IDC software. - - * LibRaw 0.7.0-Alpha5 - -2009-01-17 Alex Tutubalin - * Raw filtering mode LIBRAW_FILTERING_NOPOSTPROCESS has renamed - to LIBRAW_FILTERING_NORAWCURVE for better reflect its purpose. - This filtering_mode bit turns off tone curve applying on - RAW data on bayer-pattern cameras with raw tone curve: - + Adobe DNG (only RAW with bayer pattern) - + Nikon compressed NEF - + Some Kodak cameras - + Sony A700/A900 (tone curve applied to 8-bit raws) - - * unprocessed_raw sample: added command-line key -N, this key - turns on LIBRAW_FILTERING_NORAWCURVE filtering mode. - - * New scheme of Fuji RAW processing (introduced in 0.7-Alpha3) - supports DNG files generated from Fuji RAF. - - * Imported dcraw 8.90/1.416: - + better support for Samsung S85 - + fixed possible integer overflow in wavelet denoising code - - * LibRaw 0.7.0-Alpha4 - - -2009-01-14 Alex Tutubalin - * Black mask extraction supported for all files with bayer data - (one component per pixel). Black mask data not avaliable - for multi-component data (Foveon, Canon sRAW, Sinar 4-shot, - Kodak YCC/YRGB). - - * Black level subtraction can be turned off for all bayer - cameras (added support for PhaseOne backs). - - * Fujifilm camera processing model changed: - + RAW data is extracted without 45-degree rotation - + dcraw-compatible rotation is performed on postptocessing stage - + it is possible to rotate RAW data without postprocessing - by LibRaw::rotate_fuji_raw() call. - - * New filtering mode setting: LIBRAW_FILTERING_NOPOSTPROCESS - This bits turns off RAW tone curve processing based on tone curve - readed from RAW metadata. - This mode supported only for PhaseOne backs now (to be supported - on all relevant cameras in nearest future releases) - - * Black level data (got from RAW data) are stored for PhaseOne backs. - - * Black level subtraction bug (derived from dcraw) fixed - for PhaseOne files. - - * Fixed processing of -s parameter for dcraw_emu sample - - * Parameter -s N (select shot number) added to - unprocessed_raw sample. - - * Imported dcraw 8.90/1.414: - + changes in QuickTake 100 metadata processing - + changes in external jpeg processing code - + Samsung S85 support - - * All client code should be recompiled - - * LibRaw 0.7.0-Alpha3 released - -2009-01-10 Alex Tutubalin - * Fixed bug in add_masked_borders: crash if output dimensions - is already larger than raw dimensions - * Fixed out of bounds in samples/unprocessed_raw.cpp for files - with non-square pixels - - * LibRaw 0.7.0-Alpha2 released - -2009-01-08 Alex Tutubalin - * Fixed bug in 0.7.0-a0: black frame size has not reset, - so in batch processing there is an error in black frame - size for files without black frame. - - * Implemented reading of black/masked pixels data for - near all cameras with masked pixels, exclding: - + Canon sRAW, Leaf (MOS), Sinar 4-shot - more than one - color component in black frame (redesign of black frame - data structures required). - + Fuji SuperCCD: need to design right methods of extraction - (should we rotate and resize black pixels as active ones??) - - * Tested for most dSLR data formats with masked pixels: 7 of 9 - untested formats are from old P&S cameras. - - * New call LibRaw::unpack_function_name() returns unpack function name - (useful for testers only) - - * New identify sample parameters (useful for test-suite builders - to check test coverage): - -u - print unpack function name - -f - print masked frame size - These parameters works only for identify run without -v parameter - - * Imported dcraw 8.89/1.411 - + changes in Panasonic FZ50 files parsing - - * LibRaw 0.7.0-Alpha1 released - - -2009-01-05 Alex Tutubalin - * It is possible to turn off RAW data filtration (black level - subtraction, zero pixels averaging): - + supported on all cameras except Foveon and Phase One - + filtraction controlled by new parameter "filtering_mode" - + it is possible to expand API by filtering procedures - built for specific camera model. - - * Black border (masked pixels) extraction: - + API (data structures) for storing black mask. - + Black mask extraction supported only for limited list of - data formats: - - Canon .CRW, .CR2 (with exception of sRAW),A600, A5 - - Adobe DNG (both converted RAW and native DNG) - - Nikon NEF (compressed only) - this list to be expanded in future LibRaw versions - * New call add_masked_borders_to_bitmap makes full bitmap - 'masked border' + image - * Usage sample for functionality listed above: - samples/unprocessed_raw - * Imported dcraw 8.89/1.410: - + fixed bugs in Hasselblad .fff decoding - + fixes in Imacon metadata decoding - * Documentation changes - * All client code should be recompiled - * LibRaw 0.7.0-Alpha0 - - -2009-01-01 Alex Tutubalin - * Fixed a bug (filedescriptor and buffer memory leak) in thumbnail - extraction when called before metadata analysis. - Thanks to Albert Astalis Cid. - * LibRaw 0.6.4 Release - -2008-12-11 Alex Tutubalin - * Imported new edition of dcraw 8.89 (version 1.409) - * Nikon NEF decoding changed - * LibRaw 0.6.3 Release - -2008-12-03 Alex Tutubalin - * fixed bug in Panasonic .RW2 processing (only for thread-safe version, - single-threaded version was not affected) - * All client code should be recompiled - * LibRaw 0.6.2 Release - -2008-12-03 Alex Tutubalin - * Imported dcraw 8.89 (version 1.407) - * New cameras: - Canon G10 & 5D Mk2, Leaf AFi 7, Leica D-LUX4, Panasonic FX150 & G1, - Fujifilm IS Pro, - * Changed camera support (color conversion tables): - Canon 50D, Nikon D90 & P6000, Panasonic LX3 & FZ28, Sony A900 - * LibRaw 0.6.2 beta - -2008-09-25 Alex Tutubalin - * Added new data field float LibRaw::imgdata.color.cam_xyz[4][3]. - This field contains constant table (different for each camera) for - Camera RGB->XYZ conversion. - * All client code should be recompiled - * LibRaw 0.6.1 Release - -2008-09-18 Alex Tutubalin - * dcraw 8.88 imported: - - new cameras (Canon 50D, Sony A900, Nikon D90 & P6000, - Panasonic LX3 FZ28) - - new method of black point subtraction for Canon cameras, - preliminary banding supression. - * Stack memory usage lowered (some thread data moved to dynamic - memory) - * some patches for MSVC compatibility - * LibRaw 0.6.0 Release - -2008-09-16 Alex Tutubalin - * Enum definitions changed to make gcc -pedantic happy - * Compiler/preprocessor flags does not affects LibRaw class field set - (i.e. structure for thread local storage is always allocated) - * Default library compilation mode (i.e. sources imported in another - project) is thread-safe - -2008-09-14 Alex Tutubalin - * OpenMP support for most CPU consuming steps of processing: - ahd_interpolation. wavelet_denoise - 10-30% speed-up of full processing pipe on 2-core CPU - OpenMP supported only on gcc (Linux/FreeBSD and Mac OS X) - - * LibRaw 0.6.0-Beta-1 - -2008-09-10 Alex Tutubalin - * All set_**handler accepts additional void* pointer, which should point to - callback private data. This pointer passed to user callback when it called. - - * LibRaw 0.6.0-alpha5 - - * All client code should be recompiled - -2008-09-10 Alex Tutubalin - * New processing stages in enum LibRaw_progress: - LIBRAW_PROGRESS_BAD_PIXELS LIBRAW_PROGRESS_DARK_FRAME - (reserved stages LIBRAW_PROGRESS_RESERVED_PRE1-PRE2 has removed) - * libraw_strprogress() - convert progress code into string - - * Added progress/cancellation user callbacks - + new fatal error code: CANCELLED_BY_CALLBACK - + sample usage in samples/dcraw_emu.cpp (try run it with -v -v -v opts) - - * LibRaw 0.6.0-alpha4 - - * All client code should be recompiled - -2008-09-08 Alex Tutubalin - * ICC-profiles support (same as in dcraw) - + input/output profiles (specified as path to 'icc' file or 'embed' for - embedded input profile) - + additional warnings - + LCMS library used - - * support of bad pixel map (caller should specify path to bad pixel file - in dcraw-compatible format) - - * dark frame subtraction support (caller should supply path to 16-bit PGM - map). samples/simple_dcraw.cpp - -4 option added for dark frame file - generation - - * support of bad pixeld map (dcraw-compatible format) - - * the dcraw_emu sample supports all new features (ICC, dark frame, bad - pixels) - - * libraw/libraw_version.h, defines, calls and macros for version checks: - + LibRaw::version(), LibRaw::versionNumber(), LIBRAW_CHECK_VERSION() - - * List of supported cameras: - + LibRaw::cameraCount() - + LibRaw::cameraList() - - * fixed error in adjust_sizes_info_only - - * documentation changes - - * LibRaw 0.6.0-alpha3 - -2008-09-07 Alex Tutubalin - * samples/mem_image.c - bitwise equal output with dcraw -4 - (PPMs outputted with network byte order) - * LibRaw 0.6.0-alpha2 - -2008-09-06 Alex Tutubalin - * Added calls dcraw_make_mem_image and dcraw_make_mem_image: - + functions (and supporting code) - + documentation changed - + new sample code samples/mem_image.cpp - * Added processing parameter LibRaw::imgdata.params.gamma_16bit - (set to 1 to make gamma correction for 16-bit output) - * LibRaw 0.6.0-alpha1 - -2008-08-28 Alex Tutubalin - * dcraw 1.404 (8.87) imported: - - 6 new cameras supported (Canon 1000D, A720, SD300; - Nikon D700, Oly E-520,Kodak C603) - * Licensing changed to GPL v2 - -2008-05-02 Alex Tutubalin - * mmap/malloc+read IO-layer removed due to no performance gain. - FILE I/O returned - -2008-05-02 Alex Tutubalin - * dcraw 1.403 imported - - changes in ljpeg decompression (index values cut to 12 bit) - - changes in parse_foveon() jpeg thumbnail extraction - * LibRaw 0.5.3 released - -2008-04-24 Alex Tutubalin - * Linux build of samples/identify fixed - * documentation editorial - * LibRaw 0.5.2 released - -2008-04-21 Alex Tutubalin - * All documentation translated to English - * English changelog started :) - * minor bug (include path) fixed in samples/half_mt - * LibRaw 0.5.1 released diff --git a/Source/LibRawLite/LICENSE.CDDL b/Source/LibRawLite/LICENSE.CDDL deleted file mode 100644 index 8ee560c..0000000 --- a/Source/LibRawLite/LICENSE.CDDL +++ /dev/null @@ -1,340 +0,0 @@ -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - -1. Definitions. - -1.1. Contributor means each individual or entity that creates or -contributes to the creation of Modifications. - -1.2. Contributor Version means the combination of the Original -Software, prior Modifications used by a Contributor (if any), -and the Modifications made by that particular Contributor. - -1.3. Covered Software means (a) the Original Software, or (b) -Modifications, or (c) the combination of files containing -Original Software with files containing Modifications, in each -case including portions thereof. - -1.4. Executable means the Covered Software in any form other -than Source Code. - -1.5. Initial Developer means the individual or entity that first -makes Original Software available under this License. - -1.6. Larger Workmeans a work which combines Covered Software or -portions thereof with code not governed by the terms of this -License. - -1.7. License means this document. - -1.8. Licensable means having the right to grant, to the maximum -extent possible, whether at the time of the initial grant or -subsequently acquired, any and all of the rights conveyed herein. - -1.9. Modifications means the Source Code and Executable form of -any of the following: A. Any file that results from an addition -to, deletion from or modification of the contents of a file -containing Original Software or previous Modifications; B. Any -new file that contains any part of the Original Software or -previous Modification; or C. Any new file that is contributed or -otherwise made available under the terms of this License. - -1.10. Original Software means the Source Code and Executable -form of computer software code that is originally released under -this License. - -1.11. Patent Claims means any patent claim(s), now owned or -hereafter acquired, including without limitation, method, -process, and apparatus claims, in any patent Licensable by -grantor. - -1.12. Source Code means (a) the common form of computer software -code in which modifications are made and (b) associated -documentation included in or with such code. - -1.13. You (or Your) means an individual or a legal entity -exercising rights under, and complying with all of the terms of, -this License. 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 -more than fifty percent (50%) of the outstanding shares or -beneficial ownership of such entity. - -2. License Grants. - -2.1. The Initial Developer Grant. Conditioned upon Your -compliance with Section 3.1 below and subject to third party -intellectual property claims, the Initial Developer hereby -grants You a world-wide, royalty-free, non-exclusive license: - -(a) under intellectual property rights (other than patent or -trademark) Licensable by Initial Developer, to use, reproduce, -modify, display, perform, sublicense and distribute the Original -Software (or portions thereof), with or without Modifications, -and/or as part of a Larger Work; and - -(b) under Patent Claims infringed by the making, using or -selling of Original Software, to make, have made, use, practice, -sell, and offer for sale, and/or otherwise dispose of the -Original Software (or portions thereof); - -(c) The licenses granted in Sections 2.1(a) and (b) are -effective on the date Initial Developer first distributes or -otherwise makes the Original Software available to a third party -under the terms of this License; - -(d) Notwithstanding Section 2.1(b) above, no patent license is -granted: (1) for code that You delete from the Original -Software, or (2) for infringements caused by: (i) the -modification of the Original Software, or (ii) the combination -of the Original Software with other software or devices. - -2.2. Contributor Grant. Conditioned upon Your compliance with -Section 3.1 below and subject to third party intellectual -property claims, each Contributor hereby grants You a -world-wide, royalty-free, non-exclusive license: - -(a) under intellectual property rights (other than patent or -trademark) Licensable by Contributor 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 Software -and/or as part of a Larger Work; and - -(b) under Patent Claims infringed by the making, using, or -selling of Modifications made by that Contributor either alone -and/or in combination with its Contributor Version (or portions -of such combination), to make, use, sell, offer for sale, have -made, and/or otherwise dispose of: (1) Modifications made by -that Contributor (or portions thereof); and (2) the combination -of Modifications made by that Contributor with its Contributor -Version (or portions of such combination). - -(c) The licenses granted in Sections 2.2(a) and 2.2(b) -areeffective on the date Contributor first distributes or -otherwise makes the Modifications available to a third party. - -(d) Notwithstanding Section 2.2(b) above, no patent license is -granted: (1) for any code that Contributor has deleted from the -Contributor Version; (2) for infringements caused by: (i) third -party modifications of Contributor Version, or (ii) the -combination of Modifications made by that Contributor with other -software (except as part of the Contributor Version) or other -devices; or (3) under Patent Claims infringed by Covered -Software in the absence of Modifications made by that -Contributor. - -3. Distribution Obligations. - -3.1. Availability of Source Code. Any Covered Software that You -distribute or otherwise make available in Executable form must -also be made available in Source Code form and that Source Code -form must be distributed only under the terms of this License. -You must include a copy of this License with every copy of the -Source Code form of the Covered Software You distribute or -otherwise make available. You must inform recipients of any such -Covered Software in Executable form as to how they can obtain -such Covered Software in Source Code form in a reasonable manner -on or through a medium customarily used for software exchange. - -3.2. Modifications. The Modifications that You create or to -which You contribute are governed by the terms of this License. -You represent that You believe Your Modifications are Your -original creation(s) and/or You have sufficient rights to grant -the rights conveyed by this License. - -3.3. Required Notices. You must include a notice in each of Your -Modifications that identifies You as the Contributor of the -Modification. You may not remove or alter any copyright, patent -or trademark notices contained within the Covered Software, or -any notices of licensing or any descriptive text giving -attribution to any Contributor or the Initial Developer. - -3.4. Application of Additional Terms. You may not offer or -impose any terms on any Covered Software in Source Code form -that alters or restricts the applicable version of this License -or the recipients rights hereunder. You may choose to offer, and -to charge a fee for, warranty, support, indemnity or liability -obligations to one or more recipients of Covered -Software. 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 that 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.5. Distribution of Executable Versions. You may distribute the -Executable form of the Covered Software under the terms of this -License or under the terms of 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 form does not attempt to limit or -alter the recipients rights in the Source Code form from the -rights set forth in this License. If You distribute the Covered -Software in Executable form 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 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.6. Larger Works. You may create a Larger Work by combining -Covered Software 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 Software. - -4. Versions of the License. - -4.1. New Versions. Sun Microsystems, Inc. is the initial license -steward and may publish revised and/or new versions of this -License from time to time. Each version will be given a -distinguishing version number. Except as provided in Section -4.3, no one other than the license steward has the right to -modify this License. - -4.2. Effect of New Versions. You may always continue to use, -distribute or otherwise make the Covered Software available -under the terms of the version of the License under which You -originally received the Covered Software. If the Initial -Developer includes a notice in the Original Software prohibiting -it from being distributed or otherwise made available under any -subsequent version of the License, You must distribute and make -the Covered Software available under the terms of the version of -the License under which You originally received the Covered -Software. Otherwise, You may also choose to use, distribute or -otherwise make the Covered Software available under the terms of -any subsequent version of the License published by the license -steward. - -4.3. Modified Versions. When You are an Initial Developer and -You want to create a new license for Your Original Software, You -may create and use a modified version of this License if You: -(a) rename the license and remove any references to the name of -the license steward (except to note that the license differs -from this License); and (b) otherwise make it clear that the -license contains terms which differ from this License. - -5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE 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 SOFTWARE 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 -SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE 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 SOFTWARE -IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - -6.1. 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. Provisions which, by their nature, must remain in -effect beyond the termination of this License shall survive. - -6.2. If You assert a patent infringement claim (excluding -declaratory judgment actions) against Initial Developer or a -Contributor (the Initial Developer or Contributor against whom -You assert such claim is referred to as Participant) alleging -that the Participant Software (meaning the Contributor Version -where the Participant is a Contributor or the Original Software -where the Participant is the Initial Developer) directly or -indirectly infringes any patent, then any and all rights granted -directly or indirectly to You by such Participant, the Initial -Developer (if the Initial Developer is not the Participant) and -all Contributors under Sections 2.1 and/or 2.2 of this License -shall, upon 60 days notice from Participant terminate -prospectively and automatically at the expiration of such 60 day -notice period, unless if within such 60 day period You withdraw -Your claim with respect to the Participant Software against such -Participant either unilaterally or pursuant to a written -agreement with Participant. - -6.3. In the event of termination under Sections 6.1 or 6.2 -above, all end user licenses that have been validly granted by -You or any distributor hereunder prior to termination (excluding -licenses granted to You by any distributor) shall survive -termination. - -7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO -LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR -OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER -CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY -SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY -INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY -CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST -PROFITS, 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 -PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH -LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR -LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS -EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. The Covered Software is a -commercial item, as that term is defined in 48 C.F.R. 2.101 -(Oct. 1995), consisting of commercial computer software (as that -term is defined at 48 C.F.R. 252.227-7014(a)(1)) 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 Software with only -those rights set forth herein. This U.S. Government Rights -clause is in lieu of, and supersedes, any other FAR, DFAR, or -other clause or provision that addresses Government rights in -computer software under this License. - -9. 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 the law of the jurisdiction -specified in a notice contained within the Original Software -(except to the extent applicable law, if any, provides -otherwise), excluding such jurisdictions conflict-of-law -provisions. Any litigation relating to this License shall be -subject to the jurisdiction of the courts located in the -jurisdiction and venue specified in a notice contained within -the Original Software, with the losing party responsible for -costs, including, without limitation, court costs and reasonable -attorneys fees and expenses. The application of the United -Nations Convention on Contracts for the International Sale of -Goods is expressly excluded. Any law or regulation which -provides that the language of a contract shall be construed -against the drafter shall not apply to this License. You agree -that You alone are responsible for compliance with the United -States export administration regulations (and the export control -laws and regulation of any other countries) when You use, -distribute or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and -the Contributors, each party is responsible for claims and -damages arising, directly or indirectly, out of its utilization -of rights under this License and You agree to work with Initial -Developer and Contributors to distribute such responsibility on -an equitable basis. Nothing herein is intended or shall be -deemed to constitute any admission of liability. - ----------------------------------------------------------------- - -NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND -DISTRIBUTION LICENSE (CDDL): This code is released under the -CDDL and shall be governed by the laws of the State of -California (excluding conflict-of-law provisions). Any -litigation relating to this License shall be subject to the -jurisdiction of the Federal Courts of the Northern District of -California and the state courts of the State of California, with -venue lying in Santa Clara County, California. - ----------------------------------------------------------------- - diff --git a/Source/LibRawLite/LICENSE.LGPL b/Source/LibRawLite/LICENSE.LGPL deleted file mode 100644 index 3b20440..0000000 --- a/Source/LibRawLite/LICENSE.LGPL +++ /dev/null @@ -1,458 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 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. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -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 and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, 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 library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete 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 distribute a copy of this License along with the -Library. - - 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 Library or any portion -of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -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 Library, 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 Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you 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. - - If distribution of 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 satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be 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. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library 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. - - 9. 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 Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -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 with -this License. - - 11. 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 Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library 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 Library. - -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. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library 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. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser 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 Library -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 Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -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 - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "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 -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. 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 LIBRARY 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 -LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS diff --git a/Source/LibRawLite/LibRawLite.2003.vcproj b/Source/LibRawLite/LibRawLite.2003.vcproj deleted file mode 100644 index 4531a31..0000000 --- a/Source/LibRawLite/LibRawLite.2003.vcproj +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/LibRawLite/LibRawLite.2005.vcproj b/Source/LibRawLite/LibRawLite.2005.vcproj deleted file mode 100644 index b1ae48c..0000000 --- a/Source/LibRawLite/LibRawLite.2005.vcproj +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/LibRawLite/LibRawLite.2008.vcproj b/Source/LibRawLite/LibRawLite.2008.vcproj deleted file mode 100644 index 1fda792..0000000 --- a/Source/LibRawLite/LibRawLite.2008.vcproj +++ /dev/null @@ -1,409 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/LibRawLite/README b/Source/LibRawLite/README deleted file mode 100644 index 6f2cd3b..0000000 --- a/Source/LibRawLite/README +++ /dev/null @@ -1,28 +0,0 @@ -====================== LibRaw ============================== -== Library for reading and processing of RAW digicam images == - -LibRaw is a library for reading RAW files from digital photo cameras -(CRW/CR2, NEF, RAF, DNG, MOS, KDC, DCR, etc, virtually all RAW formats are -supported). - -It pays special attention to correct retrieval of data required for subsequent -RAW conversion. - -The library is intended for embedding in RAW converters, data analyzers, and -other programs using RAW files as the initial data. - -LibRaw library, Copyright (C) 2008-2009 LibRaw LLC (info@libraw.org) -The library includes source code from - - dcraw.c, Dave Coffin's raw photo decoder - Copyright 1997-2010 by Dave Coffin, dcoffin a cybercom o net - -LibRaw is distributed for free under three different licenses: - * GNU Lesser General Public License, version 2.1 - * COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - * LibRaw Software License - -You may use one of these licensing modes and switch between them. - -If you modify LibRaw source and made your changes public, you should accept -all three licensing modes for your changes/additions. diff --git a/Source/LibRawLite/README.demosaic-packs b/Source/LibRawLite/README.demosaic-packs deleted file mode 100644 index e91d644..0000000 --- a/Source/LibRawLite/README.demosaic-packs +++ /dev/null @@ -1,46 +0,0 @@ -======================= LibRaw demosaic pack(s) =============================== - -There are many good interpolation (demosaic) methods implemented in open-source -world. - -Unfortunately, some of these methods are distributed under the terms of -different versions of GNU General Public License (GPL). So it is not possible -to include implementation of these demosaics into the LibRaw distribution -because LibRaw is distributed under more liberal licenses (LGPL and CDDL). - -Of course, it is possible to distribute these demosaic methods in separate -packages and use within LibRaw under following conditions: - - * LibRaw is used under the terms of LGPL license which is GPL-compatible - * Resulting product (which uses LibRaw AND LibRaw-demosaic-pack) is licensed - under GPL2+ (for GPL2 demosaic-pack) or GPL3+ (if demosaic-pack-GPL3 is used). - -For now demosaic packs are available via GitHub only: - - 1) LibRaw demosaic pack GPL2+ - GitHub URL: git://github.com/LibRaw/LibRaw-demosaic-pack-GPL2.git - - This pack includes these demosaic implementations: - - * AFD and LMMSE implementations from PerfectRaw by Manuel Llorens - * VCD, Modified AHD, post-demosaic refinemend and median - filters by Paul Lee - - 2) LibRaw demosaic pack GPL3+ - GitHub URL: git://github.com/LibRaw/LibRaw-demosaic-pack-GPL3.git - - This pack includes AMaZe interpolation by Emil Martinec. - -== How To Use (developer only!) === - -1. Get LibRaw-0.12... and unpack it in some folder. - -2. Checkout one or both demosaic pack(s) in the same folder (NOT within LibRaw folder). - -3. Check Makefile settings: -CFLAGS_DP1 and CFLAGS_DP2 should point to demosaic pack(s) folder(s) -CFLAGS should have -DLIBRAW_DEMOSAIC_PACK_GPL2/-DLIBRAW_DEMOSAIC_PACK_GPL3 setting - -4. Just run make. - -./configure stuff is not supported with demosaic-pack(s) for now. diff --git a/Source/LibRawLite/dcraw/dcraw.c b/Source/LibRawLite/dcraw/dcraw.c deleted file mode 100644 index dd0e1f9..0000000 --- a/Source/LibRawLite/dcraw/dcraw.c +++ /dev/null @@ -1,9464 +0,0 @@ -/* - dcraw.c -- Dave Coffin's raw photo decoder - Copyright 1997-2012 by Dave Coffin, dcoffin a cybercom o net - - This is a command-line ANSI C program to convert raw photos from - any digital camera on any computer running any operating system. - - No license is required to download and use dcraw.c. However, - to lawfully redistribute dcraw, you must either (a) offer, at - no extra charge, full source code* for all executable files - containing RESTRICTED functions, (b) distribute this code under - the GPL Version 2 or later, (c) remove all RESTRICTED functions, - re-implement them, or copy them from an earlier, unrestricted - Revision of dcraw.c, or (d) purchase a license from the author. - - The functions that process Foveon images have been RESTRICTED - since Revision 1.237. All other code remains free for all uses. - - *If you have not modified dcraw.c in any way, a link to my - homepage qualifies as "full source code". - - $Revision: 1.31 $ - $Date: 2012/07/15 12:44:06 $ - */ - -#define DCRAW_VERSION "9.15" - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif -#define _USE_MATH_DEFINES -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef NODEPS -#define NO_JASPER -#define NO_JPEG -#define NO_LCMS -#endif -#ifndef NO_JASPER -#include /* Decode RED camera movies */ -#endif -#ifndef NO_JPEG -#include /* Decode compressed Kodak DC120 photos */ -#endif /* and Adobe Lossy DNGs */ -#ifndef NO_LCMS -#include /* Support color profiles */ -#endif -#ifdef LOCALEDIR -#include -#define _(String) gettext(String) -#else -#define _(String) (String) -#endif - -#if defined(DJGPP) || defined(__MINGW32__) -#define fseeko fseek -#define ftello ftell -#else -#define fgetc getc_unlocked -#endif -#ifdef __CYGWIN__ -#include -#endif -#ifdef WIN32 -#include -#include -#pragma comment(lib, "ws2_32.lib") -#define snprintf _snprintf -#define strcasecmp stricmp -#define strncasecmp strnicmp -typedef __int64 INT64; -typedef unsigned __int64 UINT64; -#else -#include -#include -#include -typedef long long INT64; -typedef unsigned long long UINT64; -#endif - -#ifdef LJPEG_DECODE -#error Please compile dcraw.c by itself. -#error Do not link it with ljpeg_decode. -#endif - -#ifndef LONG_BIT -#define LONG_BIT (8 * sizeof (long)) -#endif - -#if !defined(uchar) -#define uchar unsigned char -#endif -#if !defined(ushort) -#define ushort unsigned short -#endif - -/* - All global variables are defined here, and all functions that - access them are prefixed with "CLASS". Note that a thread-safe - C++ class cannot have non-const static local variables. - */ -FILE *ifp, *ofp; -short order; -const char *ifname; -char *meta_data; -char cdesc[5], desc[512], make[64], model[64], model2[64], artist[64]; -float flash_used, canon_ev, iso_speed, shutter, aperture, focal_len; -time_t timestamp; -unsigned shot_order, kodak_cbpp, filters, exif_cfa, unique_id; -off_t strip_offset, data_offset; -off_t thumb_offset, meta_offset, profile_offset; -unsigned thumb_length, meta_length, profile_length; -unsigned thumb_misc, *oprof, fuji_layout, shot_select=0, multi_out=0; -unsigned tiff_nifds, tiff_samples, tiff_bps, tiff_compress; -unsigned black, cblack[4], maximum, mix_green, raw_color, zero_is_bad; -unsigned zero_after_ff, is_raw, dng_version, is_foveon, data_error; -unsigned tile_width, tile_length, gpsdata[32], load_flags; -ushort raw_height, raw_width, height, width, top_margin, left_margin; -ushort shrink, iheight, iwidth, fuji_width, thumb_width, thumb_height; -ushort *raw_image, (*image)[4]; -ushort white[8][8], curve[0x10000], cr2_slice[3], sraw_mul[4]; -int mask[8][4], flip, tiff_flip, colors; -double pixel_aspect, aber[4]={1,1,1,1}, gamm[6]={ 0.45,4.5,0,0,0,0 }; -float bright=1, user_mul[4]={0,0,0,0}, threshold=0; -int half_size=0, four_color_rgb=0, document_mode=0, highlight=0; -int verbose=0, use_auto_wb=0, use_camera_wb=0, use_camera_matrix=-1; -int output_color=1, output_bps=8, output_tiff=0, med_passes=0; -int no_auto_bright=0; -unsigned greybox[4] = { 0, 0, UINT_MAX, UINT_MAX }; -float cam_mul[4], pre_mul[4], cmatrix[3][4], rgb_cam[3][4]; -const double xyz_rgb[3][3] = { /* XYZ from RGB */ - { 0.412453, 0.357580, 0.180423 }, - { 0.212671, 0.715160, 0.072169 }, - { 0.019334, 0.119193, 0.950227 } }; -const float d65_white[3] = { 0.950456, 1, 1.088754 }; -int histogram[4][0x2000]; -void (*write_thumb)(), (*write_fun)(); -void (*load_raw)(), (*thumb_load_raw)(); -jmp_buf failure; - -struct decode { - struct decode *branch[2]; - int leaf; -} first_decode[2048], *second_decode, *free_decode; - -struct tiff_ifd { - int width, height, bps, comp, phint, offset, flip, samples, bytes; - int tile_width, tile_length; -} tiff_ifd[10]; - -struct ph1 { - int format, key_off, black, black_off, split_col, tag_21a; - float tag_210; -} ph1; - -#define CLASS - -#define FORC(cnt) for (c=0; c < cnt; c++) -#define FORC3 FORC(3) -#define FORC4 FORC(4) -#define FORCC FORC(colors) - -#define SQR(x) ((x)*(x)) -#define ABS(x) (((int)(x) ^ ((int)(x) >> 31)) - ((int)(x) >> 31)) -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#define LIM(x,min,max) MAX(min,MIN(x,max)) -#define ULIM(x,y,z) ((y) < (z) ? LIM(x,y,z) : LIM(x,z,y)) -#define CLIP(x) LIM(x,0,65535) -#define SWAP(a,b) { a=a+b; b=a-b; a=a-b; } - -/* - In order to inline this calculation, I make the risky - assumption that all filter patterns can be described - by a repeating pattern of eight rows and two columns - - Do not use the FC or BAYER macros with the Leaf CatchLight, - because its pattern is 16x16, not 2x8. - - Return values are either 0/1/2/3 = G/M/C/Y or 0/1/2/3 = R/G1/B/G2 - - PowerShot 600 PowerShot A50 PowerShot Pro70 Pro90 & G1 - 0xe1e4e1e4: 0x1b4e4b1e: 0x1e4b4e1b: 0xb4b4b4b4: - - 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 - 0 G M G M G M 0 C Y C Y C Y 0 Y C Y C Y C 0 G M G M G M - 1 C Y C Y C Y 1 M G M G M G 1 M G M G M G 1 Y C Y C Y C - 2 M G M G M G 2 Y C Y C Y C 2 C Y C Y C Y - 3 C Y C Y C Y 3 G M G M G M 3 G M G M G M - 4 C Y C Y C Y 4 Y C Y C Y C - PowerShot A5 5 G M G M G M 5 G M G M G M - 0x1e4e1e4e: 6 Y C Y C Y C 6 C Y C Y C Y - 7 M G M G M G 7 M G M G M G - 0 1 2 3 4 5 - 0 C Y C Y C Y - 1 G M G M G M - 2 C Y C Y C Y - 3 M G M G M G - - All RGB cameras use one of these Bayer grids: - - 0x16161616: 0x61616161: 0x49494949: 0x94949494: - - 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 - 0 B G B G B G 0 G R G R G R 0 G B G B G B 0 R G R G R G - 1 G R G R G R 1 B G B G B G 1 R G R G R G 1 G B G B G B - 2 B G B G B G 2 G R G R G R 2 G B G B G B 2 R G R G R G - 3 G R G R G R 3 B G B G B G 3 R G R G R G 3 G B G B G B - */ - -#define RAW(row,col) \ - raw_image[(row)*raw_width+(col)] - -#define FC(row,col) \ - (filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3) - -#define BAYER(row,col) \ - image[((row) >> shrink)*iwidth + ((col) >> shrink)][FC(row,col)] - -#define BAYER2(row,col) \ - image[((row) >> shrink)*iwidth + ((col) >> shrink)][fcol(row,col)] - -int CLASS fcol (int row, int col) -{ - static const char filter[16][16] = - { { 2,1,1,3,2,3,2,0,3,2,3,0,1,2,1,0 }, - { 0,3,0,2,0,1,3,1,0,1,1,2,0,3,3,2 }, - { 2,3,3,2,3,1,1,3,3,1,2,1,2,0,0,3 }, - { 0,1,0,1,0,2,0,2,2,0,3,0,1,3,2,1 }, - { 3,1,1,2,0,1,0,2,1,3,1,3,0,1,3,0 }, - { 2,0,0,3,3,2,3,1,2,0,2,0,3,2,2,1 }, - { 2,3,3,1,2,1,2,1,2,1,1,2,3,0,0,1 }, - { 1,0,0,2,3,0,0,3,0,3,0,3,2,1,2,3 }, - { 2,3,3,1,1,2,1,0,3,2,3,0,2,3,1,3 }, - { 1,0,2,0,3,0,3,2,0,1,1,2,0,1,0,2 }, - { 0,1,1,3,3,2,2,1,1,3,3,0,2,1,3,2 }, - { 2,3,2,0,0,1,3,0,2,0,1,2,3,0,1,0 }, - { 1,3,1,2,3,2,3,2,0,2,0,1,1,0,3,0 }, - { 0,2,0,3,1,0,0,1,1,3,3,2,3,2,2,1 }, - { 2,1,3,2,3,1,2,1,0,3,0,2,0,2,0,2 }, - { 0,3,1,0,0,2,0,3,2,1,3,1,1,3,1,3 } }; - static const char filter2[6][6] = - { { 1,1,0,1,1,2 }, - { 1,1,2,1,1,0 }, - { 2,0,1,0,2,1 }, - { 1,1,2,1,1,0 }, - { 1,1,0,1,1,2 }, - { 0,2,1,2,0,1 } }; - - if (filters == 1) return filter[(row+top_margin)&15][(col+left_margin)&15]; - if (filters == 2) return filter2[(row+6) % 6][(col+6) % 6]; - return FC(row,col); -} - -#ifndef __GLIBC__ -char *my_memmem (char *haystack, size_t haystacklen, - char *needle, size_t needlelen) -{ - char *c; - for (c = haystack; c <= haystack + haystacklen - needlelen; c++) - if (!memcmp (c, needle, needlelen)) - return c; - return 0; -} -#define memmem my_memmem -#endif - -void CLASS merror (void *ptr, const char *where) -{ - if (ptr) return; - fprintf (stderr,_("%s: Out of memory in %s\n"), ifname, where); - longjmp (failure, 1); -} - -void CLASS derror() -{ - if (!data_error) { - fprintf (stderr, "%s: ", ifname); - if (feof(ifp)) - fprintf (stderr,_("Unexpected end of file\n")); - else - fprintf (stderr,_("Corrupt data near 0x%llx\n"), (INT64) ftello(ifp)); - } - data_error++; -} - -ushort CLASS sget2 (uchar *s) -{ - if (order == 0x4949) /* "II" means little-endian */ - return s[0] | s[1] << 8; - else /* "MM" means big-endian */ - return s[0] << 8 | s[1]; -} - -ushort CLASS get2() -{ - uchar str[2] = { 0xff,0xff }; - fread (str, 1, 2, ifp); - return sget2(str); -} - -unsigned CLASS sget4 (uchar *s) -{ - if (order == 0x4949) - return s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; - else - return s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]; -} -#define sget4(s) sget4((uchar *)s) - -unsigned CLASS get4() -{ - uchar str[4] = { 0xff,0xff,0xff,0xff }; - fread (str, 1, 4, ifp); - return sget4(str); -} - -unsigned CLASS getint (int type) -{ - return type == 3 ? get2() : get4(); -} - -float CLASS int_to_float (int i) -{ - union { int i; float f; } u; - u.i = i; - return u.f; -} - -double CLASS getreal (int type) -{ - union { char c[8]; double d; } u; - int i, rev; - - switch (type) { - case 3: return (unsigned short) get2(); - case 4: return (unsigned int) get4(); - case 5: u.d = (unsigned int) get4(); - return u.d / (unsigned int) get4(); - case 8: return (signed short) get2(); - case 9: return (signed int) get4(); - case 10: u.d = (signed int) get4(); - return u.d / (signed int) get4(); - case 11: return int_to_float (get4()); - case 12: - rev = 7 * ((order == 0x4949) == (ntohs(0x1234) == 0x1234)); - for (i=0; i < 8; i++) - u.c[i ^ rev] = fgetc(ifp); - return u.d; - default: return fgetc(ifp); - } -} - -void CLASS read_shorts (ushort *pixel, int count) -{ - if (fread (pixel, 2, count, ifp) < count) derror(); - if ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) - swab (pixel, pixel, count*2); -} - -void CLASS canon_600_fixed_wb (int temp) -{ - static const short mul[4][5] = { - { 667, 358,397,565,452 }, - { 731, 390,367,499,517 }, - { 1119, 396,348,448,537 }, - { 1399, 485,431,508,688 } }; - int lo, hi, i; - float frac=0; - - for (lo=4; --lo; ) - if (*mul[lo] <= temp) break; - for (hi=0; hi < 3; hi++) - if (*mul[hi] >= temp) break; - if (lo != hi) - frac = (float) (temp - *mul[lo]) / (*mul[hi] - *mul[lo]); - for (i=1; i < 5; i++) - pre_mul[i-1] = 1 / (frac * mul[hi][i] + (1-frac) * mul[lo][i]); -} - -/* Return values: 0 = white 1 = near white 2 = not white */ -int CLASS canon_600_color (int ratio[2], int mar) -{ - int clipped=0, target, miss; - - if (flash_used) { - if (ratio[1] < -104) - { ratio[1] = -104; clipped = 1; } - if (ratio[1] > 12) - { ratio[1] = 12; clipped = 1; } - } else { - if (ratio[1] < -264 || ratio[1] > 461) return 2; - if (ratio[1] < -50) - { ratio[1] = -50; clipped = 1; } - if (ratio[1] > 307) - { ratio[1] = 307; clipped = 1; } - } - target = flash_used || ratio[1] < 197 - ? -38 - (398 * ratio[1] >> 10) - : -123 + (48 * ratio[1] >> 10); - if (target - mar <= ratio[0] && - target + 20 >= ratio[0] && !clipped) return 0; - miss = target - ratio[0]; - if (abs(miss) >= mar*4) return 2; - if (miss < -20) miss = -20; - if (miss > mar) miss = mar; - ratio[0] = target - miss; - return 1; -} - -void CLASS canon_600_auto_wb() -{ - int mar, row, col, i, j, st, count[] = { 0,0 }; - int test[8], total[2][8], ratio[2][2], stat[2]; - - memset (&total, 0, sizeof total); - i = canon_ev + 0.5; - if (i < 10) mar = 150; - else if (i > 12) mar = 20; - else mar = 280 - 20 * i; - if (flash_used) mar = 80; - for (row=14; row < height-14; row+=4) - for (col=10; col < width; col+=2) { - for (i=0; i < 8; i++) - test[(i & 4) + FC(row+(i >> 1),col+(i & 1))] = - BAYER(row+(i >> 1),col+(i & 1)); - for (i=0; i < 8; i++) - if (test[i] < 150 || test[i] > 1500) goto next; - for (i=0; i < 4; i++) - if (abs(test[i] - test[i+4]) > 50) goto next; - for (i=0; i < 2; i++) { - for (j=0; j < 4; j+=2) - ratio[i][j >> 1] = ((test[i*4+j+1]-test[i*4+j]) << 10) / test[i*4+j]; - stat[i] = canon_600_color (ratio[i], mar); - } - if ((st = stat[0] | stat[1]) > 1) goto next; - for (i=0; i < 2; i++) - if (stat[i]) - for (j=0; j < 2; j++) - test[i*4+j*2+1] = test[i*4+j*2] * (0x400 + ratio[i][j]) >> 10; - for (i=0; i < 8; i++) - total[st][i] += test[i]; - count[st]++; -next: ; - } - if (count[0] | count[1]) { - st = count[0]*200 < count[1]; - for (i=0; i < 4; i++) - pre_mul[i] = 1.0 / (total[st][i] + total[st][i+4]); - } -} - -void CLASS canon_600_coeff() -{ - static const short table[6][12] = { - { -190,702,-1878,2390, 1861,-1349,905,-393, -432,944,2617,-2105 }, - { -1203,1715,-1136,1648, 1388,-876,267,245, -1641,2153,3921,-3409 }, - { -615,1127,-1563,2075, 1437,-925,509,3, -756,1268,2519,-2007 }, - { -190,702,-1886,2398, 2153,-1641,763,-251, -452,964,3040,-2528 }, - { -190,702,-1878,2390, 1861,-1349,905,-393, -432,944,2617,-2105 }, - { -807,1319,-1785,2297, 1388,-876,769,-257, -230,742,2067,-1555 } }; - int t=0, i, c; - float mc, yc; - - mc = pre_mul[1] / pre_mul[2]; - yc = pre_mul[3] / pre_mul[2]; - if (mc > 1 && mc <= 1.28 && yc < 0.8789) t=1; - if (mc > 1.28 && mc <= 2) { - if (yc < 0.8789) t=3; - else if (yc <= 2) t=4; - } - if (flash_used) t=5; - for (raw_color = i=0; i < 3; i++) - FORCC rgb_cam[i][c] = table[t][i*4 + c] / 1024.0; -} - -void CLASS canon_600_load_raw() -{ - uchar data[1120], *dp; - ushort *pix; - int irow, row; - - for (irow=row=0; irow < height; irow++) { - if (fread (data, 1, 1120, ifp) < 1120) derror(); - pix = raw_image + row*raw_width; - for (dp=data; dp < data+1120; dp+=10, pix+=8) { - pix[0] = (dp[0] << 2) + (dp[1] >> 6 ); - pix[1] = (dp[2] << 2) + (dp[1] >> 4 & 3); - pix[2] = (dp[3] << 2) + (dp[1] >> 2 & 3); - pix[3] = (dp[4] << 2) + (dp[1] & 3); - pix[4] = (dp[5] << 2) + (dp[9] & 3); - pix[5] = (dp[6] << 2) + (dp[9] >> 2 & 3); - pix[6] = (dp[7] << 2) + (dp[9] >> 4 & 3); - pix[7] = (dp[8] << 2) + (dp[9] >> 6 ); - } - if ((row+=2) > height) row = 1; - } -} - -void CLASS canon_600_correct() -{ - int row, col, val; - static const short mul[4][2] = - { { 1141,1145 }, { 1128,1109 }, { 1178,1149 }, { 1128,1109 } }; - - for (row=0; row < height; row++) - for (col=0; col < width; col++) { - if ((val = BAYER(row,col) - black) < 0) val = 0; - val = val * mul[row & 3][col & 1] >> 9; - BAYER(row,col) = val; - } - canon_600_fixed_wb(1311); - canon_600_auto_wb(); - canon_600_coeff(); - maximum = (0x3ff - black) * 1109 >> 9; - black = 0; -} - -int CLASS canon_s2is() -{ - unsigned row; - - for (row=0; row < 100; row++) { - fseek (ifp, row*3340 + 3284, SEEK_SET); - if (getc(ifp) > 15) return 1; - } - return 0; -} - -/* - getbits(-1) initializes the buffer - getbits(n) where 0 <= n <= 25 returns an n-bit integer - */ -unsigned CLASS getbithuff (int nbits, ushort *huff) -{ - static unsigned bitbuf=0; - static int vbits=0, reset=0; - unsigned c; - - if (nbits == -1) - return bitbuf = vbits = reset = 0; - if (nbits == 0 || vbits < 0) return 0; - while (!reset && vbits < nbits && (c = fgetc(ifp)) != EOF && - !(reset = zero_after_ff && c == 0xff && fgetc(ifp))) { - bitbuf = (bitbuf << 8) + (uchar) c; - vbits += 8; - } - c = bitbuf << (32-vbits) >> (32-nbits); - if (huff) { - vbits -= huff[c] >> 8; - c = (uchar) huff[c]; - } else - vbits -= nbits; - if (vbits < 0) derror(); - return c; -} - -#define getbits(n) getbithuff(n,0) -#define gethuff(h) getbithuff(*h,h+1) - -/* - Construct a decode tree according the specification in *source. - The first 16 bytes specify how many codes should be 1-bit, 2-bit - 3-bit, etc. Bytes after that are the leaf values. - - For example, if the source is - - { 0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0, - 0x04,0x03,0x05,0x06,0x02,0x07,0x01,0x08,0x09,0x00,0x0a,0x0b,0xff }, - - then the code is - - 00 0x04 - 010 0x03 - 011 0x05 - 100 0x06 - 101 0x02 - 1100 0x07 - 1101 0x01 - 11100 0x08 - 11101 0x09 - 11110 0x00 - 111110 0x0a - 1111110 0x0b - 1111111 0xff - */ -ushort * CLASS make_decoder_ref (const uchar **source) -{ - int max, len, h, i, j; - const uchar *count; - ushort *huff; - - count = (*source += 16) - 17; - for (max=16; max && !count[max]; max--); - huff = (ushort *) calloc (1 + (1 << max), sizeof *huff); - merror (huff, "make_decoder()"); - huff[0] = max; - for (h=len=1; len <= max; len++) - for (i=0; i < count[len]; i++, ++*source) - for (j=0; j < 1 << (max-len); j++) - if (h <= 1 << max) - huff[h++] = len << 8 | **source; - return huff; -} - -ushort * CLASS make_decoder (const uchar *source) -{ - return make_decoder_ref (&source); -} - -void CLASS crw_init_tables (unsigned table, ushort *huff[2]) -{ - static const uchar first_tree[3][29] = { - { 0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0, - 0x04,0x03,0x05,0x06,0x02,0x07,0x01,0x08,0x09,0x00,0x0a,0x0b,0xff }, - { 0,2,2,3,1,1,1,1,2,0,0,0,0,0,0,0, - 0x03,0x02,0x04,0x01,0x05,0x00,0x06,0x07,0x09,0x08,0x0a,0x0b,0xff }, - { 0,0,6,3,1,1,2,0,0,0,0,0,0,0,0,0, - 0x06,0x05,0x07,0x04,0x08,0x03,0x09,0x02,0x00,0x0a,0x01,0x0b,0xff }, - }; - static const uchar second_tree[3][180] = { - { 0,2,2,2,1,4,2,1,2,5,1,1,0,0,0,139, - 0x03,0x04,0x02,0x05,0x01,0x06,0x07,0x08, - 0x12,0x13,0x11,0x14,0x09,0x15,0x22,0x00,0x21,0x16,0x0a,0xf0, - 0x23,0x17,0x24,0x31,0x32,0x18,0x19,0x33,0x25,0x41,0x34,0x42, - 0x35,0x51,0x36,0x37,0x38,0x29,0x79,0x26,0x1a,0x39,0x56,0x57, - 0x28,0x27,0x52,0x55,0x58,0x43,0x76,0x59,0x77,0x54,0x61,0xf9, - 0x71,0x78,0x75,0x96,0x97,0x49,0xb7,0x53,0xd7,0x74,0xb6,0x98, - 0x47,0x48,0x95,0x69,0x99,0x91,0xfa,0xb8,0x68,0xb5,0xb9,0xd6, - 0xf7,0xd8,0x67,0x46,0x45,0x94,0x89,0xf8,0x81,0xd5,0xf6,0xb4, - 0x88,0xb1,0x2a,0x44,0x72,0xd9,0x87,0x66,0xd4,0xf5,0x3a,0xa7, - 0x73,0xa9,0xa8,0x86,0x62,0xc7,0x65,0xc8,0xc9,0xa1,0xf4,0xd1, - 0xe9,0x5a,0x92,0x85,0xa6,0xe7,0x93,0xe8,0xc1,0xc6,0x7a,0x64, - 0xe1,0x4a,0x6a,0xe6,0xb3,0xf1,0xd3,0xa5,0x8a,0xb2,0x9a,0xba, - 0x84,0xa4,0x63,0xe5,0xc5,0xf3,0xd2,0xc4,0x82,0xaa,0xda,0xe4, - 0xf2,0xca,0x83,0xa3,0xa2,0xc3,0xea,0xc2,0xe2,0xe3,0xff,0xff }, - { 0,2,2,1,4,1,4,1,3,3,1,0,0,0,0,140, - 0x02,0x03,0x01,0x04,0x05,0x12,0x11,0x06, - 0x13,0x07,0x08,0x14,0x22,0x09,0x21,0x00,0x23,0x15,0x31,0x32, - 0x0a,0x16,0xf0,0x24,0x33,0x41,0x42,0x19,0x17,0x25,0x18,0x51, - 0x34,0x43,0x52,0x29,0x35,0x61,0x39,0x71,0x62,0x36,0x53,0x26, - 0x38,0x1a,0x37,0x81,0x27,0x91,0x79,0x55,0x45,0x28,0x72,0x59, - 0xa1,0xb1,0x44,0x69,0x54,0x58,0xd1,0xfa,0x57,0xe1,0xf1,0xb9, - 0x49,0x47,0x63,0x6a,0xf9,0x56,0x46,0xa8,0x2a,0x4a,0x78,0x99, - 0x3a,0x75,0x74,0x86,0x65,0xc1,0x76,0xb6,0x96,0xd6,0x89,0x85, - 0xc9,0xf5,0x95,0xb4,0xc7,0xf7,0x8a,0x97,0xb8,0x73,0xb7,0xd8, - 0xd9,0x87,0xa7,0x7a,0x48,0x82,0x84,0xea,0xf4,0xa6,0xc5,0x5a, - 0x94,0xa4,0xc6,0x92,0xc3,0x68,0xb5,0xc8,0xe4,0xe5,0xe6,0xe9, - 0xa2,0xa3,0xe3,0xc2,0x66,0x67,0x93,0xaa,0xd4,0xd5,0xe7,0xf8, - 0x88,0x9a,0xd7,0x77,0xc4,0x64,0xe2,0x98,0xa5,0xca,0xda,0xe8, - 0xf3,0xf6,0xa9,0xb2,0xb3,0xf2,0xd2,0x83,0xba,0xd3,0xff,0xff }, - { 0,0,6,2,1,3,3,2,5,1,2,2,8,10,0,117, - 0x04,0x05,0x03,0x06,0x02,0x07,0x01,0x08, - 0x09,0x12,0x13,0x14,0x11,0x15,0x0a,0x16,0x17,0xf0,0x00,0x22, - 0x21,0x18,0x23,0x19,0x24,0x32,0x31,0x25,0x33,0x38,0x37,0x34, - 0x35,0x36,0x39,0x79,0x57,0x58,0x59,0x28,0x56,0x78,0x27,0x41, - 0x29,0x77,0x26,0x42,0x76,0x99,0x1a,0x55,0x98,0x97,0xf9,0x48, - 0x54,0x96,0x89,0x47,0xb7,0x49,0xfa,0x75,0x68,0xb6,0x67,0x69, - 0xb9,0xb8,0xd8,0x52,0xd7,0x88,0xb5,0x74,0x51,0x46,0xd9,0xf8, - 0x3a,0xd6,0x87,0x45,0x7a,0x95,0xd5,0xf6,0x86,0xb4,0xa9,0x94, - 0x53,0x2a,0xa8,0x43,0xf5,0xf7,0xd4,0x66,0xa7,0x5a,0x44,0x8a, - 0xc9,0xe8,0xc8,0xe7,0x9a,0x6a,0x73,0x4a,0x61,0xc7,0xf4,0xc6, - 0x65,0xe9,0x72,0xe6,0x71,0x91,0x93,0xa6,0xda,0x92,0x85,0x62, - 0xf3,0xc5,0xb2,0xa4,0x84,0xba,0x64,0xa5,0xb3,0xd2,0x81,0xe5, - 0xd3,0xaa,0xc4,0xca,0xf2,0xb1,0xe4,0xd1,0x83,0x63,0xea,0xc3, - 0xe2,0x82,0xf1,0xa3,0xc2,0xa1,0xc1,0xe3,0xa2,0xe1,0xff,0xff } - }; - if (table > 2) table = 2; - huff[0] = make_decoder ( first_tree[table]); - huff[1] = make_decoder (second_tree[table]); -} - -/* - Return 0 if the image starts with compressed data, - 1 if it starts with uncompressed low-order bits. - - In Canon compressed data, 0xff is always followed by 0x00. - */ -int CLASS canon_has_lowbits() -{ - uchar test[0x4000]; - int ret=1, i; - - fseek (ifp, 0, SEEK_SET); - fread (test, 1, sizeof test, ifp); - for (i=540; i < sizeof test - 1; i++) - if (test[i] == 0xff) { - if (test[i+1]) return 1; - ret=0; - } - return ret; -} - -void CLASS canon_load_raw() -{ - ushort *pixel, *prow, *huff[2]; - int nblocks, lowbits, i, c, row, r, save, val; - int block, diffbuf[64], leaf, len, diff, carry=0, pnum=0, base[2]; - - crw_init_tables (tiff_compress, huff); - lowbits = canon_has_lowbits(); - if (!lowbits) maximum = 0x3ff; - fseek (ifp, 540 + lowbits*raw_height*raw_width/4, SEEK_SET); - zero_after_ff = 1; - getbits(-1); - for (row=0; row < raw_height; row+=8) { - pixel = raw_image + row*raw_width; - nblocks = MIN (8, raw_height-row) * raw_width >> 6; - for (block=0; block < nblocks; block++) { - memset (diffbuf, 0, sizeof diffbuf); - for (i=0; i < 64; i++ ) { - leaf = gethuff(huff[i > 0]); - if (leaf == 0 && i) break; - if (leaf == 0xff) continue; - i += leaf >> 4; - len = leaf & 15; - if (len == 0) continue; - diff = getbits(len); - if ((diff & (1 << (len-1))) == 0) - diff -= (1 << len) - 1; - if (i < 64) diffbuf[i] = diff; - } - diffbuf[0] += carry; - carry = diffbuf[0]; - for (i=0; i < 64; i++ ) { - if (pnum++ % raw_width == 0) - base[0] = base[1] = 512; - if ((pixel[(block << 6) + i] = base[i & 1] += diffbuf[i]) >> 10) - derror(); - } - } - if (lowbits) { - save = ftell(ifp); - fseek (ifp, 26 + row*raw_width/4, SEEK_SET); - for (prow=pixel, i=0; i < raw_width*2; i++) { - c = fgetc(ifp); - for (r=0; r < 8; r+=2, prow++) { - val = (*prow << 2) + ((c >> r) & 3); - if (raw_width == 2672 && val < 512) val += 2; - *prow = val; - } - } - fseek (ifp, save, SEEK_SET); - } - } - FORC(2) free (huff[c]); -} - -/* - Not a full implementation of Lossless JPEG, just - enough to decode Canon, Kodak and Adobe DNG images. - */ -struct jhead { - int bits, high, wide, clrs, sraw, psv, restart, vpred[6]; - ushort *huff[6], *free[4], *row; -}; - -int CLASS ljpeg_start (struct jhead *jh, int info_only) -{ - int c, tag, len; - uchar data[0x10000]; - const uchar *dp; - - memset (jh, 0, sizeof *jh); - jh->restart = INT_MAX; - fread (data, 2, 1, ifp); - if (data[1] != 0xd8) return 0; - do { - fread (data, 2, 2, ifp); - tag = data[0] << 8 | data[1]; - len = (data[2] << 8 | data[3]) - 2; - if (tag <= 0xff00) return 0; - fread (data, 1, len, ifp); - switch (tag) { - case 0xffc3: - jh->sraw = ((data[7] >> 4) * (data[7] & 15) - 1) & 3; - case 0xffc0: - jh->bits = data[0]; - jh->high = data[1] << 8 | data[2]; - jh->wide = data[3] << 8 | data[4]; - jh->clrs = data[5] + jh->sraw; - if (len == 9 && !dng_version) getc(ifp); - break; - case 0xffc4: - if (info_only) break; - for (dp = data; dp < data+len && (c = *dp++) < 4; ) - jh->free[c] = jh->huff[c] = make_decoder_ref (&dp); - break; - case 0xffda: - jh->psv = data[1+data[0]*2]; - jh->bits -= data[3+data[0]*2] & 15; - break; - case 0xffdd: - jh->restart = data[0] << 8 | data[1]; - } - } while (tag != 0xffda); - if (info_only) return 1; - FORC(5) if (!jh->huff[c+1]) jh->huff[c+1] = jh->huff[c]; - if (jh->sraw) { - FORC(4) jh->huff[2+c] = jh->huff[1]; - FORC(jh->sraw) jh->huff[1+c] = jh->huff[0]; - } - jh->row = (ushort *) calloc (jh->wide*jh->clrs, 4); - merror (jh->row, "ljpeg_start()"); - return zero_after_ff = 1; -} - -void CLASS ljpeg_end (struct jhead *jh) -{ - int c; - FORC4 if (jh->free[c]) free (jh->free[c]); - free (jh->row); -} - -int CLASS ljpeg_diff (ushort *huff) -{ - int len, diff; - - len = gethuff(huff); - if (len == 16 && (!dng_version || dng_version >= 0x1010000)) - return -32768; - diff = getbits(len); - if ((diff & (1 << (len-1))) == 0) - diff -= (1 << len) - 1; - return diff; -} - -ushort * CLASS ljpeg_row (int jrow, struct jhead *jh) -{ - int col, c, diff, pred, spred=0; - ushort mark=0, *row[3]; - - if (jrow * jh->wide % jh->restart == 0) { - FORC(6) jh->vpred[c] = 1 << (jh->bits-1); - if (jrow) { - fseek (ifp, -2, SEEK_CUR); - do mark = (mark << 8) + (c = fgetc(ifp)); - while (c != EOF && mark >> 4 != 0xffd); - } - getbits(-1); - } - FORC3 row[c] = jh->row + jh->wide*jh->clrs*((jrow+c) & 1); - for (col=0; col < jh->wide; col++) - FORC(jh->clrs) { - diff = ljpeg_diff (jh->huff[c]); - if (jh->sraw && c <= jh->sraw && (col | c)) - pred = spred; - else if (col) pred = row[0][-jh->clrs]; - else pred = (jh->vpred[c] += diff) - diff; - if (jrow && col) switch (jh->psv) { - case 1: break; - case 2: pred = row[1][0]; break; - case 3: pred = row[1][-jh->clrs]; break; - case 4: pred = pred + row[1][0] - row[1][-jh->clrs]; break; - case 5: pred = pred + ((row[1][0] - row[1][-jh->clrs]) >> 1); break; - case 6: pred = row[1][0] + ((pred - row[1][-jh->clrs]) >> 1); break; - case 7: pred = (pred + row[1][0]) >> 1; break; - default: pred = 0; - } - if ((**row = pred + diff) >> jh->bits) derror(); - if (c <= jh->sraw) spred = **row; - row[0]++; row[1]++; - } - return row[2]; -} - -void CLASS lossless_jpeg_load_raw() -{ - int jwide, jrow, jcol, val, jidx, i, j, row=0, col=0; - struct jhead jh; - ushort *rp; - - if (!ljpeg_start (&jh, 0)) return; - jwide = jh.wide * jh.clrs; - - for (jrow=0; jrow < jh.high; jrow++) { - rp = ljpeg_row (jrow, &jh); - if (load_flags & 1) - row = jrow & 1 ? height-1-jrow/2 : jrow/2; - for (jcol=0; jcol < jwide; jcol++) { - val = curve[*rp++]; - if (cr2_slice[0]) { - jidx = jrow*jwide + jcol; - i = jidx / (cr2_slice[1]*jh.high); - if ((j = i >= cr2_slice[0])) - i = cr2_slice[0]; - jidx -= i * (cr2_slice[1]*jh.high); - row = jidx / cr2_slice[1+j]; - col = jidx % cr2_slice[1+j] + i*cr2_slice[1]; - } - if (raw_width == 3984 && (col -= 2) < 0) - col += (row--,raw_width); - if (row >= 0) RAW(row,col) = val; - if (++col >= raw_width) - col = (row++,0); - } - } - ljpeg_end (&jh); -} - -void CLASS canon_sraw_load_raw() -{ - struct jhead jh; - short *rp=0, (*ip)[4]; - int jwide, slice, scol, ecol, row, col, jrow=0, jcol=0, pix[3], c; - int v[3]={0,0,0}, ver, hue; - char *cp; - - if (!ljpeg_start (&jh, 0)) return; - jwide = (jh.wide >>= 1) * jh.clrs; - - for (ecol=slice=0; slice <= cr2_slice[0]; slice++) { - scol = ecol; - ecol += cr2_slice[1] * 2 / jh.clrs; - if (!cr2_slice[0] || ecol > raw_width-1) ecol = raw_width & -2; - for (row=0; row < height; row += (jh.clrs >> 1) - 1) { - ip = (short (*)[4]) image + row*width; - for (col=scol; col < ecol; col+=2, jcol+=jh.clrs) { - if ((jcol %= jwide) == 0) - rp = (short *) ljpeg_row (jrow++, &jh); - if (col >= width) continue; - FORC (jh.clrs-2) - ip[col + (c >> 1)*width + (c & 1)][0] = rp[jcol+c]; - ip[col][1] = rp[jcol+jh.clrs-2] - 16384; - ip[col][2] = rp[jcol+jh.clrs-1] - 16384; - } - } - } - for (cp=model2; *cp && !isdigit(*cp); cp++); - sscanf (cp, "%d.%d.%d", v, v+1, v+2); - ver = (v[0]*1000 + v[1])*1000 + v[2]; - hue = (jh.sraw+1) << 2; - if (unique_id >= 0x80000281 || (unique_id == 0x80000218 && ver > 1000006)) - hue = jh.sraw << 1; - ip = (short (*)[4]) image; - rp = ip[0]; - for (row=0; row < height; row++, ip+=width) { - if (row & (jh.sraw >> 1)) - for (col=0; col < width; col+=2) - for (c=1; c < 3; c++) - if (row == height-1) - ip[col][c] = ip[col-width][c]; - else ip[col][c] = (ip[col-width][c] + ip[col+width][c] + 1) >> 1; - for (col=1; col < width; col+=2) - for (c=1; c < 3; c++) - if (col == width-1) - ip[col][c] = ip[col-1][c]; - else ip[col][c] = (ip[col-1][c] + ip[col+1][c] + 1) >> 1; - } - for ( ; rp < ip[0]; rp+=4) { - if (unique_id < 0x80000218) { - rp[0] -= 512; - goto next; - } else if (unique_id == 0x80000285) { -next: pix[0] = rp[0] + rp[2]; - pix[2] = rp[0] + rp[1]; - pix[1] = rp[0] + ((-778*rp[1] - (rp[2] << 11)) >> 12); - } else { - rp[1] = (rp[1] << 2) + hue; - rp[2] = (rp[2] << 2) + hue; - pix[0] = rp[0] + (( 50*rp[1] + 22929*rp[2]) >> 14); - pix[1] = rp[0] + ((-5640*rp[1] - 11751*rp[2]) >> 14); - pix[2] = rp[0] + ((29040*rp[1] - 101*rp[2]) >> 14); - } - FORC3 rp[c] = CLIP(pix[c] * sraw_mul[c] >> 10); - } - ljpeg_end (&jh); - maximum = 0x3fff; -} - -void CLASS adobe_copy_pixel (unsigned row, unsigned col, ushort **rp) -{ - int c; - - if (is_raw == 2 && shot_select) (*rp)++; - if (raw_image) { - if (row < raw_height && col < raw_width) - RAW(row,col) = curve[**rp]; - *rp += is_raw; - } else { - if (row < height && col < width) - FORC(tiff_samples) - image[row*width+col][c] = curve[(*rp)[c]]; - *rp += tiff_samples; - } - if (is_raw == 2 && shot_select) (*rp)--; -} - -void CLASS lossless_dng_load_raw() -{ - unsigned save, trow=0, tcol=0, jwide, jrow, jcol, row, col; - struct jhead jh; - ushort *rp; - - while (trow < raw_height) { - save = ftell(ifp); - if (tile_length < INT_MAX) - fseek (ifp, get4(), SEEK_SET); - if (!ljpeg_start (&jh, 0)) break; - jwide = jh.wide; - if (filters) jwide *= jh.clrs; - jwide /= is_raw; - for (row=col=jrow=0; jrow < jh.high; jrow++) { - rp = ljpeg_row (jrow, &jh); - for (jcol=0; jcol < jwide; jcol++) { - adobe_copy_pixel (trow+row, tcol+col, &rp); - if (++col >= tile_width || col >= raw_width) - row += 1 + (col = 0); - } - } - fseek (ifp, save+4, SEEK_SET); - if ((tcol += tile_width) >= raw_width) - trow += tile_length + (tcol = 0); - ljpeg_end (&jh); - } -} - -void CLASS packed_dng_load_raw() -{ - ushort *pixel, *rp; - int row, col; - - pixel = (ushort *) calloc (raw_width * tiff_samples, sizeof *pixel); - merror (pixel, "packed_dng_load_raw()"); - for (row=0; row < raw_height; row++) { - if (tiff_bps == 16) - read_shorts (pixel, raw_width * tiff_samples); - else { - getbits(-1); - for (col=0; col < raw_width * tiff_samples; col++) - pixel[col] = getbits(tiff_bps); - } - for (rp=pixel, col=0; col < raw_width; col++) - adobe_copy_pixel (row, col, &rp); - } - free (pixel); -} - -void CLASS pentax_load_raw() -{ - ushort bit[2][15], huff[4097]; - int dep, row, col, diff, c, i; - ushort vpred[2][2] = {{0,0},{0,0}}, hpred[2]; - - fseek (ifp, meta_offset, SEEK_SET); - dep = (get2() + 12) & 15; - fseek (ifp, 12, SEEK_CUR); - FORC(dep) bit[0][c] = get2(); - FORC(dep) bit[1][c] = fgetc(ifp); - FORC(dep) - for (i=bit[0][c]; i <= ((bit[0][c]+(4096 >> bit[1][c])-1) & 4095); ) - huff[++i] = bit[1][c] << 8 | c; - huff[0] = 12; - fseek (ifp, data_offset, SEEK_SET); - getbits(-1); - for (row=0; row < raw_height; row++) - for (col=0; col < raw_width; col++) { - diff = ljpeg_diff (huff); - if (col < 2) hpred[col] = vpred[row & 1][col] += diff; - else hpred[col & 1] += diff; - RAW(row,col) = hpred[col & 1]; - if (hpred[col & 1] >> tiff_bps) derror(); - } -} - -void CLASS nikon_load_raw() -{ - static const uchar nikon_tree[][32] = { - { 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0, /* 12-bit lossy */ - 5,4,3,6,2,7,1,0,8,9,11,10,12 }, - { 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0, /* 12-bit lossy after split */ - 0x39,0x5a,0x38,0x27,0x16,5,4,3,2,1,0,11,12,12 }, - { 0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0, /* 12-bit lossless */ - 5,4,6,3,7,2,8,1,9,0,10,11,12 }, - { 0,1,4,3,1,1,1,1,1,2,0,0,0,0,0,0, /* 14-bit lossy */ - 5,6,4,7,8,3,9,2,1,0,10,11,12,13,14 }, - { 0,1,5,1,1,1,1,1,1,1,2,0,0,0,0,0, /* 14-bit lossy after split */ - 8,0x5c,0x4b,0x3a,0x29,7,6,5,4,3,2,1,0,13,14 }, - { 0,1,4,2,2,3,1,2,0,0,0,0,0,0,0,0, /* 14-bit lossless */ - 7,6,8,5,9,4,10,3,11,12,2,0,1,13,14 } }; - ushort *huff, ver0, ver1, vpred[2][2], hpred[2], csize; - int i, min, max, step=0, tree=0, split=0, row, col, len, shl, diff; - - fseek (ifp, meta_offset, SEEK_SET); - ver0 = fgetc(ifp); - ver1 = fgetc(ifp); - if (ver0 == 0x49 || ver1 == 0x58) - fseek (ifp, 2110, SEEK_CUR); - if (ver0 == 0x46) tree = 2; - if (tiff_bps == 14) tree += 3; - read_shorts (vpred[0], 4); - max = 1 << tiff_bps & 0x7fff; - if ((csize = get2()) > 1) - step = max / (csize-1); - if (ver0 == 0x44 && ver1 == 0x20 && step > 0) { - for (i=0; i < csize; i++) - curve[i*step] = get2(); - for (i=0; i < max; i++) - curve[i] = ( curve[i-i%step]*(step-i%step) + - curve[i-i%step+step]*(i%step) ) / step; - fseek (ifp, meta_offset+562, SEEK_SET); - split = get2(); - } else if (ver0 != 0x46 && csize <= 0x4001) - read_shorts (curve, max=csize); - while (curve[max-2] == curve[max-1]) max--; - huff = make_decoder (nikon_tree[tree]); - fseek (ifp, data_offset, SEEK_SET); - getbits(-1); - for (min=row=0; row < height; row++) { - if (split && row == split) { - free (huff); - huff = make_decoder (nikon_tree[tree+1]); - max += (min = 16) << 1; - } - for (col=0; col < raw_width; col++) { - i = gethuff(huff); - len = i & 15; - shl = i >> 4; - diff = ((getbits(len-shl) << 1) + 1) << shl >> 1; - if ((diff & (1 << (len-1))) == 0) - diff -= (1 << len) - !shl; - if (col < 2) hpred[col] = vpred[row & 1][col] += diff; - else hpred[col & 1] += diff; - if ((ushort)(hpred[col & 1] + min) >= max) derror(); - RAW(row,col) = curve[LIM((short)hpred[col & 1],0,0x3fff)]; - } - } - free (huff); -} - -/* - Figure out if a NEF file is compressed. These fancy heuristics - are only needed for the D100, thanks to a bug in some cameras - that tags all images as "compressed". - */ -int CLASS nikon_is_compressed() -{ - uchar test[256]; - int i; - - fseek (ifp, data_offset, SEEK_SET); - fread (test, 1, 256, ifp); - for (i=15; i < 256; i+=16) - if (test[i]) return 1; - return 0; -} - -/* - Returns 1 for a Coolpix 995, 0 for anything else. - */ -int CLASS nikon_e995() -{ - int i, histo[256]; - const uchar often[] = { 0x00, 0x55, 0xaa, 0xff }; - - memset (histo, 0, sizeof histo); - fseek (ifp, -2000, SEEK_END); - for (i=0; i < 2000; i++) - histo[fgetc(ifp)]++; - for (i=0; i < 4; i++) - if (histo[often[i]] < 200) - return 0; - return 1; -} - -/* - Returns 1 for a Coolpix 2100, 0 for anything else. - */ -int CLASS nikon_e2100() -{ - uchar t[12]; - int i; - - fseek (ifp, 0, SEEK_SET); - for (i=0; i < 1024; i++) { - fread (t, 1, 12, ifp); - if (((t[2] & t[4] & t[7] & t[9]) >> 4 - & t[1] & t[6] & t[8] & t[11] & 3) != 3) - return 0; - } - return 1; -} - -void CLASS nikon_3700() -{ - int bits, i; - uchar dp[24]; - static const struct { - int bits; - char make[12], model[15]; - } table[] = { - { 0x00, "PENTAX", "Optio 33WR" }, - { 0x03, "NIKON", "E3200" }, - { 0x32, "NIKON", "E3700" }, - { 0x33, "OLYMPUS", "C740UZ" } }; - - fseek (ifp, 3072, SEEK_SET); - fread (dp, 1, 24, ifp); - bits = (dp[8] & 3) << 4 | (dp[20] & 3); - for (i=0; i < sizeof table / sizeof *table; i++) - if (bits == table[i].bits) { - strcpy (make, table[i].make ); - strcpy (model, table[i].model); - } -} - -/* - Separates a Minolta DiMAGE Z2 from a Nikon E4300. - */ -int CLASS minolta_z2() -{ - int i, nz; - char tail[424]; - - fseek (ifp, -sizeof tail, SEEK_END); - fread (tail, 1, sizeof tail, ifp); - for (nz=i=0; i < sizeof tail; i++) - if (tail[i]) nz++; - return nz > 20; -} - -void CLASS jpeg_thumb(); - -void CLASS ppm_thumb() -{ - char *thumb; - thumb_length = thumb_width*thumb_height*3; - thumb = (char *) malloc (thumb_length); - merror (thumb, "ppm_thumb()"); - fprintf (ofp, "P6\n%d %d\n255\n", thumb_width, thumb_height); - fread (thumb, 1, thumb_length, ifp); - fwrite (thumb, 1, thumb_length, ofp); - free (thumb); -} - -void CLASS ppm16_thumb() -{ - int i; - char *thumb; - thumb_length = thumb_width*thumb_height*3; - thumb = (char *) calloc (thumb_length,2); - merror (thumb, "ppm16_thumb()"); - read_shorts ((ushort *) thumb, thumb_length); - for (i=0; i < thumb_length; i++) - thumb[i] = ((ushort *) thumb)[i] >> 8; - fprintf (ofp, "P6\n%d %d\n255\n", thumb_width, thumb_height); - fwrite (thumb, 1, thumb_length, ofp); - free (thumb); -} - -void CLASS layer_thumb() -{ - int i, c; - char *thumb, map[][4] = { "012","102" }; - - colors = thumb_misc >> 5 & 7; - thumb_length = thumb_width*thumb_height; - thumb = (char *) calloc (colors, thumb_length); - merror (thumb, "layer_thumb()"); - fprintf (ofp, "P%d\n%d %d\n255\n", - 5 + (colors >> 1), thumb_width, thumb_height); - fread (thumb, thumb_length, colors, ifp); - for (i=0; i < thumb_length; i++) - FORCC putc (thumb[i+thumb_length*(map[thumb_misc >> 8][c]-'0')], ofp); - free (thumb); -} - -void CLASS rollei_thumb() -{ - unsigned i; - ushort *thumb; - - thumb_length = thumb_width * thumb_height; - thumb = (ushort *) calloc (thumb_length, 2); - merror (thumb, "rollei_thumb()"); - fprintf (ofp, "P6\n%d %d\n255\n", thumb_width, thumb_height); - read_shorts (thumb, thumb_length); - for (i=0; i < thumb_length; i++) { - putc (thumb[i] << 3, ofp); - putc (thumb[i] >> 5 << 2, ofp); - putc (thumb[i] >> 11 << 3, ofp); - } - free (thumb); -} - -void CLASS rollei_load_raw() -{ - uchar pixel[10]; - unsigned iten=0, isix, i, buffer=0, todo[16]; - - isix = raw_width * raw_height * 5 / 8; - while (fread (pixel, 1, 10, ifp) == 10) { - for (i=0; i < 10; i+=2) { - todo[i] = iten++; - todo[i+1] = pixel[i] << 8 | pixel[i+1]; - buffer = pixel[i] >> 2 | buffer << 6; - } - for ( ; i < 16; i+=2) { - todo[i] = isix++; - todo[i+1] = buffer >> (14-i)*5; - } - for (i=0; i < 16; i+=2) - raw_image[todo[i]] = (todo[i+1] & 0x3ff); - } - maximum = 0x3ff; -} - -int CLASS raw (unsigned row, unsigned col) -{ - return (row < raw_height && col < raw_width) ? RAW(row,col) : 0; -} - -void CLASS phase_one_flat_field (int is_float, int nc) -{ - ushort head[8]; - unsigned wide, y, x, c, rend, cend, row, col; - float *mrow, num, mult[4]; - - read_shorts (head, 8); - wide = head[2] / head[4]; - mrow = (float *) calloc (nc*wide, sizeof *mrow); - merror (mrow, "phase_one_flat_field()"); - for (y=0; y < head[3] / head[5]; y++) { - for (x=0; x < wide; x++) - for (c=0; c < nc; c+=2) { - num = is_float ? getreal(11) : get2()/32768.0; - if (y==0) mrow[c*wide+x] = num; - else mrow[(c+1)*wide+x] = (num - mrow[c*wide+x]) / head[5]; - } - if (y==0) continue; - rend = head[1] + y*head[5]; - for (row = rend-head[5]; row < raw_height && row < rend; row++) { - for (x=1; x < wide; x++) { - for (c=0; c < nc; c+=2) { - mult[c] = mrow[c*wide+x-1]; - mult[c+1] = (mrow[c*wide+x] - mult[c]) / head[4]; - } - cend = head[0] + x*head[4]; - for (col = cend-head[4]; col < raw_width && col < cend; col++) { - c = nc > 2 ? FC(row-top_margin,col-left_margin) : 0; - if (!(c & 1)) { - c = RAW(row,col) * mult[c]; - RAW(row,col) = LIM(c,0,65535); - } - for (c=0; c < nc; c+=2) - mult[c] += mult[c+1]; - } - } - for (x=0; x < wide; x++) - for (c=0; c < nc; c+=2) - mrow[c*wide+x] += mrow[(c+1)*wide+x]; - } - } - free (mrow); -} - -void CLASS phase_one_correct() -{ - unsigned entries, tag, data, save, col, row, type; - int len, i, j, k, cip, val[4], dev[4], sum, max; - int head[9], diff, mindiff=INT_MAX, off_412=0; - static const signed char dir[12][2] = - { {-1,-1}, {-1,1}, {1,-1}, {1,1}, {-2,0}, {0,-2}, {0,2}, {2,0}, - {-2,-2}, {-2,2}, {2,-2}, {2,2} }; - float poly[8], num, cfrac, frac, mult[2], *yval[2]; - ushort *xval[2]; - - if (half_size || !meta_length) return; - if (verbose) fprintf (stderr,_("Phase One correction...\n")); - fseek (ifp, meta_offset, SEEK_SET); - order = get2(); - fseek (ifp, 6, SEEK_CUR); - fseek (ifp, meta_offset+get4(), SEEK_SET); - entries = get4(); get4(); - while (entries--) { - tag = get4(); - len = get4(); - data = get4(); - save = ftell(ifp); - fseek (ifp, meta_offset+data, SEEK_SET); - if (tag == 0x419) { /* Polynomial curve */ - for (get4(), i=0; i < 8; i++) - poly[i] = getreal(11); - poly[3] += (ph1.tag_210 - poly[7]) * poly[6] + 1; - for (i=0; i < 0x10000; i++) { - num = (poly[5]*i + poly[3])*i + poly[1]; - curve[i] = LIM(num,0,65535); - } goto apply; /* apply to right half */ - } else if (tag == 0x41a) { /* Polynomial curve */ - for (i=0; i < 4; i++) - poly[i] = getreal(11); - for (i=0; i < 0x10000; i++) { - for (num=0, j=4; j--; ) - num = num * i + poly[j]; - curve[i] = LIM(num+i,0,65535); - } apply: /* apply to whole image */ - for (row=0; row < raw_height; row++) - for (col = (tag & 1)*ph1.split_col; col < raw_width; col++) - RAW(row,col) = curve[RAW(row,col)]; - } else if (tag == 0x400) { /* Sensor defects */ - while ((len -= 8) >= 0) { - col = get2(); - row = get2(); - type = get2(); get2(); - if (col >= raw_width) continue; - if (type == 131) /* Bad column */ - for (row=0; row < raw_height; row++) - if (FC(row-top_margin,col-left_margin) == 1) { - for (sum=i=0; i < 4; i++) - sum += val[i] = raw (row+dir[i][0], col+dir[i][1]); - for (max=i=0; i < 4; i++) { - dev[i] = abs((val[i] << 2) - sum); - if (dev[max] < dev[i]) max = i; - } - RAW(row,col) = (sum - val[max])/3.0 + 0.5; - } else { - for (sum=0, i=8; i < 12; i++) - sum += raw (row+dir[i][0], col+dir[i][1]); - RAW(row,col) = 0.5 + sum * 0.0732233 + - (raw(row,col-2) + raw(row,col+2)) * 0.3535534; - } - else if (type == 129) { /* Bad pixel */ - if (row >= raw_height) continue; - j = (FC(row-top_margin,col-left_margin) != 1) * 4; - for (sum=0, i=j; i < j+8; i++) - sum += raw (row+dir[i][0], col+dir[i][1]); - RAW(row,col) = (sum + 4) >> 3; - } - } - } else if (tag == 0x401) { /* All-color flat fields */ - phase_one_flat_field (1, 2); - } else if (tag == 0x416 || tag == 0x410) { - phase_one_flat_field (0, 2); - } else if (tag == 0x40b) { /* Red+blue flat field */ - phase_one_flat_field (0, 4); - } else if (tag == 0x412) { - fseek (ifp, 36, SEEK_CUR); - diff = abs (get2() - ph1.tag_21a); - if (mindiff > diff) { - mindiff = diff; - off_412 = ftell(ifp) - 38; - } - } - fseek (ifp, save, SEEK_SET); - } - if (off_412) { - fseek (ifp, off_412, SEEK_SET); - for (i=0; i < 9; i++) head[i] = get4() & 0x7fff; - yval[0] = (float *) calloc (head[1]*head[3] + head[2]*head[4], 6); - merror (yval[0], "phase_one_correct()"); - yval[1] = (float *) (yval[0] + head[1]*head[3]); - xval[0] = (ushort *) (yval[1] + head[2]*head[4]); - xval[1] = (ushort *) (xval[0] + head[1]*head[3]); - get2(); - for (i=0; i < 2; i++) - for (j=0; j < head[i+1]*head[i+3]; j++) - yval[i][j] = getreal(11); - for (i=0; i < 2; i++) - for (j=0; j < head[i+1]*head[i+3]; j++) - xval[i][j] = get2(); - for (row=0; row < raw_height; row++) - for (col=0; col < raw_width; col++) { - cfrac = (float) col * head[3] / raw_width; - cfrac -= cip = cfrac; - num = RAW(row,col) * 0.5; - for (i=cip; i < cip+2; i++) { - for (k=j=0; j < head[1]; j++) - if (num < xval[0][k = head[1]*i+j]) break; - frac = (j == 0 || j == head[1]) ? 0 : - (xval[0][k] - num) / (xval[0][k] - xval[0][k-1]); - mult[i-cip] = yval[0][k-1] * frac + yval[0][k] * (1-frac); - } - i = ((mult[0] * (1-cfrac) + mult[1] * cfrac) * row + num) * 2; - RAW(row,col) = LIM(i,0,65535); - } - free (yval[0]); - } -} - -void CLASS phase_one_load_raw() -{ - int a, b, i; - ushort akey, bkey, mask; - - fseek (ifp, ph1.key_off, SEEK_SET); - akey = get2(); - bkey = get2(); - mask = ph1.format == 1 ? 0x5555:0x1354; - fseek (ifp, data_offset, SEEK_SET); - read_shorts (raw_image, raw_width*raw_height); - if (ph1.format) - for (i=0; i < raw_width*raw_height; i+=2) { - a = raw_image[i+0] ^ akey; - b = raw_image[i+1] ^ bkey; - raw_image[i+0] = (a & mask) | (b & ~mask); - raw_image[i+1] = (b & mask) | (a & ~mask); - } -} - -unsigned CLASS ph1_bithuff (int nbits, ushort *huff) -{ - static UINT64 bitbuf=0; - static int vbits=0; - unsigned c; - - if (nbits == -1) - return bitbuf = vbits = 0; - if (nbits == 0) return 0; - if (vbits < nbits) { - bitbuf = bitbuf << 32 | get4(); - vbits += 32; - } - c = bitbuf << (64-vbits) >> (64-nbits); - if (huff) { - vbits -= huff[c] >> 8; - return (uchar) huff[c]; - } - vbits -= nbits; - return c; -} -#define ph1_bits(n) ph1_bithuff(n,0) -#define ph1_huff(h) ph1_bithuff(*h,h+1) - -void CLASS phase_one_load_raw_c() -{ - static const int length[] = { 8,7,6,9,11,10,5,12,14,13 }; - int *offset, len[2], pred[2], row, col, i, j; - ushort *pixel; - short (*black)[2]; - - pixel = (ushort *) calloc (raw_width + raw_height*4, 2); - merror (pixel, "phase_one_load_raw_c()"); - offset = (int *) (pixel + raw_width); - fseek (ifp, strip_offset, SEEK_SET); - for (row=0; row < raw_height; row++) - offset[row] = get4(); - black = (short (*)[2]) offset + raw_height; - fseek (ifp, ph1.black_off, SEEK_SET); - if (ph1.black_off) - read_shorts ((ushort *) black[0], raw_height*2); - for (i=0; i < 256; i++) - curve[i] = i*i / 3.969 + 0.5; - for (row=0; row < raw_height; row++) { - fseek (ifp, data_offset + offset[row], SEEK_SET); - ph1_bits(-1); - pred[0] = pred[1] = 0; - for (col=0; col < raw_width; col++) { - if (col >= (raw_width & -8)) - len[0] = len[1] = 14; - else if ((col & 7) == 0) - for (i=0; i < 2; i++) { - for (j=0; j < 5 && !ph1_bits(1); j++); - if (j--) len[i] = length[j*2 + ph1_bits(1)]; - } - if ((i = len[col & 1]) == 14) - pixel[col] = pred[col & 1] = ph1_bits(16); - else - pixel[col] = pred[col & 1] += ph1_bits(i) + 1 - (1 << (i - 1)); - if (pred[col & 1] >> 16) derror(); - if (ph1.format == 5 && pixel[col] < 256) - pixel[col] = curve[pixel[col]]; - } - for (col=0; col < raw_width; col++) { - i = (pixel[col] << 2) - ph1.black + black[row][col >= ph1.split_col]; - if (i > 0) RAW(row,col) = i; - } - } - free (pixel); - maximum = 0xfffc - ph1.black; -} - -void CLASS hasselblad_load_raw() -{ - struct jhead jh; - int row, col, pred[2], len[2], diff, c; - - if (!ljpeg_start (&jh, 0)) return; - order = 0x4949; - ph1_bits(-1); - for (row=0; row < raw_height; row++) { - pred[0] = pred[1] = 0x8000 + load_flags; - for (col=0; col < raw_width; col+=2) { - FORC(2) len[c] = ph1_huff(jh.huff[0]); - FORC(2) { - diff = ph1_bits(len[c]); - if ((diff & (1 << (len[c]-1))) == 0) - diff -= (1 << len[c]) - 1; - if (diff == 65535) diff = -32768; - pred[c] += diff; - if (row >= 0 && (unsigned)(col+c) < width) - RAW(row,col+c) = pred[c]; - } - } - } - ljpeg_end (&jh); - maximum = 0xffff; -} - -void CLASS leaf_hdr_load_raw() -{ - ushort *pixel=0; - unsigned tile=0, r, c, row, col; - - if (!filters) { - pixel = (ushort *) calloc (raw_width, sizeof *pixel); - merror (pixel, "leaf_hdr_load_raw()"); - } - FORC(tiff_samples) - for (r=0; r < raw_height; r++) { - if (r % tile_length == 0) { - fseek (ifp, data_offset + 4*tile++, SEEK_SET); - fseek (ifp, get4(), SEEK_SET); - } - if (filters && c != shot_select) continue; - if (filters) pixel = raw_image + r*raw_width; - read_shorts (pixel, raw_width); - if (!filters && (row = r - top_margin) < height) - for (col=0; col < width; col++) - image[row*width+col][c] = pixel[col+left_margin]; - } - if (!filters) { - maximum = 0xffff; - raw_color = 1; - free (pixel); - } -} - -void CLASS unpacked_load_raw() -{ - int row, col, bits=0; - - while (1 << ++bits < maximum); - read_shorts (raw_image, raw_width*raw_height); - for (row=0; row < raw_height; row++) - for (col=0; col < raw_width; col++) - if ((RAW(row,col) >>= load_flags) >> bits - && (unsigned) (row-top_margin) < height - && (unsigned) (col-left_margin) < width) derror(); -} - -void CLASS sinar_4shot_load_raw() -{ - ushort *pixel; - unsigned shot, row, col, r, c; - - if ((shot = shot_select) || half_size) { - if (shot) shot--; - if (shot > 3) shot = 3; - fseek (ifp, data_offset + shot*4, SEEK_SET); - fseek (ifp, get4(), SEEK_SET); - unpacked_load_raw(); - return; - } - free (raw_image); - raw_image = 0; - free (image); - image = (ushort (*)[4]) - calloc ((iheight=height)*(iwidth=width), sizeof *image); - merror (image, "sinar_4shot_load_raw()"); - pixel = (ushort *) calloc (raw_width, sizeof *pixel); - merror (pixel, "sinar_4shot_load_raw()"); - for (shot=0; shot < 4; shot++) { - fseek (ifp, data_offset + shot*4, SEEK_SET); - fseek (ifp, get4(), SEEK_SET); - for (row=0; row < raw_height; row++) { - read_shorts (pixel, raw_width); - if ((r = row-top_margin - (shot >> 1 & 1)) >= height) continue; - for (col=0; col < raw_width; col++) { - if ((c = col-left_margin - (shot & 1)) >= width) continue; - image[r*width+c][FC(row,col)] = pixel[col]; - } - } - } - free (pixel); - shrink = filters = 0; -} - -void CLASS imacon_full_load_raw() -{ - int row, col; - - for (row=0; row < height; row++) - for (col=0; col < width; col++) - read_shorts (image[row*width+col], 3); -} - -void CLASS packed_load_raw() -{ - int vbits=0, bwide, pwide, rbits, bite, half, irow, row, col, val, i; - UINT64 bitbuf=0; - - if (raw_width * 8 >= width * tiff_bps) /* Is raw_width in bytes? */ - pwide = (bwide = raw_width) * 8 / tiff_bps; - else bwide = (pwide = raw_width) * tiff_bps / 8; - rbits = bwide * 8 - pwide * tiff_bps; - if (load_flags & 1) bwide = bwide * 16 / 15; - bite = 8 + (load_flags & 24); - half = (raw_height+1) >> 1; - for (irow=0; irow < raw_height; irow++) { - row = irow; - if (load_flags & 2 && - (row = irow % half * 2 + irow / half) == 1 && - load_flags & 4) { - if (vbits=0, tiff_compress) - fseek (ifp, data_offset - (-half*bwide & -2048), SEEK_SET); - else { - fseek (ifp, 0, SEEK_END); - fseek (ifp, ftell(ifp) >> 3 << 2, SEEK_SET); - } - } - for (col=0; col < pwide; col++) { - for (vbits -= tiff_bps; vbits < 0; vbits += bite) { - bitbuf <<= bite; - for (i=0; i < bite; i+=8) - bitbuf |= (unsigned) (fgetc(ifp) << i); - } - val = bitbuf << (64-tiff_bps-vbits) >> (64-tiff_bps); - RAW(row,col ^ (load_flags >> 6)) = val; - if (load_flags & 1 && (col % 10) == 9 && - fgetc(ifp) && col < width+left_margin) derror(); - } - vbits -= rbits; - } -} - -void CLASS nokia_load_raw() -{ - uchar *data, *dp; - int rev, dwide, row, col, c; - - rev = 3 * (order == 0x4949); - dwide = raw_width * 5 / 4; - data = (uchar *) malloc (dwide*2); - merror (data, "nokia_load_raw()"); - for (row=0; row < raw_height; row++) { - if (fread (data+dwide, 1, dwide, ifp) < dwide) derror(); - FORC(dwide) data[c] = data[dwide+(c ^ rev)]; - for (dp=data, col=0; col < raw_width; dp+=5, col+=4) - FORC4 RAW(row,col+c) = (dp[c] << 2) | (dp[4] >> (c << 1) & 3); - } - free (data); - maximum = 0x3ff; -} - -unsigned CLASS pana_bits (int nbits) -{ - static uchar buf[0x4000]; - static int vbits; - int byte; - - if (!nbits) return vbits=0; - if (!vbits) { - fread (buf+load_flags, 1, 0x4000-load_flags, ifp); - fread (buf, 1, load_flags, ifp); - } - vbits = (vbits - nbits) & 0x1ffff; - byte = vbits >> 3 ^ 0x3ff0; - return (buf[byte] | buf[byte+1] << 8) >> (vbits & 7) & ~(-1 << nbits); -} - -void CLASS panasonic_load_raw() -{ - int row, col, i, j, sh=0, pred[2], nonz[2]; - - pana_bits(0); - for (row=0; row < height; row++) - for (col=0; col < raw_width; col++) { - if ((i = col % 14) == 0) - pred[0] = pred[1] = nonz[0] = nonz[1] = 0; - if (i % 3 == 2) sh = 4 >> (3 - pana_bits(2)); - if (nonz[i & 1]) { - if ((j = pana_bits(8))) { - if ((pred[i & 1] -= 0x80 << sh) < 0 || sh == 4) - pred[i & 1] &= ~(-1 << sh); - pred[i & 1] += j << sh; - } - } else if ((nonz[i & 1] = pana_bits(8)) || i > 11) - pred[i & 1] = nonz[i & 1] << 4 | pana_bits(4); - if (col < width) - if ((RAW(row,col) = pred[col & 1]) > 4098) derror(); - } -} - -void CLASS olympus_load_raw() -{ - ushort huff[4096]; - int row, col, nbits, sign, low, high, i, c, w, n, nw; - int acarry[2][3], *carry, pred, diff; - - huff[n=0] = 0xc0c; - for (i=12; i--; ) - FORC(2048 >> i) huff[++n] = (i+1) << 8 | i; - fseek (ifp, 7, SEEK_CUR); - getbits(-1); - for (row=0; row < height; row++) { - memset (acarry, 0, sizeof acarry); - for (col=0; col < raw_width; col++) { - carry = acarry[col & 1]; - i = 2 * (carry[2] < 3); - for (nbits=2+i; (ushort) carry[0] >> (nbits+i); nbits++); - low = (sign = getbits(3)) & 3; - sign = sign << 29 >> 31; - if ((high = getbithuff(12,huff)) == 12) - high = getbits(16-nbits) >> 1; - carry[0] = (high << nbits) | getbits(nbits); - diff = (carry[0] ^ sign) + carry[1]; - carry[1] = (diff*3 + carry[1]) >> 5; - carry[2] = carry[0] > 16 ? 0 : carry[2]+1; - if (col >= width) continue; - if (row < 2 && col < 2) pred = 0; - else if (row < 2) pred = RAW(row,col-2); - else if (col < 2) pred = RAW(row-2,col); - else { - w = RAW(row,col-2); - n = RAW(row-2,col); - nw = RAW(row-2,col-2); - if ((w < nw && nw < n) || (n < nw && nw < w)) { - if (ABS(w-nw) > 32 || ABS(n-nw) > 32) - pred = w + n - nw; - else pred = (w + n) >> 1; - } else pred = ABS(w-nw) > ABS(n-nw) ? w : n; - } - if ((RAW(row,col) = pred + ((diff << 2) | low)) >> 12) derror(); - } - } -} - -void CLASS minolta_rd175_load_raw() -{ - uchar pixel[768]; - unsigned irow, box, row, col; - - for (irow=0; irow < 1481; irow++) { - if (fread (pixel, 1, 768, ifp) < 768) derror(); - box = irow / 82; - row = irow % 82 * 12 + ((box < 12) ? box | 1 : (box-12)*2); - switch (irow) { - case 1477: case 1479: continue; - case 1476: row = 984; break; - case 1480: row = 985; break; - case 1478: row = 985; box = 1; - } - if ((box < 12) && (box & 1)) { - for (col=0; col < 1533; col++, row ^= 1) - if (col != 1) RAW(row,col) = (col+1) & 2 ? - pixel[col/2-1] + pixel[col/2+1] : pixel[col/2] << 1; - RAW(row,1) = pixel[1] << 1; - RAW(row,1533) = pixel[765] << 1; - } else - for (col=row & 1; col < 1534; col+=2) - RAW(row,col) = pixel[col/2] << 1; - } - maximum = 0xff << 1; -} - -void CLASS quicktake_100_load_raw() -{ - uchar pixel[484][644]; - static const short gstep[16] = - { -89,-60,-44,-32,-22,-15,-8,-2,2,8,15,22,32,44,60,89 }; - static const short rstep[6][4] = - { { -3,-1,1,3 }, { -5,-1,1,5 }, { -8,-2,2,8 }, - { -13,-3,3,13 }, { -19,-4,4,19 }, { -28,-6,6,28 } }; - static const short curve[256] = - { 0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27, - 28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53, - 54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,74,75,76,77,78, - 79,80,81,82,83,84,86,88,90,92,94,97,99,101,103,105,107,110,112,114,116, - 118,120,123,125,127,129,131,134,136,138,140,142,144,147,149,151,153,155, - 158,160,162,164,166,168,171,173,175,177,179,181,184,186,188,190,192,195, - 197,199,201,203,205,208,210,212,214,216,218,221,223,226,230,235,239,244, - 248,252,257,261,265,270,274,278,283,287,291,296,300,305,309,313,318,322, - 326,331,335,339,344,348,352,357,361,365,370,374,379,383,387,392,396,400, - 405,409,413,418,422,426,431,435,440,444,448,453,457,461,466,470,474,479, - 483,487,492,496,500,508,519,531,542,553,564,575,587,598,609,620,631,643, - 654,665,676,687,698,710,721,732,743,754,766,777,788,799,810,822,833,844, - 855,866,878,889,900,911,922,933,945,956,967,978,989,1001,1012,1023 }; - int rb, row, col, sharp, val=0; - - getbits(-1); - memset (pixel, 0x80, sizeof pixel); - for (row=2; row < height+2; row++) { - for (col=2+(row & 1); col < width+2; col+=2) { - val = ((pixel[row-1][col-1] + 2*pixel[row-1][col+1] + - pixel[row][col-2]) >> 2) + gstep[getbits(4)]; - pixel[row][col] = val = LIM(val,0,255); - if (col < 4) - pixel[row][col-2] = pixel[row+1][~row & 1] = val; - if (row == 2) - pixel[row-1][col+1] = pixel[row-1][col+3] = val; - } - pixel[row][col] = val; - } - for (rb=0; rb < 2; rb++) - for (row=2+rb; row < height+2; row+=2) - for (col=3-(row & 1); col < width+2; col+=2) { - if (row < 4 || col < 4) sharp = 2; - else { - val = ABS(pixel[row-2][col] - pixel[row][col-2]) - + ABS(pixel[row-2][col] - pixel[row-2][col-2]) - + ABS(pixel[row][col-2] - pixel[row-2][col-2]); - sharp = val < 4 ? 0 : val < 8 ? 1 : val < 16 ? 2 : - val < 32 ? 3 : val < 48 ? 4 : 5; - } - val = ((pixel[row-2][col] + pixel[row][col-2]) >> 1) - + rstep[sharp][getbits(2)]; - pixel[row][col] = val = LIM(val,0,255); - if (row < 4) pixel[row-2][col+2] = val; - if (col < 4) pixel[row+2][col-2] = val; - } - for (row=2; row < height+2; row++) - for (col=3-(row & 1); col < width+2; col+=2) { - val = ((pixel[row][col-1] + (pixel[row][col] << 2) + - pixel[row][col+1]) >> 1) - 0x100; - pixel[row][col] = LIM(val,0,255); - } - for (row=0; row < height; row++) - for (col=0; col < width; col++) - RAW(row,col) = curve[pixel[row+2][col+2]]; - maximum = 0x3ff; -} - -#define radc_token(tree) ((signed char) getbithuff(8,huff[tree])) - -#define FORYX for (y=1; y < 3; y++) for (x=col+1; x >= col; x--) - -#define PREDICTOR (c ? (buf[c][y-1][x] + buf[c][y][x+1]) / 2 \ -: (buf[c][y-1][x+1] + 2*buf[c][y-1][x] + buf[c][y][x+1]) / 4) - -void CLASS kodak_radc_load_raw() -{ - static const char src[] = { - 1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8, - 1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8, - 2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8, - 2,0, 2,1, 2,3, 3,2, 4,4, 5,6, 6,7, 7,5, 7,8, - 2,1, 2,4, 3,0, 3,2, 3,3, 4,7, 5,5, 6,6, 6,8, - 2,3, 3,1, 3,2, 3,4, 3,5, 3,6, 4,7, 5,0, 5,8, - 2,3, 2,6, 3,0, 3,1, 4,4, 4,5, 4,7, 5,2, 5,8, - 2,4, 2,7, 3,3, 3,6, 4,1, 4,2, 4,5, 5,0, 5,8, - 2,6, 3,1, 3,3, 3,5, 3,7, 3,8, 4,0, 5,2, 5,4, - 2,0, 2,1, 3,2, 3,3, 4,4, 4,5, 5,6, 5,7, 4,8, - 1,0, 2,2, 2,-2, - 1,-3, 1,3, - 2,-17, 2,-5, 2,5, 2,17, - 2,-7, 2,2, 2,9, 2,18, - 2,-18, 2,-9, 2,-2, 2,7, - 2,-28, 2,28, 3,-49, 3,-9, 3,9, 4,49, 5,-79, 5,79, - 2,-1, 2,13, 2,26, 3,39, 4,-16, 5,55, 6,-37, 6,76, - 2,-26, 2,-13, 2,1, 3,-39, 4,16, 5,-55, 6,-76, 6,37 - }; - ushort huff[19][256]; - int row, col, tree, nreps, rep, step, i, c, s, r, x, y, val; - short last[3] = { 16,16,16 }, mul[3], buf[3][3][386]; - static const ushort pt[] = - { 0,0, 1280,1344, 2320,3616, 3328,8000, 4095,16383, 65535,16383 }; - - for (i=2; i < 12; i+=2) - for (c=pt[i-2]; c <= pt[i]; c++) - curve[c] = (float) - (c-pt[i-2]) / (pt[i]-pt[i-2]) * (pt[i+1]-pt[i-1]) + pt[i-1] + 0.5; - for (s=i=0; i < sizeof src; i+=2) - FORC(256 >> src[i]) - huff[0][s++] = src[i] << 8 | (uchar) src[i+1]; - s = kodak_cbpp == 243 ? 2 : 3; - FORC(256) huff[18][c] = (8-s) << 8 | c >> s << s | 1 << (s-1); - getbits(-1); - for (i=0; i < sizeof(buf)/sizeof(short); i++) - buf[0][0][i] = 2048; - for (row=0; row < height; row+=4) { - FORC3 mul[c] = getbits(6); - FORC3 { - val = ((0x1000000/last[c] + 0x7ff) >> 12) * mul[c]; - s = val > 65564 ? 10:12; - x = ~(-1 << (s-1)); - val <<= 12-s; - for (i=0; i < sizeof(buf[0])/sizeof(short); i++) - buf[c][0][i] = (buf[c][0][i] * val + x) >> s; - last[c] = mul[c]; - for (r=0; r <= !c; r++) { - buf[c][1][width/2] = buf[c][2][width/2] = mul[c] << 7; - for (tree=1, col=width/2; col > 0; ) { - if ((tree = radc_token(tree))) { - col -= 2; - if (tree == 8) - FORYX buf[c][y][x] = (uchar) radc_token(18) * mul[c]; - else - FORYX buf[c][y][x] = radc_token(tree+10) * 16 + PREDICTOR; - } else - do { - nreps = (col > 2) ? radc_token(9) + 1 : 1; - for (rep=0; rep < 8 && rep < nreps && col > 0; rep++) { - col -= 2; - FORYX buf[c][y][x] = PREDICTOR; - if (rep & 1) { - step = radc_token(10) << 4; - FORYX buf[c][y][x] += step; - } - } - } while (nreps == 9); - } - for (y=0; y < 2; y++) - for (x=0; x < width/2; x++) { - val = (buf[c][y+1][x] << 4) / mul[c]; - if (val < 0) val = 0; - if (c) RAW(row+y*2+c-1,x*2+2-c) = val; - else RAW(row+r*2+y,x*2+y) = val; - } - memcpy (buf[c][0]+!c, buf[c][2], sizeof buf[c][0]-2*!c); - } - } - for (y=row; y < row+4; y++) - for (x=0; x < width; x++) - if ((x+y) & 1) { - r = x ? x-1 : x+1; - s = x+1 < width ? x+1 : x-1; - val = (RAW(y,x)-2048)*2 + (RAW(y,r)+RAW(y,s))/2; - if (val < 0) val = 0; - RAW(y,x) = val; - } - } - for (i=0; i < height*width; i++) - raw_image[i] = curve[raw_image[i]]; - maximum = 0x3fff; -} - -#undef FORYX -#undef PREDICTOR - -#ifdef NO_JPEG -void CLASS kodak_jpeg_load_raw() {} -void CLASS lossy_dng_load_raw() {} -#else - -METHODDEF(boolean) -fill_input_buffer (j_decompress_ptr cinfo) -{ - static uchar jpeg_buffer[4096]; - size_t nbytes; - - nbytes = fread (jpeg_buffer, 1, 4096, ifp); - swab (jpeg_buffer, jpeg_buffer, nbytes); - cinfo->src->next_input_byte = jpeg_buffer; - cinfo->src->bytes_in_buffer = nbytes; - return TRUE; -} - -void CLASS kodak_jpeg_load_raw() -{ - struct jpeg_decompress_struct cinfo; - struct jpeg_error_mgr jerr; - JSAMPARRAY buf; - JSAMPLE (*pixel)[3]; - int row, col; - - cinfo.err = jpeg_std_error (&jerr); - jpeg_create_decompress (&cinfo); - jpeg_stdio_src (&cinfo, ifp); - cinfo.src->fill_input_buffer = fill_input_buffer; - jpeg_read_header (&cinfo, TRUE); - jpeg_start_decompress (&cinfo); - if ((cinfo.output_width != width ) || - (cinfo.output_height*2 != height ) || - (cinfo.output_components != 3 )) { - fprintf (stderr,_("%s: incorrect JPEG dimensions\n"), ifname); - jpeg_destroy_decompress (&cinfo); - longjmp (failure, 3); - } - buf = (*cinfo.mem->alloc_sarray) - ((j_common_ptr) &cinfo, JPOOL_IMAGE, width*3, 1); - - while (cinfo.output_scanline < cinfo.output_height) { - row = cinfo.output_scanline * 2; - jpeg_read_scanlines (&cinfo, buf, 1); - pixel = (JSAMPLE (*)[3]) buf[0]; - for (col=0; col < width; col+=2) { - RAW(row+0,col+0) = pixel[col+0][1] << 1; - RAW(row+1,col+1) = pixel[col+1][1] << 1; - RAW(row+0,col+1) = pixel[col][0] + pixel[col+1][0]; - RAW(row+1,col+0) = pixel[col][2] + pixel[col+1][2]; - } - } - jpeg_finish_decompress (&cinfo); - jpeg_destroy_decompress (&cinfo); - maximum = 0xff << 1; -} - -void CLASS lossy_dng_load_raw() -{ - struct jpeg_decompress_struct cinfo; - struct jpeg_error_mgr jerr; - JSAMPARRAY buf; - JSAMPLE (*pixel)[3]; - unsigned sorder=order, ntags, opcode, deg, i, j, c; - unsigned save=data_offset-4, trow=0, tcol=0, row, col; - ushort curve[3][256]; - double coeff[9], tot; - - fseek (ifp, meta_offset, SEEK_SET); - order = 0x4d4d; - ntags = get4(); - while (ntags--) { - opcode = get4(); get4(); get4(); - if (opcode != 8) - { fseek (ifp, get4(), SEEK_CUR); continue; } - fseek (ifp, 20, SEEK_CUR); - if ((c = get4()) > 2) break; - fseek (ifp, 12, SEEK_CUR); - if ((deg = get4()) > 8) break; - for (i=0; i <= deg && i < 9; i++) - coeff[i] = getreal(12); - for (i=0; i < 256; i++) { - for (tot=j=0; j <= deg; j++) - tot += coeff[j] * pow(i/255.0, j); - curve[c][i] = tot*0xffff; - } - } - order = sorder; - cinfo.err = jpeg_std_error (&jerr); - jpeg_create_decompress (&cinfo); - while (trow < raw_height) { - fseek (ifp, save+=4, SEEK_SET); - if (tile_length < INT_MAX) - fseek (ifp, get4(), SEEK_SET); - jpeg_stdio_src (&cinfo, ifp); - jpeg_read_header (&cinfo, TRUE); - jpeg_start_decompress (&cinfo); - buf = (*cinfo.mem->alloc_sarray) - ((j_common_ptr) &cinfo, JPOOL_IMAGE, cinfo.output_width*3, 1); - while (cinfo.output_scanline < cinfo.output_height && - (row = trow + cinfo.output_scanline) < height) { - jpeg_read_scanlines (&cinfo, buf, 1); - pixel = (JSAMPLE (*)[3]) buf[0]; - for (col=0; col < cinfo.output_width && tcol+col < width; col++) { - FORC3 image[row*width+tcol+col][c] = curve[c][pixel[col][c]]; - } - } - jpeg_abort_decompress (&cinfo); - if ((tcol += tile_width) >= raw_width) - trow += tile_length + (tcol = 0); - } - jpeg_destroy_decompress (&cinfo); - maximum = 0xffff; -} -#endif - -void CLASS kodak_dc120_load_raw() -{ - static const int mul[4] = { 162, 192, 187, 92 }; - static const int add[4] = { 0, 636, 424, 212 }; - uchar pixel[848]; - int row, shift, col; - - for (row=0; row < height; row++) { - if (fread (pixel, 1, 848, ifp) < 848) derror(); - shift = row * mul[row & 3] + add[row & 3]; - for (col=0; col < width; col++) - RAW(row,col) = (ushort) pixel[(col + shift) % 848]; - } - maximum = 0xff; -} - -void CLASS eight_bit_load_raw() -{ - uchar *pixel; - unsigned row, col; - - pixel = (uchar *) calloc (raw_width, sizeof *pixel); - merror (pixel, "eight_bit_load_raw()"); - for (row=0; row < raw_height; row++) { - if (fread (pixel, 1, raw_width, ifp) < raw_width) derror(); - for (col=0; col < raw_width; col++) - RAW(row,col) = curve[pixel[col]]; - } - free (pixel); - maximum = curve[0xff]; -} - -void CLASS kodak_yrgb_load_raw() -{ - uchar *pixel; - int row, col, y, cb, cr, rgb[3], c; - - pixel = (uchar *) calloc (raw_width, 3*sizeof *pixel); - merror (pixel, "kodak_yrgb_load_raw()"); - for (row=0; row < height; row++) { - if (~row & 1) - if (fread (pixel, raw_width, 3, ifp) < 3) derror(); - for (col=0; col < raw_width; col++) { - y = pixel[width*2*(row & 1) + col]; - cb = pixel[width + (col & -2)] - 128; - cr = pixel[width + (col & -2)+1] - 128; - rgb[1] = y-((cb + cr + 2) >> 2); - rgb[2] = rgb[1] + cb; - rgb[0] = rgb[1] + cr; - FORC3 image[row*width+col][c] = curve[LIM(rgb[c],0,255)]; - } - } - free (pixel); - maximum = curve[0xff]; -} - -void CLASS kodak_262_load_raw() -{ - static const uchar kodak_tree[2][26] = - { { 0,1,5,1,1,2,0,0,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9 }, - { 0,3,1,1,1,1,1,2,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9 } }; - ushort *huff[2]; - uchar *pixel; - int *strip, ns, c, row, col, chess, pi=0, pi1, pi2, pred, val; - - FORC(2) huff[c] = make_decoder (kodak_tree[c]); - ns = (raw_height+63) >> 5; - pixel = (uchar *) malloc (raw_width*32 + ns*4); - merror (pixel, "kodak_262_load_raw()"); - strip = (int *) (pixel + raw_width*32); - order = 0x4d4d; - FORC(ns) strip[c] = get4(); - for (row=0; row < raw_height; row++) { - if ((row & 31) == 0) { - fseek (ifp, strip[row >> 5], SEEK_SET); - getbits(-1); - pi = 0; - } - for (col=0; col < raw_width; col++) { - chess = (row + col) & 1; - pi1 = chess ? pi-2 : pi-raw_width-1; - pi2 = chess ? pi-2*raw_width : pi-raw_width+1; - if (col <= chess) pi1 = -1; - if (pi1 < 0) pi1 = pi2; - if (pi2 < 0) pi2 = pi1; - if (pi1 < 0 && col > 1) pi1 = pi2 = pi-2; - pred = (pi1 < 0) ? 0 : (pixel[pi1] + pixel[pi2]) >> 1; - pixel[pi] = val = pred + ljpeg_diff (huff[chess]); - if (val >> 8) derror(); - val = curve[pixel[pi++]]; - RAW(row,col) = val; - } - } - free (pixel); - FORC(2) free (huff[c]); -} - -int CLASS kodak_65000_decode (short *out, int bsize) -{ - uchar c, blen[768]; - ushort raw[6]; - INT64 bitbuf=0; - int save, bits=0, i, j, len, diff; - - save = ftell(ifp); - bsize = (bsize + 3) & -4; - for (i=0; i < bsize; i+=2) { - c = fgetc(ifp); - if ((blen[i ] = c & 15) > 12 || - (blen[i+1] = c >> 4) > 12 ) { - fseek (ifp, save, SEEK_SET); - for (i=0; i < bsize; i+=8) { - read_shorts (raw, 6); - out[i ] = raw[0] >> 12 << 8 | raw[2] >> 12 << 4 | raw[4] >> 12; - out[i+1] = raw[1] >> 12 << 8 | raw[3] >> 12 << 4 | raw[5] >> 12; - for (j=0; j < 6; j++) - out[i+2+j] = raw[j] & 0xfff; - } - return 1; - } - } - if ((bsize & 7) == 4) { - bitbuf = fgetc(ifp) << 8; - bitbuf += fgetc(ifp); - bits = 16; - } - for (i=0; i < bsize; i++) { - len = blen[i]; - if (bits < len) { - for (j=0; j < 32; j+=8) - bitbuf += (INT64) fgetc(ifp) << (bits+(j^8)); - bits += 32; - } - diff = bitbuf & (0xffff >> (16-len)); - bitbuf >>= len; - bits -= len; - if ((diff & (1 << (len-1))) == 0) - diff -= (1 << len) - 1; - out[i] = diff; - } - return 0; -} - -void CLASS kodak_65000_load_raw() -{ - short buf[256]; - int row, col, len, pred[2], ret, i; - - for (row=0; row < height; row++) - for (col=0; col < width; col+=256) { - pred[0] = pred[1] = 0; - len = MIN (256, width-col); - ret = kodak_65000_decode (buf, len); - for (i=0; i < len; i++) - if ((RAW(row,col+i) = curve[ret ? buf[i] : - (pred[i & 1] += buf[i])]) >> 12) derror(); - } -} - -void CLASS kodak_ycbcr_load_raw() -{ - short buf[384], *bp; - int row, col, len, c, i, j, k, y[2][2], cb, cr, rgb[3]; - ushort *ip; - - for (row=0; row < height; row+=2) - for (col=0; col < width; col+=128) { - len = MIN (128, width-col); - kodak_65000_decode (buf, len*3); - y[0][1] = y[1][1] = cb = cr = 0; - for (bp=buf, i=0; i < len; i+=2, bp+=2) { - cb += bp[4]; - cr += bp[5]; - rgb[1] = -((cb + cr + 2) >> 2); - rgb[2] = rgb[1] + cb; - rgb[0] = rgb[1] + cr; - for (j=0; j < 2; j++) - for (k=0; k < 2; k++) { - if ((y[j][k] = y[j][k^1] + *bp++) >> 10) derror(); - ip = image[(row+j)*width + col+i+k]; - FORC3 ip[c] = curve[LIM(y[j][k]+rgb[c], 0, 0xfff)]; - } - } - } -} - -void CLASS kodak_rgb_load_raw() -{ - short buf[768], *bp; - int row, col, len, c, i, rgb[3]; - ushort *ip=image[0]; - - if (raw_image) free (raw_image); - raw_image = 0; - for (row=0; row < height; row++) - for (col=0; col < width; col+=256) { - len = MIN (256, width-col); - kodak_65000_decode (buf, len*3); - memset (rgb, 0, sizeof rgb); - for (bp=buf, i=0; i < len; i++, ip+=4) - FORC3 if ((ip[c] = rgb[c] += *bp++) >> 12) derror(); - } -} - -void CLASS kodak_thumb_load_raw() -{ - int row, col; - colors = thumb_misc >> 5; - for (row=0; row < height; row++) - for (col=0; col < width; col++) - read_shorts (image[row*width+col], colors); - maximum = (1 << (thumb_misc & 31)) - 1; -} - -void CLASS sony_decrypt (unsigned *data, int len, int start, int key) -{ - static unsigned pad[128], p; - - if (start) { - for (p=0; p < 4; p++) - pad[p] = key = key * 48828125 + 1; - pad[3] = pad[3] << 1 | (pad[0]^pad[2]) >> 31; - for (p=4; p < 127; p++) - pad[p] = (pad[p-4]^pad[p-2]) << 1 | (pad[p-3]^pad[p-1]) >> 31; - for (p=0; p < 127; p++) - pad[p] = htonl(pad[p]); - } - while (len--) - *data++ ^= pad[p++ & 127] = pad[(p+1) & 127] ^ pad[(p+65) & 127]; -} - -void CLASS sony_load_raw() -{ - uchar head[40]; - ushort *pixel; - unsigned i, key, row, col; - - fseek (ifp, 200896, SEEK_SET); - fseek (ifp, (unsigned) fgetc(ifp)*4 - 1, SEEK_CUR); - order = 0x4d4d; - key = get4(); - fseek (ifp, 164600, SEEK_SET); - fread (head, 1, 40, ifp); - sony_decrypt ((unsigned int *) head, 10, 1, key); - for (i=26; i-- > 22; ) - key = key << 8 | head[i]; - fseek (ifp, data_offset, SEEK_SET); - for (row=0; row < raw_height; row++) { - pixel = raw_image + row*raw_width; - if (fread (pixel, 2, raw_width, ifp) < raw_width) derror(); - sony_decrypt ((unsigned int *) pixel, raw_width/2, !row, key); - for (col=0; col < raw_width; col++) - if ((pixel[col] = ntohs(pixel[col])) >> 14) derror(); - } - maximum = 0x3ff0; -} - -void CLASS sony_arw_load_raw() -{ - ushort huff[32768]; - static const ushort tab[18] = - { 0xf11,0xf10,0xe0f,0xd0e,0xc0d,0xb0c,0xa0b,0x90a,0x809, - 0x708,0x607,0x506,0x405,0x304,0x303,0x300,0x202,0x201 }; - int i, c, n, col, row, len, diff, sum=0; - - for (n=i=0; i < 18; i++) - FORC(32768 >> (tab[i] >> 8)) huff[n++] = tab[i]; - getbits(-1); - for (col = raw_width; col--; ) - for (row=0; row < raw_height+1; row+=2) { - if (row == raw_height) row = 1; - len = getbithuff(15,huff); - diff = getbits(len); - if ((diff & (1 << (len-1))) == 0) - diff -= (1 << len) - 1; - if ((sum += diff) >> 12) derror(); - if (row < height) RAW(row,col) = sum; - } -} - -void CLASS sony_arw2_load_raw() -{ - uchar *data, *dp; - ushort pix[16]; - int row, col, val, max, min, imax, imin, sh, bit, i; - - data = (uchar *) malloc (raw_width); - merror (data, "sony_arw2_load_raw()"); - for (row=0; row < height; row++) { - fread (data, 1, raw_width, ifp); - for (dp=data, col=0; col < raw_width-30; dp+=16) { - max = 0x7ff & (val = sget4(dp)); - min = 0x7ff & val >> 11; - imax = 0x0f & val >> 22; - imin = 0x0f & val >> 26; - for (sh=0; sh < 4 && 0x80 << sh <= max-min; sh++); - for (bit=30, i=0; i < 16; i++) - if (i == imax) pix[i] = max; - else if (i == imin) pix[i] = min; - else { - pix[i] = ((sget2(dp+(bit >> 3)) >> (bit & 7) & 0x7f) << sh) + min; - if (pix[i] > 0x7ff) pix[i] = 0x7ff; - bit += 7; - } - for (i=0; i < 16; i++, col+=2) - if (col < width) RAW(row,col) = curve[pix[i] << 1] >> 2; - col -= col & 1 ? 1:31; - } - } - free (data); -} - -#define HOLE(row) ((holes >> (((row) - raw_height) & 7)) & 1) - -/* Kudos to Rich Taylor for figuring out SMaL's compression algorithm. */ -void CLASS smal_decode_segment (unsigned seg[2][2], int holes) -{ - uchar hist[3][13] = { - { 7, 7, 0, 0, 63, 55, 47, 39, 31, 23, 15, 7, 0 }, - { 7, 7, 0, 0, 63, 55, 47, 39, 31, 23, 15, 7, 0 }, - { 3, 3, 0, 0, 63, 47, 31, 15, 0 } }; - int low, high=0xff, carry=0, nbits=8; - int pix, s, count, bin, next, i, sym[3]; - uchar diff, pred[]={0,0}; - ushort data=0, range=0; - - fseek (ifp, seg[0][1]+1, SEEK_SET); - getbits(-1); - for (pix=seg[0][0]; pix < seg[1][0]; pix++) { - for (s=0; s < 3; s++) { - data = data << nbits | getbits(nbits); - if (carry < 0) - carry = (nbits += carry+1) < 1 ? nbits-1 : 0; - while (--nbits >= 0) - if ((data >> nbits & 0xff) == 0xff) break; - if (nbits > 0) - data = ((data & ((1 << (nbits-1)) - 1)) << 1) | - ((data + (((data & (1 << (nbits-1)))) << 1)) & (-1 << nbits)); - if (nbits >= 0) { - data += getbits(1); - carry = nbits - 8; - } - count = ((((data-range+1) & 0xffff) << 2) - 1) / (high >> 4); - for (bin=0; hist[s][bin+5] > count; bin++); - low = hist[s][bin+5] * (high >> 4) >> 2; - if (bin) high = hist[s][bin+4] * (high >> 4) >> 2; - high -= low; - for (nbits=0; high << nbits < 128; nbits++); - range = (range+low) << nbits; - high <<= nbits; - next = hist[s][1]; - if (++hist[s][2] > hist[s][3]) { - next = (next+1) & hist[s][0]; - hist[s][3] = (hist[s][next+4] - hist[s][next+5]) >> 2; - hist[s][2] = 1; - } - if (hist[s][hist[s][1]+4] - hist[s][hist[s][1]+5] > 1) { - if (bin < hist[s][1]) - for (i=bin; i < hist[s][1]; i++) hist[s][i+5]--; - else if (next <= bin) - for (i=hist[s][1]; i < bin; i++) hist[s][i+5]++; - } - hist[s][1] = next; - sym[s] = bin; - } - diff = sym[2] << 5 | sym[1] << 2 | (sym[0] & 3); - if (sym[0] & 4) - diff = diff ? -diff : 0x80; - if (ftell(ifp) + 12 >= seg[1][1]) - diff = 0; - raw_image[pix] = pred[pix & 1] += diff; - if (!(pix & 1) && HOLE(pix / raw_width)) pix += 2; - } - maximum = 0xff; -} - -void CLASS smal_v6_load_raw() -{ - unsigned seg[2][2]; - - fseek (ifp, 16, SEEK_SET); - seg[0][0] = 0; - seg[0][1] = get2(); - seg[1][0] = raw_width * raw_height; - seg[1][1] = INT_MAX; - smal_decode_segment (seg, 0); -} - -int CLASS median4 (int *p) -{ - int min, max, sum, i; - - min = max = sum = p[0]; - for (i=1; i < 4; i++) { - sum += p[i]; - if (min > p[i]) min = p[i]; - if (max < p[i]) max = p[i]; - } - return (sum - min - max) >> 1; -} - -void CLASS fill_holes (int holes) -{ - int row, col, val[4]; - - for (row=2; row < height-2; row++) { - if (!HOLE(row)) continue; - for (col=1; col < width-1; col+=4) { - val[0] = RAW(row-1,col-1); - val[1] = RAW(row-1,col+1); - val[2] = RAW(row+1,col-1); - val[3] = RAW(row+1,col+1); - RAW(row,col) = median4(val); - } - for (col=2; col < width-2; col+=4) - if (HOLE(row-2) || HOLE(row+2)) - RAW(row,col) = (RAW(row,col-2) + RAW(row,col+2)) >> 1; - else { - val[0] = RAW(row,col-2); - val[1] = RAW(row,col+2); - val[2] = RAW(row-2,col); - val[3] = RAW(row+2,col); - RAW(row,col) = median4(val); - } - } -} - -void CLASS smal_v9_load_raw() -{ - unsigned seg[256][2], offset, nseg, holes, i; - - fseek (ifp, 67, SEEK_SET); - offset = get4(); - nseg = fgetc(ifp); - fseek (ifp, offset, SEEK_SET); - for (i=0; i < nseg*2; i++) - seg[0][i] = get4() + data_offset*(i & 1); - fseek (ifp, 78, SEEK_SET); - holes = fgetc(ifp); - fseek (ifp, 88, SEEK_SET); - seg[nseg][0] = raw_height * raw_width; - seg[nseg][1] = get4() + data_offset; - for (i=0; i < nseg; i++) - smal_decode_segment (seg+i, holes); - if (holes) fill_holes (holes); -} - -void CLASS redcine_load_raw() -{ -#ifndef NO_JASPER - int c, row, col; - jas_stream_t *in; - jas_image_t *jimg; - jas_matrix_t *jmat; - jas_seqent_t *data; - ushort *img, *pix; - - jas_init(); - in = jas_stream_fopen (ifname, "rb"); - jas_stream_seek (in, data_offset+20, SEEK_SET); - jimg = jas_image_decode (in, -1, 0); - if (!jimg) longjmp (failure, 3); - jmat = jas_matrix_create (height/2, width/2); - merror (jmat, "redcine_load_raw()"); - img = (ushort *) calloc ((height+2)*(width+2), 2); - merror (img, "redcine_load_raw()"); - FORC4 { - jas_image_readcmpt (jimg, c, 0, 0, width/2, height/2, jmat); - data = jas_matrix_getref (jmat, 0, 0); - for (row = c >> 1; row < height; row+=2) - for (col = c & 1; col < width; col+=2) - img[(row+1)*(width+2)+col+1] = data[(row/2)*(width/2)+col/2]; - } - for (col=1; col <= width; col++) { - img[col] = img[2*(width+2)+col]; - img[(height+1)*(width+2)+col] = img[(height-1)*(width+2)+col]; - } - for (row=0; row < height+2; row++) { - img[row*(width+2)] = img[row*(width+2)+2]; - img[(row+1)*(width+2)-1] = img[(row+1)*(width+2)-3]; - } - for (row=1; row <= height; row++) { - pix = img + row*(width+2) + (col = 1 + (FC(row,1) & 1)); - for ( ; col <= width; col+=2, pix+=2) { - c = (((pix[0] - 0x800) << 3) + - pix[-(width+2)] + pix[width+2] + pix[-1] + pix[1]) >> 2; - pix[0] = LIM(c,0,4095); - } - } - for (row=0; row < height; row++) - for (col=0; col < width; col++) - RAW(row,col) = curve[img[(row+1)*(width+2)+col+1]]; - free (img); - jas_matrix_destroy (jmat); - jas_image_destroy (jimg); - jas_stream_close (in); -#endif -} - -/* RESTRICTED code starts here */ - -void CLASS foveon_decoder (unsigned size, unsigned code) -{ - static unsigned huff[1024]; - struct decode *cur; - int i, len; - - if (!code) { - for (i=0; i < size; i++) - huff[i] = get4(); - memset (first_decode, 0, sizeof first_decode); - free_decode = first_decode; - } - cur = free_decode++; - if (free_decode > first_decode+2048) { - fprintf (stderr,_("%s: decoder table overflow\n"), ifname); - longjmp (failure, 2); - } - if (code) - for (i=0; i < size; i++) - if (huff[i] == code) { - cur->leaf = i; - return; - } - if ((len = code >> 27) > 26) return; - code = (len+1) << 27 | (code & 0x3ffffff) << 1; - - cur->branch[0] = free_decode; - foveon_decoder (size, code); - cur->branch[1] = free_decode; - foveon_decoder (size, code+1); -} - -void CLASS foveon_thumb() -{ - unsigned bwide, row, col, bitbuf=0, bit=1, c, i; - char *buf; - struct decode *dindex; - short pred[3]; - - bwide = get4(); - fprintf (ofp, "P6\n%d %d\n255\n", thumb_width, thumb_height); - if (bwide > 0) { - if (bwide < thumb_width*3) return; - buf = (char *) malloc (bwide); - merror (buf, "foveon_thumb()"); - for (row=0; row < thumb_height; row++) { - fread (buf, 1, bwide, ifp); - fwrite (buf, 3, thumb_width, ofp); - } - free (buf); - return; - } - foveon_decoder (256, 0); - - for (row=0; row < thumb_height; row++) { - memset (pred, 0, sizeof pred); - if (!bit) get4(); - for (bit=col=0; col < thumb_width; col++) - FORC3 { - for (dindex=first_decode; dindex->branch[0]; ) { - if ((bit = (bit-1) & 31) == 31) - for (i=0; i < 4; i++) - bitbuf = (bitbuf << 8) + fgetc(ifp); - dindex = dindex->branch[bitbuf >> bit & 1]; - } - pred[c] += dindex->leaf; - fputc (pred[c], ofp); - } - } -} - -void CLASS foveon_sd_load_raw() -{ - struct decode *dindex; - short diff[1024]; - unsigned bitbuf=0; - int pred[3], row, col, bit=-1, c, i; - - read_shorts ((ushort *) diff, 1024); - if (!load_flags) foveon_decoder (1024, 0); - - for (row=0; row < height; row++) { - memset (pred, 0, sizeof pred); - if (!bit && !load_flags && atoi(model+2) < 14) get4(); - for (col=bit=0; col < width; col++) { - if (load_flags) { - bitbuf = get4(); - FORC3 pred[2-c] += diff[bitbuf >> c*10 & 0x3ff]; - } - else FORC3 { - for (dindex=first_decode; dindex->branch[0]; ) { - if ((bit = (bit-1) & 31) == 31) - for (i=0; i < 4; i++) - bitbuf = (bitbuf << 8) + fgetc(ifp); - dindex = dindex->branch[bitbuf >> bit & 1]; - } - pred[c] += diff[dindex->leaf]; - if (pred[c] >> 16 && ~pred[c] >> 16) derror(); - } - FORC3 image[row*width+col][c] = pred[c]; - } - } -} - -void CLASS foveon_huff (ushort *huff) -{ - int i, j, clen, code; - - huff[0] = 8; - for (i=0; i < 13; i++) { - clen = getc(ifp); - code = getc(ifp); - for (j=0; j < 256 >> clen; ) - huff[code+ ++j] = clen << 8 | i; - } - get2(); -} - -void CLASS foveon_dp_load_raw() -{ - unsigned c, roff[4], row, col, diff; - ushort huff[258], vpred, hpred; - - fseek (ifp, 8, SEEK_CUR); - foveon_huff (huff); - roff[0] = 48; - FORC3 roff[c+1] = -(-(roff[c] + get4()) & -16); - FORC3 { - fseek (ifp, data_offset+roff[c], SEEK_SET); - getbits(-1); - vpred = 1024; - for (row=0; row < height; row++) { - for (col=0; col < width; col++) { - diff = ljpeg_diff(huff); - if (col) hpred += diff; - else hpred = vpred += diff; - image[row*width+col][c] = hpred; - } - } - } -} - -void CLASS foveon_load_camf() -{ - unsigned type, wide, high, i, j, row, col, diff; - ushort huff[258], vpred[2][2] = {{512,512},{512,512}}, hpred[2]; - - fseek (ifp, meta_offset, SEEK_SET); - type = get4(); get4(); get4(); - wide = get4(); - high = get4(); - if (type == 2) { - fread (meta_data, 1, meta_length, ifp); - for (i=0; i < meta_length; i++) { - high = (high * 1597 + 51749) % 244944; - wide = high * (INT64) 301593171 >> 24; - meta_data[i] ^= ((((high << 8) - wide) >> 1) + wide) >> 17; - } - } else if (type == 4) { - free (meta_data); - meta_data = (char *) malloc (meta_length = wide*high*3/2); - merror (meta_data, "foveon_load_camf()"); - foveon_huff (huff); - get4(); - getbits(-1); - for (j=row=0; row < high; row++) { - for (col=0; col < wide; col++) { - diff = ljpeg_diff(huff); - if (col < 2) hpred[col] = vpred[row & 1][col] += diff; - else hpred[col & 1] += diff; - if (col & 1) { - meta_data[j++] = hpred[0] >> 4; - meta_data[j++] = hpred[0] << 4 | hpred[1] >> 8; - meta_data[j++] = hpred[1]; - } - } - } - } else - fprintf (stderr,_("%s has unknown CAMF type %d.\n"), ifname, type); -} - -const char * CLASS foveon_camf_param (const char *block, const char *param) -{ - unsigned idx, num; - char *pos, *cp, *dp; - - for (idx=0; idx < meta_length; idx += sget4(pos+8)) { - pos = meta_data + idx; - if (strncmp (pos, "CMb", 3)) break; - if (pos[3] != 'P') continue; - if (strcmp (block, pos+sget4(pos+12))) continue; - cp = pos + sget4(pos+16); - num = sget4(cp); - dp = pos + sget4(cp+4); - while (num--) { - cp += 8; - if (!strcmp (param, dp+sget4(cp))) - return dp+sget4(cp+4); - } - } - return 0; -} - -void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) -{ - unsigned i, idx, type, ndim, size, *mat; - char *pos, *cp, *dp; - double dsize; - - for (idx=0; idx < meta_length; idx += sget4(pos+8)) { - pos = meta_data + idx; - if (strncmp (pos, "CMb", 3)) break; - if (pos[3] != 'M') continue; - if (strcmp (name, pos+sget4(pos+12))) continue; - dim[0] = dim[1] = dim[2] = 1; - cp = pos + sget4(pos+16); - type = sget4(cp); - if ((ndim = sget4(cp+4)) > 3) break; - dp = pos + sget4(cp+8); - for (i=ndim; i--; ) { - cp += 12; - dim[i] = sget4(cp); - } - if ((dsize = (double) dim[0]*dim[1]*dim[2]) > meta_length/4) break; - mat = (unsigned *) malloc ((size = dsize) * 4); - merror (mat, "foveon_camf_matrix()"); - for (i=0; i < size; i++) - if (type && type != 6) - mat[i] = sget4(dp + i*4); - else - mat[i] = sget4(dp + i*2) & 0xffff; - return mat; - } - fprintf (stderr,_("%s: \"%s\" matrix not found!\n"), ifname, name); - return 0; -} - -int CLASS foveon_fixed (void *ptr, int size, const char *name) -{ - void *dp; - unsigned dim[3]; - - if (!name) return 0; - dp = foveon_camf_matrix (dim, name); - if (!dp) return 0; - memcpy (ptr, dp, size*4); - free (dp); - return 1; -} - -float CLASS foveon_avg (short *pix, int range[2], float cfilt) -{ - int i; - float val, min=FLT_MAX, max=-FLT_MAX, sum=0; - - for (i=range[0]; i <= range[1]; i++) { - sum += val = pix[i*4] + (pix[i*4]-pix[(i-1)*4]) * cfilt; - if (min > val) min = val; - if (max < val) max = val; - } - if (range[1] - range[0] == 1) return sum/2; - return (sum - min - max) / (range[1] - range[0] - 1); -} - -short * CLASS foveon_make_curve (double max, double mul, double filt) -{ - short *curve; - unsigned i, size; - double x; - - if (!filt) filt = 0.8; - size = 4*M_PI*max / filt; - if (size == UINT_MAX) size--; - curve = (short *) calloc (size+1, sizeof *curve); - merror (curve, "foveon_make_curve()"); - curve[0] = size; - for (i=0; i < size; i++) { - x = i*filt/max/4; - curve[i+1] = (cos(x)+1)/2 * tanh(i*filt/mul) * mul + 0.5; - } - return curve; -} - -void CLASS foveon_make_curves - (short **curvep, float dq[3], float div[3], float filt) -{ - double mul[3], max=0; - int c; - - FORC3 mul[c] = dq[c]/div[c]; - FORC3 if (max < mul[c]) max = mul[c]; - FORC3 curvep[c] = foveon_make_curve (max, mul[c], filt); -} - -int CLASS foveon_apply_curve (short *curve, int i) -{ - if (abs(i) >= curve[0]) return 0; - return i < 0 ? -curve[1-i] : curve[1+i]; -} - -#define image ((short (*)[4]) image) - -void CLASS foveon_interpolate() -{ - static const short hood[] = { -1,-1, -1,0, -1,1, 0,-1, 0,1, 1,-1, 1,0, 1,1 }; - short *pix, prev[3], *curve[8], (*shrink)[3]; - float cfilt=0, ddft[3][3][2], ppm[3][3][3]; - float cam_xyz[3][3], correct[3][3], last[3][3], trans[3][3]; - float chroma_dq[3], color_dq[3], diag[3][3], div[3]; - float (*black)[3], (*sgain)[3], (*sgrow)[3]; - float fsum[3], val, frow, num; - int row, col, c, i, j, diff, sgx, irow, sum, min, max, limit; - int dscr[2][2], dstb[4], (*smrow[7])[3], total[4], ipix[3]; - int work[3][3], smlast, smred, smred_p=0, dev[3]; - int satlev[3], keep[4], active[4]; - unsigned dim[3], *badpix; - double dsum=0, trsum[3]; - char str[128]; - const char* cp; - - if (verbose) - fprintf (stderr,_("Foveon interpolation...\n")); - - foveon_load_camf(); - foveon_fixed (dscr, 4, "DarkShieldColRange"); - foveon_fixed (ppm[0][0], 27, "PostPolyMatrix"); - foveon_fixed (satlev, 3, "SaturationLevel"); - foveon_fixed (keep, 4, "KeepImageArea"); - foveon_fixed (active, 4, "ActiveImageArea"); - foveon_fixed (chroma_dq, 3, "ChromaDQ"); - foveon_fixed (color_dq, 3, - foveon_camf_param ("IncludeBlocks", "ColorDQ") ? - "ColorDQ" : "ColorDQCamRGB"); - if (foveon_camf_param ("IncludeBlocks", "ColumnFilter")) - foveon_fixed (&cfilt, 1, "ColumnFilter"); - - memset (ddft, 0, sizeof ddft); - if (!foveon_camf_param ("IncludeBlocks", "DarkDrift") - || !foveon_fixed (ddft[1][0], 12, "DarkDrift")) - for (i=0; i < 2; i++) { - foveon_fixed (dstb, 4, i ? "DarkShieldBottom":"DarkShieldTop"); - for (row = dstb[1]; row <= dstb[3]; row++) - for (col = dstb[0]; col <= dstb[2]; col++) - FORC3 ddft[i+1][c][1] += (short) image[row*width+col][c]; - FORC3 ddft[i+1][c][1] /= (dstb[3]-dstb[1]+1) * (dstb[2]-dstb[0]+1); - } - - if (!(cp = foveon_camf_param ("WhiteBalanceIlluminants", model2))) - { fprintf (stderr,_("%s: Invalid white balance \"%s\"\n"), ifname, model2); - return; } - foveon_fixed (cam_xyz, 9, cp); - foveon_fixed (correct, 9, - foveon_camf_param ("WhiteBalanceCorrections", model2)); - memset (last, 0, sizeof last); - for (i=0; i < 3; i++) - for (j=0; j < 3; j++) - FORC3 last[i][j] += correct[i][c] * cam_xyz[c][j]; - - #define LAST(x,y) last[(i+x)%3][(c+y)%3] - for (i=0; i < 3; i++) - FORC3 diag[c][i] = LAST(1,1)*LAST(2,2) - LAST(1,2)*LAST(2,1); - #undef LAST - FORC3 div[c] = diag[c][0]*0.3127 + diag[c][1]*0.329 + diag[c][2]*0.3583; - sprintf (str, "%sRGBNeutral", model2); - if (foveon_camf_param ("IncludeBlocks", str)) - foveon_fixed (div, 3, str); - num = 0; - FORC3 if (num < div[c]) num = div[c]; - FORC3 div[c] /= num; - - memset (trans, 0, sizeof trans); - for (i=0; i < 3; i++) - for (j=0; j < 3; j++) - FORC3 trans[i][j] += rgb_cam[i][c] * last[c][j] * div[j]; - FORC3 trsum[c] = trans[c][0] + trans[c][1] + trans[c][2]; - dsum = (6*trsum[0] + 11*trsum[1] + 3*trsum[2]) / 20; - for (i=0; i < 3; i++) - FORC3 last[i][c] = trans[i][c] * dsum / trsum[i]; - memset (trans, 0, sizeof trans); - for (i=0; i < 3; i++) - for (j=0; j < 3; j++) - FORC3 trans[i][j] += (i==c ? 32 : -1) * last[c][j] / 30; - - foveon_make_curves (curve, color_dq, div, cfilt); - FORC3 chroma_dq[c] /= 3; - foveon_make_curves (curve+3, chroma_dq, div, cfilt); - FORC3 dsum += chroma_dq[c] / div[c]; - curve[6] = foveon_make_curve (dsum, dsum, cfilt); - curve[7] = foveon_make_curve (dsum*2, dsum*2, cfilt); - - sgain = (float (*)[3]) foveon_camf_matrix (dim, "SpatialGain"); - if (!sgain) return; - sgrow = (float (*)[3]) calloc (dim[1], sizeof *sgrow); - sgx = (width + dim[1]-2) / (dim[1]-1); - - black = (float (*)[3]) calloc (height, sizeof *black); - for (row=0; row < height; row++) { - for (i=0; i < 6; i++) - ddft[0][0][i] = ddft[1][0][i] + - row / (height-1.0) * (ddft[2][0][i] - ddft[1][0][i]); - FORC3 black[row][c] = - ( foveon_avg (image[row*width]+c, dscr[0], cfilt) + - foveon_avg (image[row*width]+c, dscr[1], cfilt) * 3 - - ddft[0][c][0] ) / 4 - ddft[0][c][1]; - } - memcpy (black, black+8, sizeof *black*8); - memcpy (black+height-11, black+height-22, 11*sizeof *black); - memcpy (last, black, sizeof last); - - for (row=1; row < height-1; row++) { - FORC3 if (last[1][c] > last[0][c]) { - if (last[1][c] > last[2][c]) - black[row][c] = (last[0][c] > last[2][c]) ? last[0][c]:last[2][c]; - } else - if (last[1][c] < last[2][c]) - black[row][c] = (last[0][c] < last[2][c]) ? last[0][c]:last[2][c]; - memmove (last, last+1, 2*sizeof last[0]); - memcpy (last[2], black[row+1], sizeof last[2]); - } - FORC3 black[row][c] = (last[0][c] + last[1][c])/2; - FORC3 black[0][c] = (black[1][c] + black[3][c])/2; - - val = 1 - exp(-1/24.0); - memcpy (fsum, black, sizeof fsum); - for (row=1; row < height; row++) - FORC3 fsum[c] += black[row][c] = - (black[row][c] - black[row-1][c])*val + black[row-1][c]; - memcpy (last[0], black[height-1], sizeof last[0]); - FORC3 fsum[c] /= height; - for (row = height; row--; ) - FORC3 last[0][c] = black[row][c] = - (black[row][c] - fsum[c] - last[0][c])*val + last[0][c]; - - memset (total, 0, sizeof total); - for (row=2; row < height; row+=4) - for (col=2; col < width; col+=4) { - FORC3 total[c] += (short) image[row*width+col][c]; - total[3]++; - } - for (row=0; row < height; row++) - FORC3 black[row][c] += fsum[c]/2 + total[c]/(total[3]*100.0); - - for (row=0; row < height; row++) { - for (i=0; i < 6; i++) - ddft[0][0][i] = ddft[1][0][i] + - row / (height-1.0) * (ddft[2][0][i] - ddft[1][0][i]); - pix = image[row*width]; - memcpy (prev, pix, sizeof prev); - frow = row / (height-1.0) * (dim[2]-1); - if ((irow = frow) == dim[2]-1) irow--; - frow -= irow; - for (i=0; i < dim[1]; i++) - FORC3 sgrow[i][c] = sgain[ irow *dim[1]+i][c] * (1-frow) + - sgain[(irow+1)*dim[1]+i][c] * frow; - for (col=0; col < width; col++) { - FORC3 { - diff = pix[c] - prev[c]; - prev[c] = pix[c]; - ipix[c] = pix[c] + floor ((diff + (diff*diff >> 14)) * cfilt - - ddft[0][c][1] - ddft[0][c][0] * ((float) col/width - 0.5) - - black[row][c] ); - } - FORC3 { - work[0][c] = ipix[c] * ipix[c] >> 14; - work[2][c] = ipix[c] * work[0][c] >> 14; - work[1][2-c] = ipix[(c+1) % 3] * ipix[(c+2) % 3] >> 14; - } - FORC3 { - for (val=i=0; i < 3; i++) - for ( j=0; j < 3; j++) - val += ppm[c][i][j] * work[i][j]; - ipix[c] = floor ((ipix[c] + floor(val)) * - ( sgrow[col/sgx ][c] * (sgx - col%sgx) + - sgrow[col/sgx+1][c] * (col%sgx) ) / sgx / div[c]); - if (ipix[c] > 32000) ipix[c] = 32000; - pix[c] = ipix[c]; - } - pix += 4; - } - } - free (black); - free (sgrow); - free (sgain); - - if ((badpix = (unsigned int *) foveon_camf_matrix (dim, "BadPixels"))) { - for (i=0; i < dim[0]; i++) { - col = (badpix[i] >> 8 & 0xfff) - keep[0]; - row = (badpix[i] >> 20 ) - keep[1]; - if ((unsigned)(row-1) > height-3 || (unsigned)(col-1) > width-3) - continue; - memset (fsum, 0, sizeof fsum); - for (sum=j=0; j < 8; j++) - if (badpix[i] & (1 << j)) { - FORC3 fsum[c] += (short) - image[(row+hood[j*2])*width+col+hood[j*2+1]][c]; - sum++; - } - if (sum) FORC3 image[row*width+col][c] = fsum[c]/sum; - } - free (badpix); - } - - /* Array for 5x5 Gaussian averaging of red values */ - smrow[6] = (int (*)[3]) calloc (width*5, sizeof **smrow); - merror (smrow[6], "foveon_interpolate()"); - for (i=0; i < 5; i++) - smrow[i] = smrow[6] + i*width; - - /* Sharpen the reds against these Gaussian averages */ - for (smlast=-1, row=2; row < height-2; row++) { - while (smlast < row+2) { - for (i=0; i < 6; i++) - smrow[(i+5) % 6] = smrow[i]; - pix = image[++smlast*width+2]; - for (col=2; col < width-2; col++) { - smrow[4][col][0] = - (pix[0]*6 + (pix[-4]+pix[4])*4 + pix[-8]+pix[8] + 8) >> 4; - pix += 4; - } - } - pix = image[row*width+2]; - for (col=2; col < width-2; col++) { - smred = ( 6 * smrow[2][col][0] - + 4 * (smrow[1][col][0] + smrow[3][col][0]) - + smrow[0][col][0] + smrow[4][col][0] + 8 ) >> 4; - if (col == 2) - smred_p = smred; - i = pix[0] + ((pix[0] - ((smred*7 + smred_p) >> 3)) >> 3); - if (i > 32000) i = 32000; - pix[0] = i; - smred_p = smred; - pix += 4; - } - } - - /* Adjust the brighter pixels for better linearity */ - min = 0xffff; - FORC3 { - i = satlev[c] / div[c]; - if (min > i) min = i; - } - limit = min * 9 >> 4; - for (pix=image[0]; pix < image[height*width]; pix+=4) { - if (pix[0] <= limit || pix[1] <= limit || pix[2] <= limit) - continue; - min = max = pix[0]; - for (c=1; c < 3; c++) { - if (min > pix[c]) min = pix[c]; - if (max < pix[c]) max = pix[c]; - } - if (min >= limit*2) { - pix[0] = pix[1] = pix[2] = max; - } else { - i = 0x4000 - ((min - limit) << 14) / limit; - i = 0x4000 - (i*i >> 14); - i = i*i >> 14; - FORC3 pix[c] += (max - pix[c]) * i >> 14; - } - } -/* - Because photons that miss one detector often hit another, - the sum R+G+B is much less noisy than the individual colors. - So smooth the hues without smoothing the total. - */ - for (smlast=-1, row=2; row < height-2; row++) { - while (smlast < row+2) { - for (i=0; i < 6; i++) - smrow[(i+5) % 6] = smrow[i]; - pix = image[++smlast*width+2]; - for (col=2; col < width-2; col++) { - FORC3 smrow[4][col][c] = (pix[c-4]+2*pix[c]+pix[c+4]+2) >> 2; - pix += 4; - } - } - pix = image[row*width+2]; - for (col=2; col < width-2; col++) { - FORC3 dev[c] = -foveon_apply_curve (curve[7], pix[c] - - ((smrow[1][col][c] + 2*smrow[2][col][c] + smrow[3][col][c]) >> 2)); - sum = (dev[0] + dev[1] + dev[2]) >> 3; - FORC3 pix[c] += dev[c] - sum; - pix += 4; - } - } - for (smlast=-1, row=2; row < height-2; row++) { - while (smlast < row+2) { - for (i=0; i < 6; i++) - smrow[(i+5) % 6] = smrow[i]; - pix = image[++smlast*width+2]; - for (col=2; col < width-2; col++) { - FORC3 smrow[4][col][c] = - (pix[c-8]+pix[c-4]+pix[c]+pix[c+4]+pix[c+8]+2) >> 2; - pix += 4; - } - } - pix = image[row*width+2]; - for (col=2; col < width-2; col++) { - for (total[3]=375, sum=60, c=0; c < 3; c++) { - for (total[c]=i=0; i < 5; i++) - total[c] += smrow[i][col][c]; - total[3] += total[c]; - sum += pix[c]; - } - if (sum < 0) sum = 0; - j = total[3] > 375 ? (sum << 16) / total[3] : sum * 174; - FORC3 pix[c] += foveon_apply_curve (curve[6], - ((j*total[c] + 0x8000) >> 16) - pix[c]); - pix += 4; - } - } - - /* Transform the image to a different colorspace */ - for (pix=image[0]; pix < image[height*width]; pix+=4) { - FORC3 pix[c] -= foveon_apply_curve (curve[c], pix[c]); - sum = (pix[0]+pix[1]+pix[1]+pix[2]) >> 2; - FORC3 pix[c] -= foveon_apply_curve (curve[c], pix[c]-sum); - FORC3 { - for (dsum=i=0; i < 3; i++) - dsum += trans[c][i] * pix[i]; - if (dsum < 0) dsum = 0; - if (dsum > 24000) dsum = 24000; - ipix[c] = dsum + 0.5; - } - FORC3 pix[c] = ipix[c]; - } - - /* Smooth the image bottom-to-top and save at 1/4 scale */ - shrink = (short (*)[3]) calloc ((width/4) * (height/4), sizeof *shrink); - merror (shrink, "foveon_interpolate()"); - for (row = height/4; row--; ) - for (col=0; col < width/4; col++) { - ipix[0] = ipix[1] = ipix[2] = 0; - for (i=0; i < 4; i++) - for (j=0; j < 4; j++) - FORC3 ipix[c] += image[(row*4+i)*width+col*4+j][c]; - FORC3 - if (row+2 > height/4) - shrink[row*(width/4)+col][c] = ipix[c] >> 4; - else - shrink[row*(width/4)+col][c] = - (shrink[(row+1)*(width/4)+col][c]*1840 + ipix[c]*141 + 2048) >> 12; - } - /* From the 1/4-scale image, smooth right-to-left */ - for (row=0; row < (height & ~3); row++) { - ipix[0] = ipix[1] = ipix[2] = 0; - if ((row & 3) == 0) - for (col = width & ~3 ; col--; ) - FORC3 smrow[0][col][c] = ipix[c] = - (shrink[(row/4)*(width/4)+col/4][c]*1485 + ipix[c]*6707 + 4096) >> 13; - - /* Then smooth left-to-right */ - ipix[0] = ipix[1] = ipix[2] = 0; - for (col=0; col < (width & ~3); col++) - FORC3 smrow[1][col][c] = ipix[c] = - (smrow[0][col][c]*1485 + ipix[c]*6707 + 4096) >> 13; - - /* Smooth top-to-bottom */ - if (row == 0) - memcpy (smrow[2], smrow[1], sizeof **smrow * width); - else - for (col=0; col < (width & ~3); col++) - FORC3 smrow[2][col][c] = - (smrow[2][col][c]*6707 + smrow[1][col][c]*1485 + 4096) >> 13; - - /* Adjust the chroma toward the smooth values */ - for (col=0; col < (width & ~3); col++) { - for (i=j=30, c=0; c < 3; c++) { - i += smrow[2][col][c]; - j += image[row*width+col][c]; - } - j = (j << 16) / i; - for (sum=c=0; c < 3; c++) { - ipix[c] = foveon_apply_curve (curve[c+3], - ((smrow[2][col][c] * j + 0x8000) >> 16) - image[row*width+col][c]); - sum += ipix[c]; - } - sum >>= 3; - FORC3 { - i = image[row*width+col][c] + ipix[c] - sum; - if (i < 0) i = 0; - image[row*width+col][c] = i; - } - } - } - free (shrink); - free (smrow[6]); - for (i=0; i < 8; i++) - free (curve[i]); - - /* Trim off the black border */ - active[1] -= keep[1]; - active[3] -= 2; - i = active[2] - active[0]; - for (row=0; row < active[3]-active[1]; row++) - memcpy (image[row*i], image[(row+active[1])*width+active[0]], - i * sizeof *image); - width = i; - height = row; -} -#undef image - -/* RESTRICTED code ends here */ - -void CLASS crop_masked_pixels() -{ - int row, col; - unsigned r, c, m, mblack[8], zero, val; - - if (load_raw == &CLASS phase_one_load_raw || - load_raw == &CLASS phase_one_load_raw_c) - phase_one_correct(); - if (fuji_width) { - for (row=0; row < raw_height-top_margin*2; row++) { - for (col=0; col < fuji_width << !fuji_layout; col++) { - if (fuji_layout) { - r = fuji_width - 1 - col + (row >> 1); - c = col + ((row+1) >> 1); - } else { - r = fuji_width - 1 + row - (col >> 1); - c = row + ((col+1) >> 1); - } - if (r < height && c < width) - BAYER(r,c) = RAW(row+top_margin,col+left_margin); - } - } - } else { - for (row=0; row < height; row++) - for (col=0; col < width; col++) - BAYER2(row,col) = RAW(row+top_margin,col+left_margin); - } - if (mask[0][3]) goto mask_set; - if (load_raw == &CLASS canon_load_raw || - load_raw == &CLASS lossless_jpeg_load_raw) { - mask[0][1] = mask[1][1] = 2; - mask[0][3] = -2; - goto sides; - } - if (load_raw == &CLASS sony_load_raw) { - mask[0][3] = 9; - goto sides; - } - if (load_raw == &CLASS canon_600_load_raw || - (load_raw == &CLASS eight_bit_load_raw && strncmp(model,"DC2",3)) || - load_raw == &CLASS kodak_262_load_raw || - (load_raw == &CLASS packed_load_raw && (load_flags & 32))) { -sides: - mask[0][0] = mask[1][0] = top_margin; - mask[0][2] = mask[1][2] = top_margin+height; - mask[0][3] += left_margin; - mask[1][1] += left_margin+width; - mask[1][3] += raw_width; - } - if (load_raw == &CLASS nokia_load_raw) { - mask[0][2] = top_margin; - mask[0][3] = width; - } -mask_set: - memset (mblack, 0, sizeof mblack); - for (zero=m=0; m < 8; m++) - for (row=mask[m][0]; row < mask[m][2]; row++) - for (col=mask[m][1]; col < mask[m][3]; col++) { - c = FC(row-top_margin,col-left_margin); - mblack[c] += val = RAW(row,col); - mblack[4+c]++; - zero += !val; - } - if (load_raw == &CLASS canon_600_load_raw && width < raw_width) { - black = (mblack[0]+mblack[1]+mblack[2]+mblack[3]) / - (mblack[4]+mblack[5]+mblack[6]+mblack[7]) - 4; - canon_600_correct(); - } else if (zero < mblack[4] && mblack[5] && mblack[6] && mblack[7]) - FORC4 cblack[c] = mblack[c] / mblack[4+c]; -} - -void CLASS remove_zeroes() -{ - unsigned row, col, tot, n, r, c; - - for (row=0; row < height; row++) - for (col=0; col < width; col++) - if (BAYER(row,col) == 0) { - tot = n = 0; - for (r = row-2; r <= row+2; r++) - for (c = col-2; c <= col+2; c++) - if (r < height && c < width && - FC(r,c) == FC(row,col) && BAYER(r,c)) - tot += (n++,BAYER(r,c)); - if (n) BAYER(row,col) = tot/n; - } -} - -/* - Seach from the current directory up to the root looking for - a ".badpixels" file, and fix those pixels now. - */ -void CLASS bad_pixels (const char *cfname) -{ - FILE *fp=0; - char *fname, *cp, line[128]; - int len, time, row, col, r, c, rad, tot, n, fixed=0; - - if (!filters) return; - if (cfname) - fp = fopen (cfname, "r"); - else { - for (len=32 ; ; len *= 2) { - fname = (char *) malloc (len); - if (!fname) return; - if (getcwd (fname, len-16)) break; - free (fname); - if (errno != ERANGE) return; - } -#if defined(WIN32) || defined(DJGPP) - if (fname[1] == ':') - memmove (fname, fname+2, len-2); - for (cp=fname; *cp; cp++) - if (*cp == '\\') *cp = '/'; -#endif - cp = fname + strlen(fname); - if (cp[-1] == '/') cp--; - while (*fname == '/') { - strcpy (cp, "/.badpixels"); - if ((fp = fopen (fname, "r"))) break; - if (cp == fname) break; - while (*--cp != '/'); - } - free (fname); - } - if (!fp) return; - while (fgets (line, 128, fp)) { - cp = strchr (line, '#'); - if (cp) *cp = 0; - if (sscanf (line, "%d %d %d", &col, &row, &time) != 3) continue; - if ((unsigned) col >= width || (unsigned) row >= height) continue; - if (time > timestamp) continue; - for (tot=n=0, rad=1; rad < 3 && n==0; rad++) - for (r = row-rad; r <= row+rad; r++) - for (c = col-rad; c <= col+rad; c++) - if ((unsigned) r < height && (unsigned) c < width && - (r != row || c != col) && fcol(r,c) == fcol(row,col)) { - tot += BAYER2(r,c); - n++; - } - BAYER2(row,col) = tot/n; - if (verbose) { - if (!fixed++) - fprintf (stderr,_("Fixed dead pixels at:")); - fprintf (stderr, " %d,%d", col, row); - } - } - if (fixed) fputc ('\n', stderr); - fclose (fp); -} - -void CLASS subtract (const char *fname) -{ - FILE *fp; - int dim[3]={0,0,0}, comment=0, number=0, error=0, nd=0, c, row, col; - ushort *pixel; - - if (!(fp = fopen (fname, "rb"))) { - perror (fname); return; - } - if (fgetc(fp) != 'P' || fgetc(fp) != '5') error = 1; - while (!error && nd < 3 && (c = fgetc(fp)) != EOF) { - if (c == '#') comment = 1; - if (c == '\n') comment = 0; - if (comment) continue; - if (isdigit(c)) number = 1; - if (number) { - if (isdigit(c)) dim[nd] = dim[nd]*10 + c -'0'; - else if (isspace(c)) { - number = 0; nd++; - } else error = 1; - } - } - if (error || nd < 3) { - fprintf (stderr,_("%s is not a valid PGM file!\n"), fname); - fclose (fp); return; - } else if (dim[0] != width || dim[1] != height || dim[2] != 65535) { - fprintf (stderr,_("%s has the wrong dimensions!\n"), fname); - fclose (fp); return; - } - pixel = (ushort *) calloc (width, sizeof *pixel); - merror (pixel, "subtract()"); - for (row=0; row < height; row++) { - fread (pixel, 2, width, fp); - for (col=0; col < width; col++) - BAYER(row,col) = MAX (BAYER(row,col) - ntohs(pixel[col]), 0); - } - free (pixel); - fclose (fp); - memset (cblack, 0, sizeof cblack); - black = 0; -} - -void CLASS gamma_curve (double pwr, double ts, int mode, int imax) -{ - int i; - double g[6], bnd[2]={0,0}, r; - - g[0] = pwr; - g[1] = ts; - g[2] = g[3] = g[4] = 0; - bnd[g[1] >= 1] = 1; - if (g[1] && (g[1]-1)*(g[0]-1) <= 0) { - for (i=0; i < 48; i++) { - g[2] = (bnd[0] + bnd[1])/2; - if (g[0]) bnd[(pow(g[2]/g[1],-g[0]) - 1)/g[0] - 1/g[2] > -1] = g[2]; - else bnd[g[2]/exp(1-1/g[2]) < g[1]] = g[2]; - } - g[3] = g[2] / g[1]; - if (g[0]) g[4] = g[2] * (1/g[0] - 1); - } - if (g[0]) g[5] = 1 / (g[1]*SQR(g[3])/2 - g[4]*(1 - g[3]) + - (1 - pow(g[3],1+g[0]))*(1 + g[4])/(1 + g[0])) - 1; - else g[5] = 1 / (g[1]*SQR(g[3])/2 + 1 - - g[2] - g[3] - g[2]*g[3]*(log(g[3]) - 1)) - 1; - if (!mode--) { - memcpy (gamm, g, sizeof gamm); - return; - } - for (i=0; i < 0x10000; i++) { - curve[i] = 0xffff; - if ((r = (double) i / imax) < 1) - curve[i] = 0x10000 * ( mode - ? (r < g[3] ? r*g[1] : (g[0] ? pow( r,g[0])*(1+g[4])-g[4] : log(r)*g[2]+1)) - : (r < g[2] ? r/g[1] : (g[0] ? pow((r+g[4])/(1+g[4]),1/g[0]) : exp((r-1)/g[2])))); - } -} - -void CLASS pseudoinverse (double (*in)[3], double (*out)[3], int size) -{ - double work[3][6], num; - int i, j, k; - - for (i=0; i < 3; i++) { - for (j=0; j < 6; j++) - work[i][j] = j == i+3; - for (j=0; j < 3; j++) - for (k=0; k < size; k++) - work[i][j] += in[k][i] * in[k][j]; - } - for (i=0; i < 3; i++) { - num = work[i][i]; - for (j=0; j < 6; j++) - work[i][j] /= num; - for (k=0; k < 3; k++) { - if (k==i) continue; - num = work[k][i]; - for (j=0; j < 6; j++) - work[k][j] -= work[i][j] * num; - } - } - for (i=0; i < size; i++) - for (j=0; j < 3; j++) - for (out[i][j]=k=0; k < 3; k++) - out[i][j] += work[j][k+3] * in[i][k]; -} - -void CLASS cam_xyz_coeff (double cam_xyz[4][3]) -{ - double cam_rgb[4][3], inverse[4][3], num; - int i, j, k; - - for (i=0; i < colors; i++) /* Multiply out XYZ colorspace */ - for (j=0; j < 3; j++) - for (cam_rgb[i][j] = k=0; k < 3; k++) - cam_rgb[i][j] += cam_xyz[i][k] * xyz_rgb[k][j]; - - for (i=0; i < colors; i++) { /* Normalize cam_rgb so that */ - for (num=j=0; j < 3; j++) /* cam_rgb * (1,1,1) is (1,1,1,1) */ - num += cam_rgb[i][j]; - for (j=0; j < 3; j++) - cam_rgb[i][j] /= num; - pre_mul[i] = 1 / num; - } - pseudoinverse (cam_rgb, inverse, colors); - for (raw_color = i=0; i < 3; i++) - for (j=0; j < colors; j++) - rgb_cam[i][j] = inverse[j][i]; -} - -#ifdef COLORCHECK -void CLASS colorcheck() -{ -#define NSQ 24 -// Coordinates of the GretagMacbeth ColorChecker squares -// width, height, 1st_column, 1st_row - int cut[NSQ][4]; // you must set these -// ColorChecker Chart under 6500-kelvin illumination - static const double gmb_xyY[NSQ][3] = { - { 0.400, 0.350, 10.1 }, // Dark Skin - { 0.377, 0.345, 35.8 }, // Light Skin - { 0.247, 0.251, 19.3 }, // Blue Sky - { 0.337, 0.422, 13.3 }, // Foliage - { 0.265, 0.240, 24.3 }, // Blue Flower - { 0.261, 0.343, 43.1 }, // Bluish Green - { 0.506, 0.407, 30.1 }, // Orange - { 0.211, 0.175, 12.0 }, // Purplish Blue - { 0.453, 0.306, 19.8 }, // Moderate Red - { 0.285, 0.202, 6.6 }, // Purple - { 0.380, 0.489, 44.3 }, // Yellow Green - { 0.473, 0.438, 43.1 }, // Orange Yellow - { 0.187, 0.129, 6.1 }, // Blue - { 0.305, 0.478, 23.4 }, // Green - { 0.539, 0.313, 12.0 }, // Red - { 0.448, 0.470, 59.1 }, // Yellow - { 0.364, 0.233, 19.8 }, // Magenta - { 0.196, 0.252, 19.8 }, // Cyan - { 0.310, 0.316, 90.0 }, // White - { 0.310, 0.316, 59.1 }, // Neutral 8 - { 0.310, 0.316, 36.2 }, // Neutral 6.5 - { 0.310, 0.316, 19.8 }, // Neutral 5 - { 0.310, 0.316, 9.0 }, // Neutral 3.5 - { 0.310, 0.316, 3.1 } }; // Black - double gmb_cam[NSQ][4], gmb_xyz[NSQ][3]; - double inverse[NSQ][3], cam_xyz[4][3], num; - int c, i, j, k, sq, row, col, count[4]; - - memset (gmb_cam, 0, sizeof gmb_cam); - for (sq=0; sq < NSQ; sq++) { - FORCC count[c] = 0; - for (row=cut[sq][3]; row < cut[sq][3]+cut[sq][1]; row++) - for (col=cut[sq][2]; col < cut[sq][2]+cut[sq][0]; col++) { - c = FC(row,col); - if (c >= colors) c -= 2; - gmb_cam[sq][c] += BAYER(row,col); - count[c]++; - } - FORCC gmb_cam[sq][c] = gmb_cam[sq][c]/count[c] - black; - gmb_xyz[sq][0] = gmb_xyY[sq][2] * gmb_xyY[sq][0] / gmb_xyY[sq][1]; - gmb_xyz[sq][1] = gmb_xyY[sq][2]; - gmb_xyz[sq][2] = gmb_xyY[sq][2] * - (1 - gmb_xyY[sq][0] - gmb_xyY[sq][1]) / gmb_xyY[sq][1]; - } - pseudoinverse (gmb_xyz, inverse, NSQ); - for (i=0; i < colors; i++) - for (j=0; j < 3; j++) - for (cam_xyz[i][j] = k=0; k < NSQ; k++) - cam_xyz[i][j] += gmb_cam[k][i] * inverse[k][j]; - cam_xyz_coeff (cam_xyz); - if (verbose) { - printf (" { \"%s %s\", %d,\n\t{", make, model, black); - num = 10000 / (cam_xyz[1][0] + cam_xyz[1][1] + cam_xyz[1][2]); - FORCC for (j=0; j < 3; j++) - printf ("%c%d", (c | j) ? ',':' ', (int) (cam_xyz[c][j] * num + 0.5)); - puts (" } },"); - } -#undef NSQ -} -#endif - -void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) -{ - int i; - for (i=0; i < sc; i++) - temp[i] = 2*base[st*i] + base[st*(sc-i)] + base[st*(i+sc)]; - for (; i+sc < size; i++) - temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(i+sc)]; - for (; i < size; i++) - temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(2*size-2-(i+sc))]; -} - -void CLASS wavelet_denoise() -{ - float *fimg=0, *temp, thold, mul[2], avg, diff; - int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; - ushort *window[4]; - static const float noise[] = - { 0.8002,0.2735,0.1202,0.0585,0.0291,0.0152,0.0080,0.0044 }; - - if (verbose) fprintf (stderr,_("Wavelet denoising...\n")); - - while (maximum << scale < 0x10000) scale++; - maximum <<= --scale; - black <<= scale; - FORC4 cblack[c] <<= scale; - if ((size = iheight*iwidth) < 0x15550000) - fimg = (float *) malloc ((size*3 + iheight + iwidth) * sizeof *fimg); - merror (fimg, "wavelet_denoise()"); - temp = fimg + size*3; - if ((nc = colors) == 3 && filters) nc++; - FORC(nc) { /* denoise R,G1,B,G3 individually */ - for (i=0; i < size; i++) - fimg[i] = 256 * sqrt(image[i][c] << scale); - for (hpass=lev=0; lev < 5; lev++) { - lpass = size*((lev & 1)+1); - for (row=0; row < iheight; row++) { - hat_transform (temp, fimg+hpass+row*iwidth, 1, iwidth, 1 << lev); - for (col=0; col < iwidth; col++) - fimg[lpass + row*iwidth + col] = temp[col] * 0.25; - } - for (col=0; col < iwidth; col++) { - hat_transform (temp, fimg+lpass+col, iwidth, iheight, 1 << lev); - for (row=0; row < iheight; row++) - fimg[lpass + row*iwidth + col] = temp[row] * 0.25; - } - thold = threshold * noise[lev]; - for (i=0; i < size; i++) { - fimg[hpass+i] -= fimg[lpass+i]; - if (fimg[hpass+i] < -thold) fimg[hpass+i] += thold; - else if (fimg[hpass+i] > thold) fimg[hpass+i] -= thold; - else fimg[hpass+i] = 0; - if (hpass) fimg[i] += fimg[hpass+i]; - } - hpass = lpass; - } - for (i=0; i < size; i++) - image[i][c] = CLIP(SQR(fimg[i]+fimg[lpass+i])/0x10000); - } - if (filters && colors == 3) { /* pull G1 and G3 closer together */ - for (row=0; row < 2; row++) { - mul[row] = 0.125 * pre_mul[FC(row+1,0) | 1] / pre_mul[FC(row,0) | 1]; - blk[row] = cblack[FC(row,0) | 1]; - } - for (i=0; i < 4; i++) - window[i] = (ushort *) fimg + width*i; - for (wlast=-1, row=1; row < height-1; row++) { - while (wlast < row+1) { - for (wlast++, i=0; i < 4; i++) - window[(i+3) & 3] = window[i]; - for (col = FC(wlast,1) & 1; col < width; col+=2) - window[2][col] = BAYER(wlast,col); - } - thold = threshold/512; - for (col = (FC(row,0) & 1)+1; col < width-1; col+=2) { - avg = ( window[0][col-1] + window[0][col+1] + - window[2][col-1] + window[2][col+1] - blk[~row & 1]*4 ) - * mul[row & 1] + (window[1][col] + blk[row & 1]) * 0.5; - avg = avg < 0 ? 0 : sqrt(avg); - diff = sqrt(BAYER(row,col)) - avg; - if (diff < -thold) diff += thold; - else if (diff > thold) diff -= thold; - else diff = 0; - BAYER(row,col) = CLIP(SQR(avg+diff) + 0.5); - } - } - } - free (fimg); -} - -void CLASS scale_colors() -{ - unsigned bottom, right, size, row, col, ur, uc, i, x, y, c, sum[8]; - int val, dark, sat; - double dsum[8], dmin, dmax; - float scale_mul[4], fr, fc; - ushort *img=0, *pix; - - if (user_mul[0]) - memcpy (pre_mul, user_mul, sizeof pre_mul); - if (use_auto_wb || (use_camera_wb && cam_mul[0] == -1)) { - memset (dsum, 0, sizeof dsum); - bottom = MIN (greybox[1]+greybox[3], height); - right = MIN (greybox[0]+greybox[2], width); - for (row=greybox[1]; row < bottom; row += 8) - for (col=greybox[0]; col < right; col += 8) { - memset (sum, 0, sizeof sum); - for (y=row; y < row+8 && y < bottom; y++) - for (x=col; x < col+8 && x < right; x++) - FORC4 { - if (filters) { - c = fcol(y,x); - val = BAYER2(y,x); - } else - val = image[y*width+x][c]; - if (val > maximum-25) goto skip_block; - if ((val -= cblack[c]) < 0) val = 0; - sum[c] += val; - sum[c+4]++; - if (filters) break; - } - FORC(8) dsum[c] += sum[c]; -skip_block: ; - } - FORC4 if (dsum[c]) pre_mul[c] = dsum[c+4] / dsum[c]; - } - if (use_camera_wb && cam_mul[0] != -1) { - memset (sum, 0, sizeof sum); - for (row=0; row < 8; row++) - for (col=0; col < 8; col++) { - c = FC(row,col); - if ((val = white[row][col] - cblack[c]) > 0) - sum[c] += val; - sum[c+4]++; - } - if (sum[0] && sum[1] && sum[2] && sum[3]) - FORC4 pre_mul[c] = (float) sum[c+4] / sum[c]; - else if (cam_mul[0] && cam_mul[2]) - memcpy (pre_mul, cam_mul, sizeof pre_mul); - else - fprintf (stderr,_("%s: Cannot use camera white balance.\n"), ifname); - } - if (pre_mul[3] == 0) pre_mul[3] = colors < 4 ? pre_mul[1] : 1; - dark = black; - sat = maximum; - if (threshold) wavelet_denoise(); - maximum -= black; - for (dmin=DBL_MAX, dmax=c=0; c < 4; c++) { - if (dmin > pre_mul[c]) - dmin = pre_mul[c]; - if (dmax < pre_mul[c]) - dmax = pre_mul[c]; - } - if (!highlight) dmax = dmin; - FORC4 scale_mul[c] = (pre_mul[c] /= dmax) * 65535.0 / maximum; - if (verbose) { - fprintf (stderr, - _("Scaling with darkness %d, saturation %d, and\nmultipliers"), dark, sat); - FORC4 fprintf (stderr, " %f", pre_mul[c]); - fputc ('\n', stderr); - } - size = iheight*iwidth; - for (i=0; i < size*4; i++) { - val = image[0][i]; - if (!val) continue; - val -= cblack[i & 3]; - val *= scale_mul[i & 3]; - image[0][i] = CLIP(val); - } - if ((aber[0] != 1 || aber[2] != 1) && colors == 3) { - if (verbose) - fprintf (stderr,_("Correcting chromatic aberration...\n")); - for (c=0; c < 4; c+=2) { - if (aber[c] == 1) continue; - img = (ushort *) malloc (size * sizeof *img); - merror (img, "scale_colors()"); - for (i=0; i < size; i++) - img[i] = image[i][c]; - for (row=0; row < iheight; row++) { - ur = fr = (row - iheight*0.5) * aber[c] + iheight*0.5; - if (ur > iheight-2) continue; - fr -= ur; - for (col=0; col < iwidth; col++) { - uc = fc = (col - iwidth*0.5) * aber[c] + iwidth*0.5; - if (uc > iwidth-2) continue; - fc -= uc; - pix = img + ur*iwidth + uc; - image[row*iwidth+col][c] = - (pix[ 0]*(1-fc) + pix[ 1]*fc) * (1-fr) + - (pix[iwidth]*(1-fc) + pix[iwidth+1]*fc) * fr; - } - } - free(img); - } - } -} - -void CLASS pre_interpolate() -{ - ushort (*img)[4]; - int row, col, c; - - if (shrink) { - if (half_size) { - height = iheight; - width = iwidth; - } else { - img = (ushort (*)[4]) calloc (height*width, sizeof *img); - merror (img, "pre_interpolate()"); - for (row=0; row < height; row++) - for (col=0; col < width; col++) { - c = fcol(row,col); - img[row*width+col][c] = image[(row >> 1)*iwidth+(col >> 1)][c]; - } - free (image); - image = img; - shrink = 0; - } - } - if (filters > 1000 && colors == 3) { - if (four_color_rgb && colors++) - mix_green = !half_size; - else { - for (row = FC(1,0) >> 1; row < height; row+=2) - for (col = FC(row,1) & 1; col < width; col+=2) - image[row*width+col][1] = image[row*width+col][3]; - filters &= ~((filters & 0x55555555) << 1); - } - } - if (half_size) filters = 0; -} - -void CLASS border_interpolate (int border) -{ - unsigned row, col, y, x, f, c, sum[8]; - - for (row=0; row < height; row++) - for (col=0; col < width; col++) { - if (col==border && row >= border && row < height-border) - col = width-border; - memset (sum, 0, sizeof sum); - for (y=row-1; y != row+2; y++) - for (x=col-1; x != col+2; x++) - if (y < height && x < width) { - f = fcol(y,x); - sum[f] += image[y*width+x][f]; - sum[f+4]++; - } - f = fcol(row,col); - FORCC if (c != f && sum[c+4]) - image[row*width+col][c] = sum[c] / sum[c+4]; - } -} - -void CLASS lin_interpolate() -{ - int code[16][16][32], size=16, *ip, sum[4]; - int f, c, i, x, y, row, col, shift, color; - ushort *pix; - - if (verbose) fprintf (stderr,_("Bilinear interpolation...\n")); - if (filters == 2) size = 6; - border_interpolate(1); - for (row=0; row < size; row++) - for (col=0; col < size; col++) { - ip = code[row][col]+1; - f = fcol(row,col); - memset (sum, 0, sizeof sum); - for (y=-1; y <= 1; y++) - for (x=-1; x <= 1; x++) { - shift = (y==0) + (x==0); - color = fcol(row+y,col+x); - if (color == f) continue; - *ip++ = (width*y + x)*4 + color; - *ip++ = shift; - *ip++ = color; - sum[color] += 1 << shift; - } - code[row][col][0] = (ip - code[row][col]) / 3; - FORCC - if (c != f) { - *ip++ = c; - *ip++ = 256 / sum[c]; - } - } - for (row=1; row < height-1; row++) - for (col=1; col < width-1; col++) { - pix = image[row*width+col]; - ip = code[row % size][col % size]; - memset (sum, 0, sizeof sum); - for (i=*ip++; i--; ip+=3) - sum[ip[2]] += pix[ip[0]] << ip[1]; - for (i=colors; --i; ip+=2) - pix[ip[0]] = sum[ip[0]] * ip[1] >> 8; - } -} - -/* - This algorithm is officially called: - - "Interpolation using a Threshold-based variable number of gradients" - - described in http://scien.stanford.edu/pages/labsite/1999/psych221/projects/99/tingchen/algodep/vargra.html - - I've extended the basic idea to work with non-Bayer filter arrays. - Gradients are numbered clockwise from NW=0 to W=7. - */ -void CLASS vng_interpolate() -{ - static const signed char *cp, terms[] = { - -2,-2,+0,-1,0,0x01, -2,-2,+0,+0,1,0x01, -2,-1,-1,+0,0,0x01, - -2,-1,+0,-1,0,0x02, -2,-1,+0,+0,0,0x03, -2,-1,+0,+1,1,0x01, - -2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03, - -2,+1,-1,+0,0,0x04, -2,+1,+0,-1,1,0x04, -2,+1,+0,+0,0,0x06, - -2,+1,+0,+1,0,0x02, -2,+2,+0,+0,1,0x04, -2,+2,+0,+1,0,0x04, - -1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01, - -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40, - -1,-1,+1,-1,0,0x22, -1,-1,+1,+0,0,0x33, -1,-1,+1,+1,1,0x11, - -1,+0,-1,+2,0,0x08, -1,+0,+0,-1,0,0x44, -1,+0,+0,+1,0,0x11, - -1,+0,+1,-2,1,0x40, -1,+0,+1,-1,0,0x66, -1,+0,+1,+0,1,0x22, - -1,+0,+1,+1,0,0x33, -1,+0,+1,+2,1,0x10, -1,+1,+1,-1,1,0x44, - -1,+1,+1,+0,0,0x66, -1,+1,+1,+1,0,0x22, -1,+1,+1,+2,0,0x10, - -1,+2,+0,+1,0,0x04, -1,+2,+1,+0,1,0x04, -1,+2,+1,+1,0,0x04, - +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40, - +0,-1,+1,+0,0,0x11, +0,-1,+2,-2,0,0x40, +0,-1,+2,-1,0,0x20, - +0,-1,+2,+0,0,0x30, +0,-1,+2,+1,1,0x10, +0,+0,+0,+2,1,0x08, - +0,+0,+2,-2,1,0x40, +0,+0,+2,-1,0,0x60, +0,+0,+2,+0,1,0x20, - +0,+0,+2,+1,0,0x30, +0,+0,+2,+2,1,0x10, +0,+1,+1,+0,0,0x44, - +0,+1,+1,+2,0,0x10, +0,+1,+2,-1,1,0x40, +0,+1,+2,+0,0,0x60, - +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80, - +1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40, - +1,+0,+2,+1,0,0x10 - }, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 }; - ushort (*brow[5])[4], *pix; - int prow=8, pcol=2, *ip, *code[16][16], gval[8], gmin, gmax, sum[4]; - int row, col, x, y, x1, x2, y1, y2, t, weight, grads, color, diag; - int g, diff, thold, num, c; - - lin_interpolate(); - if (verbose) fprintf (stderr,_("VNG interpolation...\n")); - - if (filters == 1) prow = pcol = 16; - if (filters == 2) prow = pcol = 6; - ip = (int *) calloc (prow*pcol, 1280); - merror (ip, "vng_interpolate()"); - for (row=0; row < prow; row++) /* Precalculate for VNG */ - for (col=0; col < pcol; col++) { - code[row][col] = ip; - for (cp=terms, t=0; t < 64; t++) { - y1 = *cp++; x1 = *cp++; - y2 = *cp++; x2 = *cp++; - weight = *cp++; - grads = *cp++; - color = fcol(row+y1,col+x1); - if (fcol(row+y2,col+x2) != color) continue; - diag = (fcol(row,col+1) == color && fcol(row+1,col) == color) ? 2:1; - if (abs(y1-y2) == diag && abs(x1-x2) == diag) continue; - *ip++ = (y1*width + x1)*4 + color; - *ip++ = (y2*width + x2)*4 + color; - *ip++ = weight; - for (g=0; g < 8; g++) - if (grads & 1< gval[g]) gmin = gval[g]; - if (gmax < gval[g]) gmax = gval[g]; - } - if (gmax == 0) { - memcpy (brow[2][col], pix, sizeof *image); - continue; - } - thold = gmin + (gmax >> 1); - memset (sum, 0, sizeof sum); - color = fcol(row,col); - for (num=g=0; g < 8; g++,ip+=2) { /* Average the neighbors */ - if (gval[g] <= thold) { - FORCC - if (c == color && ip[1]) - sum[c] += (pix[c] + pix[ip[1]]) >> 1; - else - sum[c] += pix[ip[0] + c]; - num++; - } - } - FORCC { /* Save to buffer */ - t = pix[color]; - if (c != color) - t += (sum[c] - sum[color]) / num; - brow[2][col][c] = CLIP(t); - } - } - if (row > 3) /* Write buffer to image */ - memcpy (image[(row-2)*width+2], brow[0]+2, (width-4)*sizeof *image); - for (g=0; g < 4; g++) - brow[(g-1) & 3] = brow[g]; - } - memcpy (image[(row-2)*width+2], brow[0]+2, (width-4)*sizeof *image); - memcpy (image[(row-1)*width+2], brow[1]+2, (width-4)*sizeof *image); - free (brow[4]); - free (code[0][0]); -} - -/* - Patterned Pixel Grouping Interpolation by Alain Desbiolles -*/ -void CLASS ppg_interpolate() -{ - int dir[5] = { 1, width, -1, -width, 1 }; - int row, col, diff[2], guess[2], c, d, i; - ushort (*pix)[4]; - - border_interpolate(3); - if (verbose) fprintf (stderr,_("PPG interpolation...\n")); - -/* Fill in the green layer with gradients and pattern recognition: */ - for (row=3; row < height-3; row++) - for (col=3+(FC(row,3) & 1), c=FC(row,col); col < width-3; col+=2) { - pix = image + row*width+col; - for (i=0; (d=dir[i]) > 0; i++) { - guess[i] = (pix[-d][1] + pix[0][c] + pix[d][1]) * 2 - - pix[-2*d][c] - pix[2*d][c]; - diff[i] = ( ABS(pix[-2*d][c] - pix[ 0][c]) + - ABS(pix[ 2*d][c] - pix[ 0][c]) + - ABS(pix[ -d][1] - pix[ d][1]) ) * 3 + - ( ABS(pix[ 3*d][1] - pix[ d][1]) + - ABS(pix[-3*d][1] - pix[-d][1]) ) * 2; - } - d = dir[i = diff[0] > diff[1]]; - pix[0][1] = ULIM(guess[i] >> 2, pix[d][1], pix[-d][1]); - } -/* Calculate red and blue for each green pixel: */ - for (row=1; row < height-1; row++) - for (col=1+(FC(row,2) & 1), c=FC(row,col+1); col < width-1; col+=2) { - pix = image + row*width+col; - for (i=0; (d=dir[i]) > 0; c=2-c, i++) - pix[0][c] = CLIP((pix[-d][c] + pix[d][c] + 2*pix[0][1] - - pix[-d][1] - pix[d][1]) >> 1); - } -/* Calculate blue for red pixels and vice versa: */ - for (row=1; row < height-1; row++) - for (col=1+(FC(row,1) & 1), c=2-FC(row,col); col < width-1; col+=2) { - pix = image + row*width+col; - for (i=0; (d=dir[i]+dir[i+1]) > 0; i++) { - diff[i] = ABS(pix[-d][c] - pix[d][c]) + - ABS(pix[-d][1] - pix[0][1]) + - ABS(pix[ d][1] - pix[0][1]); - guess[i] = pix[-d][c] + pix[d][c] + 2*pix[0][1] - - pix[-d][1] - pix[d][1]; - } - if (diff[0] != diff[1]) - pix[0][c] = CLIP(guess[diff[0] > diff[1]] >> 1); - else - pix[0][c] = CLIP((guess[0]+guess[1]) >> 2); - } -} - -/* - Adaptive Homogeneity-Directed interpolation is based on - the work of Keigo Hirakawa, Thomas Parks, and Paul Lee. - */ -#define TS 256 /* Tile Size */ - -void CLASS ahd_interpolate() -{ - int i, j, k, top, left, row, col, tr, tc, c, d, val, hm[2]; - ushort (*pix)[4], (*rix)[3]; - static const int dir[4] = { -1, 1, -TS, TS }; - unsigned ldiff[2][4], abdiff[2][4], leps, abeps; - float r, cbrt[0x10000], xyz[3], xyz_cam[3][4]; - ushort (*rgb)[TS][TS][3]; - short (*lab)[TS][TS][3], (*lix)[3]; - char (*homo)[TS][TS], *buffer; - - if (verbose) fprintf (stderr,_("AHD interpolation...\n")); - - for (i=0; i < 0x10000; i++) { - r = i / 65535.0; - cbrt[i] = r > 0.008856 ? pow(r,1/3.0) : 7.787*r + 16/116.0; - } - for (i=0; i < 3; i++) - for (j=0; j < colors; j++) - for (xyz_cam[i][j] = k=0; k < 3; k++) - xyz_cam[i][j] += xyz_rgb[i][k] * rgb_cam[k][j] / d65_white[i]; - - border_interpolate(5); - buffer = (char *) malloc (26*TS*TS); /* 1664 kB */ - merror (buffer, "ahd_interpolate()"); - rgb = (ushort(*)[TS][TS][3]) buffer; - lab = (short (*)[TS][TS][3])(buffer + 12*TS*TS); - homo = (char (*)[TS][TS]) (buffer + 24*TS*TS); - - for (top=2; top < height-5; top += TS-6) - for (left=2; left < width-5; left += TS-6) { - -/* Interpolate green horizontally and vertically: */ - for (row = top; row < top+TS && row < height-2; row++) { - col = left + (FC(row,left) & 1); - for (c = FC(row,col); col < left+TS && col < width-2; col+=2) { - pix = image + row*width+col; - val = ((pix[-1][1] + pix[0][c] + pix[1][1]) * 2 - - pix[-2][c] - pix[2][c]) >> 2; - rgb[0][row-top][col-left][1] = ULIM(val,pix[-1][1],pix[1][1]); - val = ((pix[-width][1] + pix[0][c] + pix[width][1]) * 2 - - pix[-2*width][c] - pix[2*width][c]) >> 2; - rgb[1][row-top][col-left][1] = ULIM(val,pix[-width][1],pix[width][1]); - } - } -/* Interpolate red and blue, and convert to CIELab: */ - for (d=0; d < 2; d++) - for (row=top+1; row < top+TS-1 && row < height-3; row++) - for (col=left+1; col < left+TS-1 && col < width-3; col++) { - pix = image + row*width+col; - rix = &rgb[d][row-top][col-left]; - lix = &lab[d][row-top][col-left]; - if ((c = 2 - FC(row,col)) == 1) { - c = FC(row+1,col); - val = pix[0][1] + (( pix[-1][2-c] + pix[1][2-c] - - rix[-1][1] - rix[1][1] ) >> 1); - rix[0][2-c] = CLIP(val); - val = pix[0][1] + (( pix[-width][c] + pix[width][c] - - rix[-TS][1] - rix[TS][1] ) >> 1); - } else - val = rix[0][1] + (( pix[-width-1][c] + pix[-width+1][c] - + pix[+width-1][c] + pix[+width+1][c] - - rix[-TS-1][1] - rix[-TS+1][1] - - rix[+TS-1][1] - rix[+TS+1][1] + 1) >> 2); - rix[0][c] = CLIP(val); - c = FC(row,col); - rix[0][c] = pix[0][c]; - xyz[0] = xyz[1] = xyz[2] = 0.5; - FORCC { - xyz[0] += xyz_cam[0][c] * rix[0][c]; - xyz[1] += xyz_cam[1][c] * rix[0][c]; - xyz[2] += xyz_cam[2][c] * rix[0][c]; - } - xyz[0] = cbrt[CLIP((int) xyz[0])]; - xyz[1] = cbrt[CLIP((int) xyz[1])]; - xyz[2] = cbrt[CLIP((int) xyz[2])]; - lix[0][0] = 64 * (116 * xyz[1] - 16); - lix[0][1] = 64 * 500 * (xyz[0] - xyz[1]); - lix[0][2] = 64 * 200 * (xyz[1] - xyz[2]); - } -/* Build homogeneity maps from the CIELab images: */ - memset (homo, 0, 2*TS*TS); - for (row=top+2; row < top+TS-2 && row < height-4; row++) { - tr = row-top; - for (col=left+2; col < left+TS-2 && col < width-4; col++) { - tc = col-left; - for (d=0; d < 2; d++) { - lix = &lab[d][tr][tc]; - for (i=0; i < 4; i++) { - ldiff[d][i] = ABS(lix[0][0]-lix[dir[i]][0]); - abdiff[d][i] = SQR(lix[0][1]-lix[dir[i]][1]) - + SQR(lix[0][2]-lix[dir[i]][2]); - } - } - leps = MIN(MAX(ldiff[0][0],ldiff[0][1]), - MAX(ldiff[1][2],ldiff[1][3])); - abeps = MIN(MAX(abdiff[0][0],abdiff[0][1]), - MAX(abdiff[1][2],abdiff[1][3])); - for (d=0; d < 2; d++) - for (i=0; i < 4; i++) - if (ldiff[d][i] <= leps && abdiff[d][i] <= abeps) - homo[d][tr][tc]++; - } - } -/* Combine the most homogenous pixels for the final result: */ - for (row=top+3; row < top+TS-3 && row < height-5; row++) { - tr = row-top; - for (col=left+3; col < left+TS-3 && col < width-5; col++) { - tc = col-left; - for (d=0; d < 2; d++) - for (hm[d]=0, i=tr-1; i <= tr+1; i++) - for (j=tc-1; j <= tc+1; j++) - hm[d] += homo[d][i][j]; - if (hm[0] != hm[1]) - FORC3 image[row*width+col][c] = rgb[hm[1] > hm[0]][tr][tc][c]; - else - FORC3 image[row*width+col][c] = - (rgb[0][tr][tc][c] + rgb[1][tr][tc][c]) >> 1; - } - } - } - free (buffer); -} -#undef TS - -void CLASS median_filter() -{ - ushort (*pix)[4]; - int pass, c, i, j, k, med[9]; - static const uchar opt[] = /* Optimal 9-element median search */ - { 1,2, 4,5, 7,8, 0,1, 3,4, 6,7, 1,2, 4,5, 7,8, - 0,3, 5,8, 4,7, 3,6, 1,4, 2,5, 4,7, 4,2, 6,4, 4,2 }; - - for (pass=1; pass <= med_passes; pass++) { - if (verbose) - fprintf (stderr,_("Median filter pass %d...\n"), pass); - for (c=0; c < 3; c+=2) { - for (pix = image; pix < image+width*height; pix++) - pix[0][3] = pix[0][c]; - for (pix = image+width; pix < image+width*(height-1); pix++) { - if ((pix-image+1) % width < 2) continue; - for (k=0, i = -width; i <= width; i += width) - for (j = i-1; j <= i+1; j++) - med[k++] = pix[j][3] - pix[j][1]; - for (i=0; i < sizeof opt; i+=2) - if (med[opt[i]] > med[opt[i+1]]) - SWAP (med[opt[i]] , med[opt[i+1]]); - pix[0][c] = CLIP(med[4] + pix[0][1]); - } - } - } -} - -void CLASS blend_highlights() -{ - int clip=INT_MAX, row, col, c, i, j; - static const float trans[2][4][4] = - { { { 1,1,1 }, { 1.7320508,-1.7320508,0 }, { -1,-1,2 } }, - { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; - static const float itrans[2][4][4] = - { { { 1,0.8660254,-0.5 }, { 1,-0.8660254,-0.5 }, { 1,0,1 } }, - { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; - float cam[2][4], lab[2][4], sum[2], chratio; - - if ((unsigned) (colors-3) > 1) return; - if (verbose) fprintf (stderr,_("Blending highlights...\n")); - FORCC if (clip > (i = 65535*pre_mul[c])) clip = i; - for (row=0; row < height; row++) - for (col=0; col < width; col++) { - FORCC if (image[row*width+col][c] > clip) break; - if (c == colors) continue; - FORCC { - cam[0][c] = image[row*width+col][c]; - cam[1][c] = MIN(cam[0][c],clip); - } - for (i=0; i < 2; i++) { - FORCC for (lab[i][c]=j=0; j < colors; j++) - lab[i][c] += trans[colors-3][c][j] * cam[i][j]; - for (sum[i]=0,c=1; c < colors; c++) - sum[i] += SQR(lab[i][c]); - } - chratio = sqrt(sum[1]/sum[0]); - for (c=1; c < colors; c++) - lab[0][c] *= chratio; - FORCC for (cam[0][c]=j=0; j < colors; j++) - cam[0][c] += itrans[colors-3][c][j] * lab[0][j]; - FORCC image[row*width+col][c] = cam[0][c] / colors; - } -} - -#define SCALE (4 >> shrink) -void CLASS recover_highlights() -{ - float *map, sum, wgt, grow; - int hsat[4], count, spread, change, val, i; - unsigned high, wide, mrow, mcol, row, col, kc, c, d, y, x; - ushort *pixel; - static const signed char dir[8][2] = - { {-1,-1}, {-1,0}, {-1,1}, {0,1}, {1,1}, {1,0}, {1,-1}, {0,-1} }; - - if (verbose) fprintf (stderr,_("Rebuilding highlights...\n")); - - grow = pow (2, 4-highlight); - FORCC hsat[c] = 32000 * pre_mul[c]; - for (kc=0, c=1; c < colors; c++) - if (pre_mul[kc] < pre_mul[c]) kc = c; - high = height / SCALE; - wide = width / SCALE; - map = (float *) calloc (high*wide, sizeof *map); - merror (map, "recover_highlights()"); - FORCC if (c != kc) { - memset (map, 0, high*wide*sizeof *map); - for (mrow=0; mrow < high; mrow++) - for (mcol=0; mcol < wide; mcol++) { - sum = wgt = count = 0; - for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) - for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { - pixel = image[row*width+col]; - if (pixel[c] / hsat[c] == 1 && pixel[kc] > 24000) { - sum += pixel[c]; - wgt += pixel[kc]; - count++; - } - } - if (count == SCALE*SCALE) - map[mrow*wide+mcol] = sum / wgt; - } - for (spread = 32/grow; spread--; ) { - for (mrow=0; mrow < high; mrow++) - for (mcol=0; mcol < wide; mcol++) { - if (map[mrow*wide+mcol]) continue; - sum = count = 0; - for (d=0; d < 8; d++) { - y = mrow + dir[d][0]; - x = mcol + dir[d][1]; - if (y < high && x < wide && map[y*wide+x] > 0) { - sum += (1 + (d & 1)) * map[y*wide+x]; - count += 1 + (d & 1); - } - } - if (count > 3) - map[mrow*wide+mcol] = - (sum+grow) / (count+grow); - } - for (change=i=0; i < high*wide; i++) - if (map[i] < 0) { - map[i] = -map[i]; - change = 1; - } - if (!change) break; - } - for (i=0; i < high*wide; i++) - if (map[i] == 0) map[i] = 1; - for (mrow=0; mrow < high; mrow++) - for (mcol=0; mcol < wide; mcol++) { - for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) - for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { - pixel = image[row*width+col]; - if (pixel[c] / hsat[c] > 1) { - val = pixel[kc] * map[mrow*wide+mcol]; - if (pixel[c] < val) pixel[c] = CLIP(val); - } - } - } - } - free (map); -} -#undef SCALE - -void CLASS tiff_get (unsigned base, - unsigned *tag, unsigned *type, unsigned *len, unsigned *save) -{ - *tag = get2(); - *type = get2(); - *len = get4(); - *save = ftell(ifp) + 4; - if (*len * ("11124811248488"[*type < 14 ? *type:0]-'0') > 4) - fseek (ifp, get4()+base, SEEK_SET); -} - -void CLASS parse_thumb_note (int base, unsigned toff, unsigned tlen) -{ - unsigned entries, tag, type, len, save; - - entries = get2(); - while (entries--) { - tiff_get (base, &tag, &type, &len, &save); - if (tag == toff) thumb_offset = get4()+base; - if (tag == tlen) thumb_length = get4(); - fseek (ifp, save, SEEK_SET); - } -} - -int CLASS parse_tiff_ifd (int base); - -void CLASS parse_makernote (int base, int uptag) -{ - static const uchar xlat[2][256] = { - { 0xc1,0xbf,0x6d,0x0d,0x59,0xc5,0x13,0x9d,0x83,0x61,0x6b,0x4f,0xc7,0x7f,0x3d,0x3d, - 0x53,0x59,0xe3,0xc7,0xe9,0x2f,0x95,0xa7,0x95,0x1f,0xdf,0x7f,0x2b,0x29,0xc7,0x0d, - 0xdf,0x07,0xef,0x71,0x89,0x3d,0x13,0x3d,0x3b,0x13,0xfb,0x0d,0x89,0xc1,0x65,0x1f, - 0xb3,0x0d,0x6b,0x29,0xe3,0xfb,0xef,0xa3,0x6b,0x47,0x7f,0x95,0x35,0xa7,0x47,0x4f, - 0xc7,0xf1,0x59,0x95,0x35,0x11,0x29,0x61,0xf1,0x3d,0xb3,0x2b,0x0d,0x43,0x89,0xc1, - 0x9d,0x9d,0x89,0x65,0xf1,0xe9,0xdf,0xbf,0x3d,0x7f,0x53,0x97,0xe5,0xe9,0x95,0x17, - 0x1d,0x3d,0x8b,0xfb,0xc7,0xe3,0x67,0xa7,0x07,0xf1,0x71,0xa7,0x53,0xb5,0x29,0x89, - 0xe5,0x2b,0xa7,0x17,0x29,0xe9,0x4f,0xc5,0x65,0x6d,0x6b,0xef,0x0d,0x89,0x49,0x2f, - 0xb3,0x43,0x53,0x65,0x1d,0x49,0xa3,0x13,0x89,0x59,0xef,0x6b,0xef,0x65,0x1d,0x0b, - 0x59,0x13,0xe3,0x4f,0x9d,0xb3,0x29,0x43,0x2b,0x07,0x1d,0x95,0x59,0x59,0x47,0xfb, - 0xe5,0xe9,0x61,0x47,0x2f,0x35,0x7f,0x17,0x7f,0xef,0x7f,0x95,0x95,0x71,0xd3,0xa3, - 0x0b,0x71,0xa3,0xad,0x0b,0x3b,0xb5,0xfb,0xa3,0xbf,0x4f,0x83,0x1d,0xad,0xe9,0x2f, - 0x71,0x65,0xa3,0xe5,0x07,0x35,0x3d,0x0d,0xb5,0xe9,0xe5,0x47,0x3b,0x9d,0xef,0x35, - 0xa3,0xbf,0xb3,0xdf,0x53,0xd3,0x97,0x53,0x49,0x71,0x07,0x35,0x61,0x71,0x2f,0x43, - 0x2f,0x11,0xdf,0x17,0x97,0xfb,0x95,0x3b,0x7f,0x6b,0xd3,0x25,0xbf,0xad,0xc7,0xc5, - 0xc5,0xb5,0x8b,0xef,0x2f,0xd3,0x07,0x6b,0x25,0x49,0x95,0x25,0x49,0x6d,0x71,0xc7 }, - { 0xa7,0xbc,0xc9,0xad,0x91,0xdf,0x85,0xe5,0xd4,0x78,0xd5,0x17,0x46,0x7c,0x29,0x4c, - 0x4d,0x03,0xe9,0x25,0x68,0x11,0x86,0xb3,0xbd,0xf7,0x6f,0x61,0x22,0xa2,0x26,0x34, - 0x2a,0xbe,0x1e,0x46,0x14,0x68,0x9d,0x44,0x18,0xc2,0x40,0xf4,0x7e,0x5f,0x1b,0xad, - 0x0b,0x94,0xb6,0x67,0xb4,0x0b,0xe1,0xea,0x95,0x9c,0x66,0xdc,0xe7,0x5d,0x6c,0x05, - 0xda,0xd5,0xdf,0x7a,0xef,0xf6,0xdb,0x1f,0x82,0x4c,0xc0,0x68,0x47,0xa1,0xbd,0xee, - 0x39,0x50,0x56,0x4a,0xdd,0xdf,0xa5,0xf8,0xc6,0xda,0xca,0x90,0xca,0x01,0x42,0x9d, - 0x8b,0x0c,0x73,0x43,0x75,0x05,0x94,0xde,0x24,0xb3,0x80,0x34,0xe5,0x2c,0xdc,0x9b, - 0x3f,0xca,0x33,0x45,0xd0,0xdb,0x5f,0xf5,0x52,0xc3,0x21,0xda,0xe2,0x22,0x72,0x6b, - 0x3e,0xd0,0x5b,0xa8,0x87,0x8c,0x06,0x5d,0x0f,0xdd,0x09,0x19,0x93,0xd0,0xb9,0xfc, - 0x8b,0x0f,0x84,0x60,0x33,0x1c,0x9b,0x45,0xf1,0xf0,0xa3,0x94,0x3a,0x12,0x77,0x33, - 0x4d,0x44,0x78,0x28,0x3c,0x9e,0xfd,0x65,0x57,0x16,0x94,0x6b,0xfb,0x59,0xd0,0xc8, - 0x22,0x36,0xdb,0xd2,0x63,0x98,0x43,0xa1,0x04,0x87,0x86,0xf7,0xa6,0x26,0xbb,0xd6, - 0x59,0x4d,0xbf,0x6a,0x2e,0xaa,0x2b,0xef,0xe6,0x78,0xb6,0x4e,0xe0,0x2f,0xdc,0x7c, - 0xbe,0x57,0x19,0x32,0x7e,0x2a,0xd0,0xb8,0xba,0x29,0x00,0x3c,0x52,0x7d,0xa8,0x49, - 0x3b,0x2d,0xeb,0x25,0x49,0xfa,0xa3,0xaa,0x39,0xa7,0xc5,0xa7,0x50,0x11,0x36,0xfb, - 0xc6,0x67,0x4a,0xf5,0xa5,0x12,0x65,0x7e,0xb0,0xdf,0xaf,0x4e,0xb3,0x61,0x7f,0x2f } }; - unsigned offset=0, entries, tag, type, len, save, c; - unsigned ver97=0, serial=0, i, wbi=0, wb[4]={0,0,0,0}; - uchar buf97[324], ci, cj, ck; - short morder, sorder=order; - char buf[10]; -/* - The MakerNote might have its own TIFF header (possibly with - its own byte-order!), or it might just be a table. - */ - if (!strcmp(make,"Nokia")) return; - fread (buf, 1, 10, ifp); - if (!strncmp (buf,"KDK" ,3) || /* these aren't TIFF tables */ - !strncmp (buf,"VER" ,3) || - !strncmp (buf,"IIII",4) || - !strncmp (buf,"MMMM",4)) return; - if (!strncmp (buf,"KC" ,2) || /* Konica KD-400Z, KD-510Z */ - !strncmp (buf,"MLY" ,3)) { /* Minolta DiMAGE G series */ - order = 0x4d4d; - while ((i=ftell(ifp)) < data_offset && i < 16384) { - wb[0] = wb[2]; wb[2] = wb[1]; wb[1] = wb[3]; - wb[3] = get2(); - if (wb[1] == 256 && wb[3] == 256 && - wb[0] > 256 && wb[0] < 640 && wb[2] > 256 && wb[2] < 640) - FORC4 cam_mul[c] = wb[c]; - } - goto quit; - } - if (!strcmp (buf,"Nikon")) { - base = ftell(ifp); - order = get2(); - if (get2() != 42) goto quit; - offset = get4(); - fseek (ifp, offset-8, SEEK_CUR); - } else if (!strcmp (buf,"OLYMPUS")) { - base = ftell(ifp)-10; - fseek (ifp, -2, SEEK_CUR); - order = get2(); get2(); - } else if (!strncmp (buf,"SONY",4) || - !strcmp (buf,"Panasonic")) { - goto nf; - } else if (!strncmp (buf,"FUJIFILM",8)) { - base = ftell(ifp)-10; -nf: order = 0x4949; - fseek (ifp, 2, SEEK_CUR); - } else if (!strcmp (buf,"OLYMP") || - !strcmp (buf,"LEICA") || - !strcmp (buf,"Ricoh") || - !strcmp (buf,"EPSON")) - fseek (ifp, -2, SEEK_CUR); - else if (!strcmp (buf,"AOC") || - !strcmp (buf,"QVC")) - fseek (ifp, -4, SEEK_CUR); - else { - fseek (ifp, -10, SEEK_CUR); - if (!strncmp(make,"SAMSUNG",7)) - base = ftell(ifp); - } - entries = get2(); - if (entries > 1000) return; - morder = order; - while (entries--) { - order = morder; - tiff_get (base, &tag, &type, &len, &save); - tag |= uptag << 16; - if (tag == 2 && strstr(make,"NIKON") && !iso_speed) - iso_speed = (get2(),get2()); - if (tag == 4 && len > 26 && len < 35) { - if ((i=(get4(),get2())) != 0x7fff && !iso_speed) - iso_speed = 50 * pow (2, i/32.0 - 4); - if ((i=(get2(),get2())) != 0x7fff && !aperture) - aperture = pow (2, i/64.0); - if ((i=get2()) != 0xffff && !shutter) - shutter = pow (2, (short) i/-32.0); - wbi = (get2(),get2()); - shot_order = (get2(),get2()); - } - if ((tag == 4 || tag == 0x114) && !strncmp(make,"KONICA",6)) { - fseek (ifp, tag == 4 ? 140:160, SEEK_CUR); - switch (get2()) { - case 72: flip = 0; break; - case 76: flip = 6; break; - case 82: flip = 5; break; - } - } - if (tag == 7 && type == 2 && len > 20) - fgets (model2, 64, ifp); - if (tag == 8 && type == 4) - shot_order = get4(); - if (tag == 9 && !strcmp(make,"Canon")) - fread (artist, 64, 1, ifp); - if (tag == 0xc && len == 4) { - cam_mul[0] = getreal(type); - cam_mul[2] = getreal(type); - } - if (tag == 0xd && type == 7 && get2() == 0xaaaa) { - for (c=i=2; (ushort) c != 0xbbbb && i < len; i++) - c = c << 8 | fgetc(ifp); - while ((i+=4) < len-5) - if (get4() == 257 && (i=len) && (c = (get4(),fgetc(ifp))) < 3) - flip = "065"[c]-'0'; - } - if (tag == 0x10 && type == 4) - unique_id = get4(); - if (tag == 0x11 && is_raw && !strncmp(make,"NIKON",5)) { - fseek (ifp, get4()+base, SEEK_SET); - parse_tiff_ifd (base); - } - if (tag == 0x14 && type == 7) { - if (len == 2560) { - fseek (ifp, 1248, SEEK_CUR); - goto get2_256; - } - fread (buf, 1, 10, ifp); - if (!strncmp(buf,"NRW ",4)) { - fseek (ifp, strcmp(buf+4,"0100") ? 46:1546, SEEK_CUR); - cam_mul[0] = get4() << 2; - cam_mul[1] = get4() + get4(); - cam_mul[2] = get4() << 2; - } - } - if (tag == 0x15 && type == 2 && is_raw) - fread (model, 64, 1, ifp); - if (strstr(make,"PENTAX")) { - if (tag == 0x1b) tag = 0x1018; - if (tag == 0x1c) tag = 0x1017; - } - if (tag == 0x1d) - while ((c = fgetc(ifp)) && c != EOF) - serial = serial*10 + (isdigit(c) ? c - '0' : c % 10); - if (tag == 0x81 && type == 4) { - data_offset = get4(); - fseek (ifp, data_offset + 41, SEEK_SET); - raw_height = get2() * 2; - raw_width = get2(); - filters = 0x61616161; - } - if (tag == 0x29 && type == 1) { - c = wbi < 18 ? "012347800000005896"[wbi]-'0' : 0; - fseek (ifp, 8 + c*32, SEEK_CUR); - FORC4 cam_mul[c ^ (c >> 1) ^ 1] = get4(); - } - if ((tag == 0x81 && type == 7) || - (tag == 0x100 && type == 7) || - (tag == 0x280 && type == 1)) { - thumb_offset = ftell(ifp); - thumb_length = len; - } - if (tag == 0x88 && type == 4 && (thumb_offset = get4())) - thumb_offset += base; - if (tag == 0x89 && type == 4) - thumb_length = get4(); - if (tag == 0x8c || tag == 0x96) - meta_offset = ftell(ifp); - if (tag == 0x97) { - for (i=0; i < 4; i++) - ver97 = ver97 * 10 + fgetc(ifp)-'0'; - switch (ver97) { - case 100: - fseek (ifp, 68, SEEK_CUR); - FORC4 cam_mul[(c >> 1) | ((c & 1) << 1)] = get2(); - break; - case 102: - fseek (ifp, 6, SEEK_CUR); - goto get2_rggb; - case 103: - fseek (ifp, 16, SEEK_CUR); - FORC4 cam_mul[c] = get2(); - } - if (ver97 >= 200) { - if (ver97 != 205) fseek (ifp, 280, SEEK_CUR); - fread (buf97, 324, 1, ifp); - } - } - if (tag == 0xa1 && type == 7) { - order = 0x4949; - fseek (ifp, 140, SEEK_CUR); - FORC3 cam_mul[c] = get4(); - } - if (tag == 0xa4 && type == 3) { - fseek (ifp, wbi*48, SEEK_CUR); - FORC3 cam_mul[c] = get2(); - } - if (tag == 0xa7 && (unsigned) (ver97-200) < 17) { - ci = xlat[0][serial & 0xff]; - cj = xlat[1][fgetc(ifp)^fgetc(ifp)^fgetc(ifp)^fgetc(ifp)]; - ck = 0x60; - for (i=0; i < 324; i++) - buf97[i] ^= (cj += ci * ck++); - i = "66666>666;6A;:;55"[ver97-200] - '0'; - FORC4 cam_mul[c ^ (c >> 1) ^ (i & 1)] = - sget2 (buf97 + (i & -2) + c*2); - } - if (tag == 0x200 && len == 3) - shot_order = (get4(),get4()); - if (tag == 0x200 && len == 4) - FORC4 cblack[c ^ c >> 1] = get2(); - if (tag == 0x201 && len == 4) - goto get2_rggb; - if (tag == 0x220 && type == 7) - meta_offset = ftell(ifp); - if (tag == 0x401 && type == 4 && len == 4) - FORC4 cblack[c ^ c >> 1] = get4(); - if (tag == 0xe01) { /* Nikon Capture Note */ - order = 0x4949; - fseek (ifp, 22, SEEK_CUR); - for (offset=22; offset+22 < len; offset += 22+i) { - tag = get4(); - fseek (ifp, 14, SEEK_CUR); - i = get4()-4; - if (tag == 0x76a43207) flip = get2(); - else fseek (ifp, i, SEEK_CUR); - } - } - if (tag == 0xe80 && len == 256 && type == 7) { - fseek (ifp, 48, SEEK_CUR); - cam_mul[0] = get2() * 508 * 1.078 / 0x10000; - cam_mul[2] = get2() * 382 * 1.173 / 0x10000; - } - if (tag == 0xf00 && type == 7) { - if (len == 614) - fseek (ifp, 176, SEEK_CUR); - else if (len == 734 || len == 1502) - fseek (ifp, 148, SEEK_CUR); - else goto next; - goto get2_256; - } - if ((tag == 0x1011 && len == 9) || tag == 0x20400200) - for (i=0; i < 3; i++) - FORC3 cmatrix[i][c] = ((short) get2()) / 256.0; - if ((tag == 0x1012 || tag == 0x20400600) && len == 4) - FORC4 cblack[c ^ c >> 1] = get2(); - if (tag == 0x1017 || tag == 0x20400100) - cam_mul[0] = get2() / 256.0; - if (tag == 0x1018 || tag == 0x20400100) - cam_mul[2] = get2() / 256.0; - if (tag == 0x2011 && len == 2) { -get2_256: - order = 0x4d4d; - cam_mul[0] = get2() / 256.0; - cam_mul[2] = get2() / 256.0; - } - if ((tag | 0x70) == 0x2070 && type == 4) - fseek (ifp, get4()+base, SEEK_SET); - if (tag == 0x2010 && type != 7) - load_raw = &CLASS olympus_load_raw; - if (tag == 0x2020) - parse_thumb_note (base, 257, 258); - if (tag == 0x2040) - parse_makernote (base, 0x2040); - if (tag == 0xb028) { - fseek (ifp, get4()+base, SEEK_SET); - parse_thumb_note (base, 136, 137); - } - if (tag == 0x4001 && len > 500) { - i = len == 582 ? 50 : len == 653 ? 68 : len == 5120 ? 142 : 126; - fseek (ifp, i, SEEK_CUR); -get2_rggb: - FORC4 cam_mul[c ^ (c >> 1)] = get2(); - i = len == 1312 ? 112:22; - fseek (ifp, i, SEEK_CUR); - FORC4 sraw_mul[c ^ (c >> 1)] = get2(); - } - if (tag == 0xa021) - FORC4 cam_mul[c ^ (c >> 1)] = get4(); - if (tag == 0xa028) - FORC4 cam_mul[c ^ (c >> 1)] -= get4(); -next: - fseek (ifp, save, SEEK_SET); - } -quit: - order = sorder; -} - -/* - Since the TIFF DateTime string has no timezone information, - assume that the camera's clock was set to Universal Time. - */ -void CLASS get_timestamp (int reversed) -{ - struct tm t; - char str[20]; - int i; - - str[19] = 0; - if (reversed) - for (i=19; i--; ) str[i] = fgetc(ifp); - else - fread (str, 19, 1, ifp); - memset (&t, 0, sizeof t); - if (sscanf (str, "%d:%d:%d %d:%d:%d", &t.tm_year, &t.tm_mon, - &t.tm_mday, &t.tm_hour, &t.tm_min, &t.tm_sec) != 6) - return; - t.tm_year -= 1900; - t.tm_mon -= 1; - t.tm_isdst = -1; - if (mktime(&t) > 0) - timestamp = mktime(&t); -} - -void CLASS parse_exif (int base) -{ - unsigned kodak, entries, tag, type, len, save, c; - double expo; - - kodak = !strncmp(make,"EASTMAN",7) && tiff_nifds < 3; - entries = get2(); - while (entries--) { - tiff_get (base, &tag, &type, &len, &save); - switch (tag) { - case 33434: shutter = getreal(type); break; - case 33437: aperture = getreal(type); break; - case 34855: iso_speed = get2(); break; - case 36867: - case 36868: get_timestamp(0); break; - case 37377: if ((expo = -getreal(type)) < 128) - shutter = pow (2, expo); break; - case 37378: aperture = pow (2, getreal(type)/2); break; - case 37386: focal_len = getreal(type); break; - case 37500: parse_makernote (base, 0); break; - case 40962: if (kodak) raw_width = get4(); break; - case 40963: if (kodak) raw_height = get4(); break; - case 41730: - if (get4() == 0x20002) - for (exif_cfa=c=0; c < 8; c+=2) - exif_cfa |= fgetc(ifp) * 0x01010101 << c; - } - fseek (ifp, save, SEEK_SET); - } -} - -void CLASS parse_gps (int base) -{ - unsigned entries, tag, type, len, save, c; - - entries = get2(); - while (entries--) { - tiff_get (base, &tag, &type, &len, &save); - switch (tag) { - case 1: case 3: case 5: - gpsdata[29+tag/2] = getc(ifp); break; - case 2: case 4: case 7: - FORC(6) gpsdata[tag/3*6+c] = get4(); break; - case 6: - FORC(2) gpsdata[18+c] = get4(); break; - case 18: case 29: - fgets ((char *) (gpsdata+14+tag/3), MIN(len,12), ifp); - } - fseek (ifp, save, SEEK_SET); - } -} - -void CLASS romm_coeff (float romm_cam[3][3]) -{ - static const float rgb_romm[3][3] = /* ROMM == Kodak ProPhoto */ - { { 2.034193, -0.727420, -0.306766 }, - { -0.228811, 1.231729, -0.002922 }, - { -0.008565, -0.153273, 1.161839 } }; - int i, j, k; - - for (i=0; i < 3; i++) - for (j=0; j < 3; j++) - for (cmatrix[i][j] = k=0; k < 3; k++) - cmatrix[i][j] += rgb_romm[i][k] * romm_cam[k][j]; -} - -void CLASS parse_mos (int offset) -{ - char data[40]; - int skip, from, i, c, neut[4], planes=0, frot=0; - static const char *mod[] = - { "","DCB2","Volare","Cantare","CMost","Valeo 6","Valeo 11","Valeo 22", - "Valeo 11p","Valeo 17","","Aptus 17","Aptus 22","Aptus 75","Aptus 65", - "Aptus 54S","Aptus 65S","Aptus 75S","AFi 5","AFi 6","AFi 7", - "","","","","","","","","","","","","","","","","","AFi-II 12" }; - float romm_cam[3][3]; - - fseek (ifp, offset, SEEK_SET); - while (1) { - if (get4() != 0x504b5453) break; - get4(); - fread (data, 1, 40, ifp); - skip = get4(); - from = ftell(ifp); - if (!strcmp(data,"JPEG_preview_data")) { - thumb_offset = from; - thumb_length = skip; - } - if (!strcmp(data,"icc_camera_profile")) { - profile_offset = from; - profile_length = skip; - } - if (!strcmp(data,"ShootObj_back_type")) { - fscanf (ifp, "%d", &i); - if ((unsigned) i < sizeof mod / sizeof (*mod)) - strcpy (model, mod[i]); - } - if (!strcmp(data,"icc_camera_to_tone_matrix")) { - for (i=0; i < 9; i++) - romm_cam[0][i] = int_to_float(get4()); - romm_coeff (romm_cam); - } - if (!strcmp(data,"CaptProf_color_matrix")) { - for (i=0; i < 9; i++) - fscanf (ifp, "%f", &romm_cam[0][i]); - romm_coeff (romm_cam); - } - if (!strcmp(data,"CaptProf_number_of_planes")) - fscanf (ifp, "%d", &planes); - if (!strcmp(data,"CaptProf_raw_data_rotation")) - fscanf (ifp, "%d", &flip); - if (!strcmp(data,"CaptProf_mosaic_pattern")) - FORC4 { - fscanf (ifp, "%d", &i); - if (i == 1) frot = c ^ (c >> 1); - } - if (!strcmp(data,"ImgProf_rotation_angle")) { - fscanf (ifp, "%d", &i); - flip = i - flip; - } - if (!strcmp(data,"NeutObj_neutrals") && !cam_mul[0]) { - FORC4 fscanf (ifp, "%d", neut+c); - FORC3 cam_mul[c] = (float) neut[0] / neut[c+1]; - } - if (!strcmp(data,"Rows_data")) - load_flags = get4(); - parse_mos (from); - fseek (ifp, skip+from, SEEK_SET); - } - if (planes) - filters = (planes == 1) * 0x01010101 * - (uchar) "\x94\x61\x16\x49"[(flip/90 + frot) & 3]; -} - -void CLASS linear_table (unsigned len) -{ - int i; - if (len > 0x1000) len = 0x1000; - read_shorts (curve, len); - for (i=len; i < 0x1000; i++) - curve[i] = curve[i-1]; - maximum = curve[0xfff]; -} - -void CLASS parse_kodak_ifd (int base) -{ - unsigned entries, tag, type, len, save; - int i, c, wbi=-2, wbtemp=6500; - float mul[3]={1,1,1}, num; - static const int wbtag[] = { 64037,64040,64039,64041,-1,-1,64042 }; - - entries = get2(); - if (entries > 1024) return; - while (entries--) { - tiff_get (base, &tag, &type, &len, &save); - if (tag == 1020) wbi = getint(type); - if (tag == 1021 && len == 72) { /* WB set in software */ - fseek (ifp, 40, SEEK_CUR); - FORC3 cam_mul[c] = 2048.0 / get2(); - wbi = -2; - } - if (tag == 2118) wbtemp = getint(type); - if (tag == 2130 + wbi) - FORC3 mul[c] = getreal(type); - if (tag == 2140 + wbi && wbi >= 0) - FORC3 { - for (num=i=0; i < 4; i++) - num += getreal(type) * pow (wbtemp/100.0, i); - cam_mul[c] = 2048 / (num * mul[c]); - } - if (tag == 2317) linear_table (len); - if (tag == 6020) iso_speed = getint(type); - if (tag == 64013) wbi = fgetc(ifp); - if ((unsigned) wbi < 7 && tag == wbtag[wbi]) - FORC3 cam_mul[c] = get4(); - if (tag == 64019) width = getint(type); - if (tag == 64020) height = (getint(type)+1) & -2; - fseek (ifp, save, SEEK_SET); - } -} - -void CLASS parse_minolta (int base); -int CLASS parse_tiff (int base); - -int CLASS parse_tiff_ifd (int base) -{ - unsigned entries, tag, type, len, plen=16, save; - int ifd, use_cm=0, cfa, i, j, c, ima_len=0; - int blrr=1, blrc=1, dblack[] = { 0,0,0,0 }; - char software[64], *cbuf, *cp; - uchar cfa_pat[16], cfa_pc[] = { 0,1,2,3 }, tab[256]; - double cc[4][4], cm[4][3], cam_xyz[4][3], num; - double ab[]={ 1,1,1,1 }, asn[] = { 0,0,0,0 }, xyz[] = { 1,1,1 }; - unsigned sony_curve[] = { 0,0,0,0,0,4095 }; - unsigned *buf, sony_offset=0, sony_length=0, sony_key=0; - struct jhead jh; - FILE *sfp; - - if (tiff_nifds >= sizeof tiff_ifd / sizeof tiff_ifd[0]) - return 1; - ifd = tiff_nifds++; - for (j=0; j < 4; j++) - for (i=0; i < 4; i++) - cc[j][i] = i == j; - entries = get2(); - if (entries > 512) return 1; - while (entries--) { - tiff_get (base, &tag, &type, &len, &save); - switch (tag) { - case 5: width = get2(); break; - case 6: height = get2(); break; - case 7: width += get2(); break; - case 9: filters = get2(); break; - case 17: case 18: - if (type == 3 && len == 1) - cam_mul[(tag-17)*2] = get2() / 256.0; - break; - case 23: - if (type == 3) iso_speed = get2(); - break; - case 36: case 37: case 38: - cam_mul[tag-0x24] = get2(); - break; - case 39: - if (len < 50 || cam_mul[0]) break; - fseek (ifp, 12, SEEK_CUR); - FORC3 cam_mul[c] = get2(); - break; - case 46: - if (type != 7 || fgetc(ifp) != 0xff || fgetc(ifp) != 0xd8) break; - thumb_offset = ftell(ifp) - 2; - thumb_length = len; - break; - case 61440: /* Fuji HS10 table */ - parse_tiff_ifd (base); - break; - case 2: case 256: case 61441: /* ImageWidth */ - tiff_ifd[ifd].width = getint(type); - break; - case 3: case 257: case 61442: /* ImageHeight */ - tiff_ifd[ifd].height = getint(type); - break; - case 258: /* BitsPerSample */ - case 61443: - tiff_ifd[ifd].samples = len & 7; - tiff_ifd[ifd].bps = getint(type); - break; - case 61446: - raw_height = 0; - load_raw = &CLASS packed_load_raw; - load_flags = get4() && (filters=0x16161616) ? 24:80; - break; - case 259: /* Compression */ - tiff_ifd[ifd].comp = getint(type); - break; - case 262: /* PhotometricInterpretation */ - tiff_ifd[ifd].phint = get2(); - break; - case 270: /* ImageDescription */ - fread (desc, 512, 1, ifp); - break; - case 271: /* Make */ - fgets (make, 64, ifp); - break; - case 272: /* Model */ - fgets (model, 64, ifp); - break; - case 280: /* Panasonic RW2 offset */ - if (type != 4) break; - load_raw = &CLASS panasonic_load_raw; - load_flags = 0x2008; - case 273: /* StripOffset */ - case 513: /* JpegIFOffset */ - case 61447: - tiff_ifd[ifd].offset = get4()+base; - if (!tiff_ifd[ifd].bps && tiff_ifd[ifd].offset > 0) { - fseek (ifp, tiff_ifd[ifd].offset, SEEK_SET); - if (ljpeg_start (&jh, 1)) { - tiff_ifd[ifd].comp = 6; - tiff_ifd[ifd].width = jh.wide; - tiff_ifd[ifd].height = jh.high; - tiff_ifd[ifd].bps = jh.bits; - tiff_ifd[ifd].samples = jh.clrs; - if (!(jh.sraw || (jh.clrs & 1))) - tiff_ifd[ifd].width *= jh.clrs; - i = order; - parse_tiff (tiff_ifd[ifd].offset + 12); - order = i; - } - } - break; - case 274: /* Orientation */ - tiff_ifd[ifd].flip = "50132467"[get2() & 7]-'0'; - break; - case 277: /* SamplesPerPixel */ - tiff_ifd[ifd].samples = getint(type) & 7; - break; - case 279: /* StripByteCounts */ - case 514: - case 61448: - tiff_ifd[ifd].bytes = get4(); - break; - case 61454: - FORC3 cam_mul[(4-c) % 3] = getint(type); - break; - case 305: case 11: /* Software */ - fgets (software, 64, ifp); - if (!strncmp(software,"Adobe",5) || - !strncmp(software,"dcraw",5) || - !strncmp(software,"UFRaw",5) || - !strncmp(software,"Bibble",6) || - !strncmp(software,"Nikon Scan",10) || - !strcmp (software,"Digital Photo Professional")) - is_raw = 0; - break; - case 306: /* DateTime */ - get_timestamp(0); - break; - case 315: /* Artist */ - fread (artist, 64, 1, ifp); - break; - case 322: /* TileWidth */ - tiff_ifd[ifd].tile_width = getint(type); - break; - case 323: /* TileLength */ - tiff_ifd[ifd].tile_length = getint(type); - break; - case 324: /* TileOffsets */ - tiff_ifd[ifd].offset = len > 1 ? ftell(ifp) : get4(); - if (len == 4) { - load_raw = &CLASS sinar_4shot_load_raw; - is_raw = 5; - } - break; - case 330: /* SubIFDs */ - if (!strcmp(model,"DSLR-A100") && tiff_ifd[ifd].width == 3872) { - load_raw = &CLASS sony_arw_load_raw; - data_offset = get4()+base; - ifd++; break; - } - while (len--) { - i = ftell(ifp); - fseek (ifp, get4()+base, SEEK_SET); - if (parse_tiff_ifd (base)) break; - fseek (ifp, i+4, SEEK_SET); - } - break; - case 400: - strcpy (make, "Sarnoff"); - maximum = 0xfff; - break; - case 28688: - FORC4 sony_curve[c+1] = get2() >> 2 & 0xfff; - for (i=0; i < 5; i++) - for (j = sony_curve[i]+1; j <= sony_curve[i+1]; j++) - curve[j] = curve[j-1] + (1 << i); - break; - case 29184: sony_offset = get4(); break; - case 29185: sony_length = get4(); break; - case 29217: sony_key = get4(); break; - case 29264: - parse_minolta (ftell(ifp)); - raw_width = 0; - break; - case 29443: - FORC4 cam_mul[c ^ (c < 2)] = get2(); - break; - case 29459: - FORC4 cam_mul[c] = get2(); - i = (cam_mul[1] == 1024 && cam_mul[2] == 1024) << 1; - SWAP (cam_mul[i],cam_mul[i+1]) - break; - case 33405: /* Model2 */ - fgets (model2, 64, ifp); - break; - case 33422: /* CFAPattern */ - case 64777: /* Kodak P-series */ - if ((plen=len) > 16) plen = 16; - fread (cfa_pat, 1, plen, ifp); - for (colors=cfa=i=0; i < plen; i++) { - colors += !(cfa & (1 << cfa_pat[i])); - cfa |= 1 << cfa_pat[i]; - } - if (cfa == 070) memcpy (cfa_pc,"\003\004\005",3); /* CMY */ - if (cfa == 072) memcpy (cfa_pc,"\005\003\004\001",4); /* GMCY */ - goto guess_cfa_pc; - case 33424: - case 65024: - fseek (ifp, get4()+base, SEEK_SET); - parse_kodak_ifd (base); - break; - case 33434: /* ExposureTime */ - shutter = getreal(type); - break; - case 33437: /* FNumber */ - aperture = getreal(type); - break; - case 34306: /* Leaf white balance */ - FORC4 cam_mul[c ^ 1] = 4096.0 / get2(); - break; - case 34307: /* Leaf CatchLight color matrix */ - fread (software, 1, 7, ifp); - if (strncmp(software,"MATRIX",6)) break; - colors = 4; - for (raw_color = i=0; i < 3; i++) { - FORC4 fscanf (ifp, "%f", &rgb_cam[i][c^1]); - if (!use_camera_wb) continue; - num = 0; - FORC4 num += rgb_cam[i][c]; - FORC4 rgb_cam[i][c] /= num; - } - break; - case 34310: /* Leaf metadata */ - parse_mos (ftell(ifp)); - case 34303: - strcpy (make, "Leaf"); - break; - case 34665: /* EXIF tag */ - fseek (ifp, get4()+base, SEEK_SET); - parse_exif (base); - break; - case 34853: /* GPSInfo tag */ - fseek (ifp, get4()+base, SEEK_SET); - parse_gps (base); - break; - case 34675: /* InterColorProfile */ - case 50831: /* AsShotICCProfile */ - profile_offset = ftell(ifp); - profile_length = len; - break; - case 37122: /* CompressedBitsPerPixel */ - kodak_cbpp = get4(); - break; - case 37386: /* FocalLength */ - focal_len = getreal(type); - break; - case 37393: /* ImageNumber */ - shot_order = getint(type); - break; - case 37400: /* old Kodak KDC tag */ - for (raw_color = i=0; i < 3; i++) { - getreal(type); - FORC3 rgb_cam[i][c] = getreal(type); - } - break; - case 46275: /* Imacon tags */ - strcpy (make, "Imacon"); - data_offset = ftell(ifp); - ima_len = len; - break; - case 46279: - if (!ima_len) break; - fseek (ifp, 38, SEEK_CUR); - case 46274: - fseek (ifp, 40, SEEK_CUR); - raw_width = get4(); - raw_height = get4(); - left_margin = get4() & 7; - width = raw_width - left_margin - (get4() & 7); - top_margin = get4() & 7; - height = raw_height - top_margin - (get4() & 7); - if (raw_width == 7262) { - height = 5444; - width = 7244; - left_margin = 7; - } - fseek (ifp, 52, SEEK_CUR); - FORC3 cam_mul[c] = getreal(11); - fseek (ifp, 114, SEEK_CUR); - flip = (get2() >> 7) * 90; - if (width * height * 6 == ima_len) { - if (flip % 180 == 90) SWAP(width,height); - raw_width = width; - raw_height = height; - left_margin = top_margin = filters = flip = 0; - } - sprintf (model, "Ixpress %d-Mp", height*width/1000000); - load_raw = &CLASS imacon_full_load_raw; - if (filters) { - if (left_margin & 1) filters = 0x61616161; - load_raw = &CLASS unpacked_load_raw; - } - maximum = 0xffff; - break; - case 50454: /* Sinar tag */ - case 50455: - if (!(cbuf = (char *) malloc(len))) break; - fread (cbuf, 1, len, ifp); - for (cp = cbuf-1; cp && cp < cbuf+len; cp = strchr(cp,'\n')) - if (!strncmp (++cp,"Neutral ",8)) - sscanf (cp+8, "%f %f %f", cam_mul, cam_mul+1, cam_mul+2); - free (cbuf); - break; - case 50458: - if (!make[0]) strcpy (make, "Hasselblad"); - break; - case 50459: /* Hasselblad tag */ - i = order; - j = ftell(ifp); - c = tiff_nifds; - order = get2(); - fseek (ifp, j+(get2(),get4()), SEEK_SET); - parse_tiff_ifd (j); - maximum = 0xffff; - tiff_nifds = c; - order = i; - break; - case 50706: /* DNGVersion */ - FORC4 dng_version = (dng_version << 8) + fgetc(ifp); - if (!make[0]) strcpy (make, "DNG"); - is_raw = 1; - break; - case 50710: /* CFAPlaneColor */ - if (len > 4) len = 4; - colors = len; - fread (cfa_pc, 1, colors, ifp); -guess_cfa_pc: - FORCC tab[cfa_pc[c]] = c; - cdesc[c] = 0; - for (i=16; i--; ) - filters = filters << 2 | tab[cfa_pat[i % plen]]; - break; - case 50711: /* CFALayout */ - if (get2() == 2) { - fuji_width = 1; - filters = 0x49494949; - } - break; - case 291: - case 50712: /* LinearizationTable */ - linear_table (len); - break; - case 50713: /* BlackLevelRepeatDim */ - blrr = get2(); - blrc = get2(); - break; - case 61450: - blrr = blrc = 2; - case 50714: /* BlackLevel */ - black = getreal(type); - if (!filters || !~filters) break; - dblack[0] = black; - dblack[1] = (blrc == 2) ? getreal(type):dblack[0]; - dblack[2] = (blrr == 2) ? getreal(type):dblack[0]; - dblack[3] = (blrc == 2 && blrr == 2) ? getreal(type):dblack[1]; - if (colors == 3) - filters |= ((filters >> 2 & 0x22222222) | - (filters << 2 & 0x88888888)) & filters << 1; - FORC4 cblack[filters >> (c << 1) & 3] = dblack[c]; - black = 0; - break; - case 50715: /* BlackLevelDeltaH */ - case 50716: /* BlackLevelDeltaV */ - for (num=i=0; i < len; i++) - num += getreal(type); - black += num/len + 0.5; - break; - case 50717: /* WhiteLevel */ - maximum = getint(type); - break; - case 50718: /* DefaultScale */ - pixel_aspect = getreal(type); - pixel_aspect /= getreal(type); - break; - case 50721: /* ColorMatrix1 */ - case 50722: /* ColorMatrix2 */ - FORCC for (j=0; j < 3; j++) - cm[c][j] = getreal(type); - use_cm = 1; - break; - case 50723: /* CameraCalibration1 */ - case 50724: /* CameraCalibration2 */ - for (i=0; i < colors; i++) - FORCC cc[i][c] = getreal(type); - break; - case 50727: /* AnalogBalance */ - FORCC ab[c] = getreal(type); - break; - case 50728: /* AsShotNeutral */ - FORCC asn[c] = getreal(type); - break; - case 50729: /* AsShotWhiteXY */ - xyz[0] = getreal(type); - xyz[1] = getreal(type); - xyz[2] = 1 - xyz[0] - xyz[1]; - FORC3 xyz[c] /= d65_white[c]; - break; - case 50740: /* DNGPrivateData */ - if (dng_version) break; - parse_minolta (j = get4()+base); - fseek (ifp, j, SEEK_SET); - parse_tiff_ifd (base); - break; - case 50752: - read_shorts (cr2_slice, 3); - break; - case 50829: /* ActiveArea */ - top_margin = getint(type); - left_margin = getint(type); - height = getint(type) - top_margin; - width = getint(type) - left_margin; - break; - case 50830: /* MaskedAreas */ - for (i=0; i < len && i < 32; i++) - mask[0][i] = getint(type); - black = 0; - break; - case 51009: /* OpcodeList2 */ - meta_offset = ftell(ifp); - break; - case 64772: /* Kodak P-series */ - if (len < 13) break; - fseek (ifp, 16, SEEK_CUR); - data_offset = get4(); - fseek (ifp, 28, SEEK_CUR); - data_offset += get4(); - load_raw = &CLASS packed_load_raw; - break; - case 65026: - if (type == 2) fgets (model2, 64, ifp); - } - fseek (ifp, save, SEEK_SET); - } - if (sony_length && (buf = (unsigned *) malloc(sony_length))) { - fseek (ifp, sony_offset, SEEK_SET); - fread (buf, sony_length, 1, ifp); - sony_decrypt (buf, sony_length/4, 1, sony_key); - sfp = ifp; - if ((ifp = tmpfile())) { - fwrite (buf, sony_length, 1, ifp); - fseek (ifp, 0, SEEK_SET); - parse_tiff_ifd (-sony_offset); - fclose (ifp); - } - ifp = sfp; - free (buf); - } - for (i=0; i < colors; i++) - FORCC cc[i][c] *= ab[i]; - if (use_cm) { - FORCC for (i=0; i < 3; i++) - for (cam_xyz[c][i]=j=0; j < colors; j++) - cam_xyz[c][i] += cc[c][j] * cm[j][i] * xyz[i]; - cam_xyz_coeff (cam_xyz); - } - if (asn[0]) { - cam_mul[3] = 0; - FORCC cam_mul[c] = 1 / asn[c]; - } - if (!use_cm) - FORCC pre_mul[c] /= cc[c][c]; - return 0; -} - -int CLASS parse_tiff (int base) -{ - int doff; - - fseek (ifp, base, SEEK_SET); - order = get2(); - if (order != 0x4949 && order != 0x4d4d) return 0; - get2(); - while ((doff = get4())) { - fseek (ifp, doff+base, SEEK_SET); - if (parse_tiff_ifd (base)) break; - } - return 1; -} - -void CLASS apply_tiff() -{ - int max_samp=0, raw=-1, thm=-1, i; - struct jhead jh; - - thumb_misc = 16; - if (thumb_offset) { - fseek (ifp, thumb_offset, SEEK_SET); - if (ljpeg_start (&jh, 1)) { - thumb_misc = jh.bits; - thumb_width = jh.wide; - thumb_height = jh.high; - } - } - for (i=0; i < tiff_nifds; i++) { - if (max_samp < tiff_ifd[i].samples) - max_samp = tiff_ifd[i].samples; - if (max_samp > 3) max_samp = 3; - if ((tiff_ifd[i].comp != 6 || tiff_ifd[i].samples != 3) && - (tiff_ifd[i].width | tiff_ifd[i].height) < 0x10000 && - tiff_ifd[i].width*tiff_ifd[i].height > raw_width*raw_height) { - raw_width = tiff_ifd[i].width; - raw_height = tiff_ifd[i].height; - tiff_bps = tiff_ifd[i].bps; - tiff_compress = tiff_ifd[i].comp; - data_offset = tiff_ifd[i].offset; - tiff_flip = tiff_ifd[i].flip; - tiff_samples = tiff_ifd[i].samples; - tile_width = tiff_ifd[i].tile_width; - tile_length = tiff_ifd[i].tile_length; - raw = i; - } - } - if (!tile_width ) tile_width = INT_MAX; - if (!tile_length) tile_length = INT_MAX; - for (i=tiff_nifds; i--; ) - if (tiff_ifd[i].flip) tiff_flip = tiff_ifd[i].flip; - if (raw >= 0 && !load_raw) - switch (tiff_compress) { - case 32767: - if (tiff_ifd[raw].bytes == raw_width*raw_height) { - tiff_bps = 12; - load_raw = &CLASS sony_arw2_load_raw; break; - } - if (tiff_ifd[raw].bytes*8 != raw_width*raw_height*tiff_bps) { - raw_height += 8; - load_raw = &CLASS sony_arw_load_raw; break; - } - load_flags = 79; - case 32769: - load_flags++; - case 32770: - case 32773: goto slr; - case 0: case 1: - if (tiff_ifd[raw].bytes*5 == raw_width*raw_height*8) { - load_flags = 81; - tiff_bps = 12; - } slr: - switch (tiff_bps) { - case 8: load_raw = &CLASS eight_bit_load_raw; break; - case 12: if (tiff_ifd[raw].phint == 2) - load_flags = 6; - load_raw = &CLASS packed_load_raw; break; - case 14: load_flags = 0; - case 16: load_raw = &CLASS unpacked_load_raw; break; - } - break; - case 6: case 7: case 99: - load_raw = &CLASS lossless_jpeg_load_raw; break; - case 262: - load_raw = &CLASS kodak_262_load_raw; break; - case 34713: - load_raw = &CLASS nikon_load_raw; break; - case 34892: - load_raw = &CLASS lossy_dng_load_raw; break; - case 65535: - load_raw = &CLASS pentax_load_raw; break; - case 65000: - switch (tiff_ifd[raw].phint) { - case 2: load_raw = &CLASS kodak_rgb_load_raw; filters = 0; break; - case 6: load_raw = &CLASS kodak_ycbcr_load_raw; filters = 0; break; - case 32803: load_raw = &CLASS kodak_65000_load_raw; - } - case 32867: break; - default: is_raw = 0; - } - if (!dng_version) - if ( (tiff_samples == 3 && tiff_ifd[raw].bytes && - tiff_bps != 14 && tiff_bps != 2048 && tiff_compress != 32770) - || (tiff_bps == 8 && !strstr(make,"KODAK") && !strstr(make,"Kodak") && - !strstr(model2,"DEBUG RAW"))) - is_raw = 0; - for (i=0; i < tiff_nifds; i++) - if (i != raw && tiff_ifd[i].samples == max_samp && - tiff_ifd[i].width * tiff_ifd[i].height / SQR(tiff_ifd[i].bps+1) > - thumb_width * thumb_height / SQR(thumb_misc+1) - && tiff_ifd[i].comp != 34892) { - thumb_width = tiff_ifd[i].width; - thumb_height = tiff_ifd[i].height; - thumb_offset = tiff_ifd[i].offset; - thumb_length = tiff_ifd[i].bytes; - thumb_misc = tiff_ifd[i].bps; - thm = i; - } - if (thm >= 0) { - thumb_misc |= tiff_ifd[thm].samples << 5; - switch (tiff_ifd[thm].comp) { - case 0: - write_thumb = &CLASS layer_thumb; - break; - case 1: - if (tiff_ifd[thm].bps <= 8) - write_thumb = &CLASS ppm_thumb; - else if (!strcmp(make,"Imacon")) - write_thumb = &CLASS ppm16_thumb; - else - thumb_load_raw = &CLASS kodak_thumb_load_raw; - break; - case 65000: - thumb_load_raw = tiff_ifd[thm].phint == 6 ? - &CLASS kodak_ycbcr_load_raw : &CLASS kodak_rgb_load_raw; - } - } -} - -void CLASS parse_minolta (int base) -{ - int save, tag, len, offset, high=0, wide=0, i, c; - short sorder=order; - - fseek (ifp, base, SEEK_SET); - if (fgetc(ifp) || fgetc(ifp)-'M' || fgetc(ifp)-'R') return; - order = fgetc(ifp) * 0x101; - offset = base + get4() + 8; - while ((save=ftell(ifp)) < offset) { - for (tag=i=0; i < 4; i++) - tag = tag << 8 | fgetc(ifp); - len = get4(); - switch (tag) { - case 0x505244: /* PRD */ - fseek (ifp, 8, SEEK_CUR); - high = get2(); - wide = get2(); - break; - case 0x574247: /* WBG */ - get4(); - i = strcmp(model,"DiMAGE A200") ? 0:3; - FORC4 cam_mul[c ^ (c >> 1) ^ i] = get2(); - break; - case 0x545457: /* TTW */ - parse_tiff (ftell(ifp)); - data_offset = offset; - } - fseek (ifp, save+len+8, SEEK_SET); - } - raw_height = high; - raw_width = wide; - order = sorder; -} - -/* - Many cameras have a "debug mode" that writes JPEG and raw - at the same time. The raw file has no header, so try to - to open the matching JPEG file and read its metadata. - */ -void CLASS parse_external_jpeg() -{ - const char *file, *ext; - char *jname, *jfile, *jext; - FILE *save=ifp; - - ext = strrchr (ifname, '.'); - file = strrchr (ifname, '/'); - if (!file) file = strrchr (ifname, '\\'); - if (!file) file = ifname-1; - file++; - if (!ext || strlen(ext) != 4 || ext-file != 8) return; - jname = (char *) malloc (strlen(ifname) + 1); - merror (jname, "parse_external_jpeg()"); - strcpy (jname, ifname); - jfile = file - ifname + jname; - jext = ext - ifname + jname; - if (strcasecmp (ext, ".jpg")) { - strcpy (jext, isupper(ext[1]) ? ".JPG":".jpg"); - if (isdigit(*file)) { - memcpy (jfile, file+4, 4); - memcpy (jfile+4, file, 4); - } - } else - while (isdigit(*--jext)) { - if (*jext != '9') { - (*jext)++; - break; - } - *jext = '0'; - } - if (strcmp (jname, ifname)) { - if ((ifp = fopen (jname, "rb"))) { - if (verbose) - fprintf (stderr,_("Reading metadata from %s ...\n"), jname); - parse_tiff (12); - thumb_offset = 0; - is_raw = 1; - fclose (ifp); - } - } - if (!timestamp) - fprintf (stderr,_("Failed to read metadata from %s\n"), jname); - free (jname); - ifp = save; -} - -/* - CIFF block 0x1030 contains an 8x8 white sample. - Load this into white[][] for use in scale_colors(). - */ -void CLASS ciff_block_1030() -{ - static const ushort key[] = { 0x410, 0x45f3 }; - int i, bpp, row, col, vbits=0; - unsigned long bitbuf=0; - - if ((get2(),get4()) != 0x80008 || !get4()) return; - bpp = get2(); - if (bpp != 10 && bpp != 12) return; - for (i=row=0; row < 8; row++) - for (col=0; col < 8; col++) { - if (vbits < bpp) { - bitbuf = bitbuf << 16 | (get2() ^ key[i++ & 1]); - vbits += 16; - } - white[row][col] = - bitbuf << (LONG_BIT - vbits) >> (LONG_BIT - bpp); - vbits -= bpp; - } -} - -/* - Parse a CIFF file, better known as Canon CRW format. - */ -void CLASS parse_ciff (int offset, int length) -{ - int tboff, nrecs, c, type, len, save, wbi=-1; - ushort key[] = { 0x410, 0x45f3 }; - - fseek (ifp, offset+length-4, SEEK_SET); - tboff = get4() + offset; - fseek (ifp, tboff, SEEK_SET); - nrecs = get2(); - if (nrecs > 100) return; - while (nrecs--) { - type = get2(); - len = get4(); - save = ftell(ifp) + 4; - fseek (ifp, offset+get4(), SEEK_SET); - if ((((type >> 8) + 8) | 8) == 0x38) - parse_ciff (ftell(ifp), len); /* Parse a sub-table */ - - if (type == 0x0810) - fread (artist, 64, 1, ifp); - if (type == 0x080a) { - fread (make, 64, 1, ifp); - fseek (ifp, strlen(make) - 63, SEEK_CUR); - fread (model, 64, 1, ifp); - } - if (type == 0x1810) { - fseek (ifp, 12, SEEK_CUR); - flip = get4(); - } - if (type == 0x1835) /* Get the decoder table */ - tiff_compress = get4(); - if (type == 0x2007) { - thumb_offset = ftell(ifp); - thumb_length = len; - } - if (type == 0x1818) { - shutter = pow (2, -int_to_float((get4(),get4()))); - aperture = pow (2, int_to_float(get4())/2); - } - if (type == 0x102a) { - iso_speed = pow (2, (get4(),get2())/32.0 - 4) * 50; - aperture = pow (2, (get2(),(short)get2())/64.0); - shutter = pow (2,-((short)get2())/32.0); - wbi = (get2(),get2()); - if (wbi > 17) wbi = 0; - fseek (ifp, 32, SEEK_CUR); - if (shutter > 1e6) shutter = get2()/10.0; - } - if (type == 0x102c) { - if (get2() > 512) { /* Pro90, G1 */ - fseek (ifp, 118, SEEK_CUR); - FORC4 cam_mul[c ^ 2] = get2(); - } else { /* G2, S30, S40 */ - fseek (ifp, 98, SEEK_CUR); - FORC4 cam_mul[c ^ (c >> 1) ^ 1] = get2(); - } - } - if (type == 0x0032) { - if (len == 768) { /* EOS D30 */ - fseek (ifp, 72, SEEK_CUR); - FORC4 cam_mul[c ^ (c >> 1)] = 1024.0 / get2(); - if (!wbi) cam_mul[0] = -1; /* use my auto white balance */ - } else if (!cam_mul[0]) { - if (get2() == key[0]) /* Pro1, G6, S60, S70 */ - c = (strstr(model,"Pro1") ? - "012346000000000000":"01345:000000006008")[wbi]-'0'+ 2; - else { /* G3, G5, S45, S50 */ - c = "023457000000006000"[wbi]-'0'; - key[0] = key[1] = 0; - } - fseek (ifp, 78 + c*8, SEEK_CUR); - FORC4 cam_mul[c ^ (c >> 1) ^ 1] = get2() ^ key[c & 1]; - if (!wbi) cam_mul[0] = -1; - } - } - if (type == 0x10a9) { /* D60, 10D, 300D, and clones */ - if (len > 66) wbi = "0134567028"[wbi]-'0'; - fseek (ifp, 2 + wbi*8, SEEK_CUR); - FORC4 cam_mul[c ^ (c >> 1)] = get2(); - } - if (type == 0x1030 && (0x18040 >> wbi & 1)) - ciff_block_1030(); /* all that don't have 0x10a9 */ - if (type == 0x1031) { - raw_width = (get2(),get2()); - raw_height = get2(); - } - if (type == 0x5029) { - focal_len = len >> 16; - if ((len & 0xffff) == 2) focal_len /= 32; - } - if (type == 0x5813) flash_used = int_to_float(len); - if (type == 0x5814) canon_ev = int_to_float(len); - if (type == 0x5817) shot_order = len; - if (type == 0x5834) unique_id = len; - if (type == 0x580e) timestamp = len; - if (type == 0x180e) timestamp = get4(); -#ifdef LOCALTIME - if ((type | 0x4000) == 0x580e) - timestamp = mktime (gmtime (×tamp)); -#endif - fseek (ifp, save, SEEK_SET); - } -} - -void CLASS parse_rollei() -{ - char line[128], *val; - struct tm t; - - fseek (ifp, 0, SEEK_SET); - memset (&t, 0, sizeof t); - do { - fgets (line, 128, ifp); - if ((val = strchr(line,'='))) - *val++ = 0; - else - val = line + strlen(line); - if (!strcmp(line,"DAT")) - sscanf (val, "%d.%d.%d", &t.tm_mday, &t.tm_mon, &t.tm_year); - if (!strcmp(line,"TIM")) - sscanf (val, "%d:%d:%d", &t.tm_hour, &t.tm_min, &t.tm_sec); - if (!strcmp(line,"HDR")) - thumb_offset = atoi(val); - if (!strcmp(line,"X ")) - raw_width = atoi(val); - if (!strcmp(line,"Y ")) - raw_height = atoi(val); - if (!strcmp(line,"TX ")) - thumb_width = atoi(val); - if (!strcmp(line,"TY ")) - thumb_height = atoi(val); - } while (strncmp(line,"EOHD",4)); - data_offset = thumb_offset + thumb_width * thumb_height * 2; - t.tm_year -= 1900; - t.tm_mon -= 1; - if (mktime(&t) > 0) - timestamp = mktime(&t); - strcpy (make, "Rollei"); - strcpy (model,"d530flex"); - write_thumb = &CLASS rollei_thumb; -} - -void CLASS parse_sinar_ia() -{ - int entries, off; - char str[8], *cp; - - order = 0x4949; - fseek (ifp, 4, SEEK_SET); - entries = get4(); - fseek (ifp, get4(), SEEK_SET); - while (entries--) { - off = get4(); get4(); - fread (str, 8, 1, ifp); - if (!strcmp(str,"META")) meta_offset = off; - if (!strcmp(str,"THUMB")) thumb_offset = off; - if (!strcmp(str,"RAW0")) data_offset = off; - } - fseek (ifp, meta_offset+20, SEEK_SET); - fread (make, 64, 1, ifp); - make[63] = 0; - if ((cp = strchr(make,' '))) { - strcpy (model, cp+1); - *cp = 0; - } - raw_width = get2(); - raw_height = get2(); - load_raw = &CLASS unpacked_load_raw; - thumb_width = (get4(),get2()); - thumb_height = get2(); - write_thumb = &CLASS ppm_thumb; - maximum = 0x3fff; -} - -void CLASS parse_phase_one (int base) -{ - unsigned entries, tag, type, len, data, save, i, c; - float romm_cam[3][3]; - char *cp; - - memset (&ph1, 0, sizeof ph1); - fseek (ifp, base, SEEK_SET); - order = get4() & 0xffff; - if (get4() >> 8 != 0x526177) return; /* "Raw" */ - fseek (ifp, get4()+base, SEEK_SET); - entries = get4(); - get4(); - while (entries--) { - tag = get4(); - type = get4(); - len = get4(); - data = get4(); - save = ftell(ifp); - fseek (ifp, base+data, SEEK_SET); - switch (tag) { - case 0x100: flip = "0653"[data & 3]-'0'; break; - case 0x106: - for (i=0; i < 9; i++) - romm_cam[0][i] = getreal(11); - romm_coeff (romm_cam); - break; - case 0x107: - FORC3 cam_mul[c] = getreal(11); - break; - case 0x108: raw_width = data; break; - case 0x109: raw_height = data; break; - case 0x10a: left_margin = data; break; - case 0x10b: top_margin = data; break; - case 0x10c: width = data; break; - case 0x10d: height = data; break; - case 0x10e: ph1.format = data; break; - case 0x10f: data_offset = data+base; break; - case 0x110: meta_offset = data+base; - meta_length = len; break; - case 0x112: ph1.key_off = save - 4; break; - case 0x210: ph1.tag_210 = int_to_float(data); break; - case 0x21a: ph1.tag_21a = data; break; - case 0x21c: strip_offset = data+base; break; - case 0x21d: ph1.black = data; break; - case 0x222: ph1.split_col = data; break; - case 0x223: ph1.black_off = data+base; break; - case 0x301: - model[63] = 0; - fread (model, 1, 63, ifp); - if ((cp = strstr(model," camera"))) *cp = 0; - } - fseek (ifp, save, SEEK_SET); - } - load_raw = ph1.format < 3 ? - &CLASS phase_one_load_raw : &CLASS phase_one_load_raw_c; - maximum = 0xffff; - strcpy (make, "Phase One"); - if (model[0]) return; - switch (raw_height) { - case 2060: strcpy (model,"LightPhase"); break; - case 2682: strcpy (model,"H 10"); break; - case 4128: strcpy (model,"H 20"); break; - case 5488: strcpy (model,"H 25"); break; - } -} - -void CLASS parse_fuji (int offset) -{ - unsigned entries, tag, len, save, c; - - fseek (ifp, offset, SEEK_SET); - entries = get4(); - if (entries > 255) return; - while (entries--) { - tag = get2(); - len = get2(); - save = ftell(ifp); - if (tag == 0x100) { - raw_height = get2(); - raw_width = get2(); - } else if (tag == 0x121) { - height = get2(); - if ((width = get2()) == 4284) width += 3; - } else if (tag == 0x130) { - fuji_layout = fgetc(ifp) >> 7; - fuji_width = !(fgetc(ifp) & 8); - } else if (tag == 0x2ff0) { - FORC4 cam_mul[c ^ 1] = get2(); - } else if (tag == 0xc000) { - c = order; - order = 0x4949; - width = get4(); - height = get4(); - order = c; - } - fseek (ifp, save+len, SEEK_SET); - } - height <<= fuji_layout; - width >>= fuji_layout; -} - -int CLASS parse_jpeg (int offset) -{ - int len, save, hlen, mark; - - fseek (ifp, offset, SEEK_SET); - if (fgetc(ifp) != 0xff || fgetc(ifp) != 0xd8) return 0; - - while (fgetc(ifp) == 0xff && (mark = fgetc(ifp)) != 0xda) { - order = 0x4d4d; - len = get2() - 2; - save = ftell(ifp); - if (mark == 0xc0 || mark == 0xc3) { - fgetc(ifp); - raw_height = get2(); - raw_width = get2(); - } - order = get2(); - hlen = get4(); - if (get4() == 0x48454150) /* "HEAP" */ - parse_ciff (save+hlen, len-hlen); - if (parse_tiff (save+6)) apply_tiff(); - fseek (ifp, save+len, SEEK_SET); - } - return 1; -} - -void CLASS parse_riff() -{ - unsigned i, size, end; - char tag[4], date[64], month[64]; - static const char mon[12][4] = - { "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec" }; - struct tm t; - - order = 0x4949; - fread (tag, 4, 1, ifp); - size = get4(); - end = ftell(ifp) + size; - if (!memcmp(tag,"RIFF",4) || !memcmp(tag,"LIST",4)) { - get4(); - while (ftell(ifp)+7 < end) - parse_riff(); - } else if (!memcmp(tag,"nctg",4)) { - while (ftell(ifp)+7 < end) { - i = get2(); - size = get2(); - if ((i+1) >> 1 == 10 && size == 20) - get_timestamp(0); - else fseek (ifp, size, SEEK_CUR); - } - } else if (!memcmp(tag,"IDIT",4) && size < 64) { - fread (date, 64, 1, ifp); - date[size] = 0; - memset (&t, 0, sizeof t); - if (sscanf (date, "%*s %s %d %d:%d:%d %d", month, &t.tm_mday, - &t.tm_hour, &t.tm_min, &t.tm_sec, &t.tm_year) == 6) { - for (i=0; i < 12 && strcasecmp(mon[i],month); i++); - t.tm_mon = i; - t.tm_year -= 1900; - if (mktime(&t) > 0) - timestamp = mktime(&t); - } - } else - fseek (ifp, size, SEEK_CUR); -} - -void CLASS parse_smal (int offset, int fsize) -{ - int ver; - - fseek (ifp, offset+2, SEEK_SET); - order = 0x4949; - ver = fgetc(ifp); - if (ver == 6) - fseek (ifp, 5, SEEK_CUR); - if (get4() != fsize) return; - if (ver > 6) data_offset = get4(); - raw_height = height = get2(); - raw_width = width = get2(); - strcpy (make, "SMaL"); - sprintf (model, "v%d %dx%d", ver, width, height); - if (ver == 6) load_raw = &CLASS smal_v6_load_raw; - if (ver == 9) load_raw = &CLASS smal_v9_load_raw; -} - -void CLASS parse_cine() -{ - unsigned off_head, off_setup, off_image, i; - - order = 0x4949; - fseek (ifp, 4, SEEK_SET); - is_raw = get2() == 2; - fseek (ifp, 14, SEEK_CUR); - is_raw *= get4(); - off_head = get4(); - off_setup = get4(); - off_image = get4(); - timestamp = get4(); - if ((i = get4())) timestamp = i; - fseek (ifp, off_head+4, SEEK_SET); - raw_width = get4(); - raw_height = get4(); - switch (get2(),get2()) { - case 8: load_raw = &CLASS eight_bit_load_raw; break; - case 16: load_raw = &CLASS unpacked_load_raw; - } - fseek (ifp, off_setup+792, SEEK_SET); - strcpy (make, "CINE"); - sprintf (model, "%d", get4()); - fseek (ifp, 12, SEEK_CUR); - switch ((i=get4()) & 0xffffff) { - case 3: filters = 0x94949494; break; - case 4: filters = 0x49494949; break; - default: is_raw = 0; - } - fseek (ifp, 72, SEEK_CUR); - switch ((get4()+3600) % 360) { - case 270: flip = 4; break; - case 180: flip = 1; break; - case 90: flip = 7; break; - case 0: flip = 2; - } - cam_mul[0] = getreal(11); - cam_mul[2] = getreal(11); - maximum = ~(-1 << get4()); - fseek (ifp, 668, SEEK_CUR); - shutter = get4()/1000000000.0; - fseek (ifp, off_image, SEEK_SET); - if (shot_select < is_raw) - fseek (ifp, shot_select*8, SEEK_CUR); - data_offset = (INT64) get4() + 8; - data_offset += (INT64) get4() << 32; -} - -void CLASS parse_redcine() -{ - unsigned i, len, rdvo; - - order = 0x4d4d; - is_raw = 0; - fseek (ifp, 52, SEEK_SET); - width = get4(); - height = get4(); - fseek (ifp, 0, SEEK_END); - fseek (ifp, -(i = ftello(ifp) & 511), SEEK_CUR); - if (get4() != i || get4() != 0x52454f42) { - fprintf (stderr,_("%s: Tail is missing, parsing from head...\n"), ifname); - fseek (ifp, 0, SEEK_SET); - while ((len = get4()) != EOF) { - if (get4() == 0x52454456) - if (is_raw++ == shot_select) - data_offset = ftello(ifp) - 8; - fseek (ifp, len-8, SEEK_CUR); - } - } else { - rdvo = get4(); - fseek (ifp, 12, SEEK_CUR); - is_raw = get4(); - fseeko (ifp, rdvo+8 + shot_select*4, SEEK_SET); - data_offset = get4(); - } -} - -char * CLASS foveon_gets (int offset, char *str, int len) -{ - int i; - fseek (ifp, offset, SEEK_SET); - for (i=0; i < len-1; i++) - if ((str[i] = get2()) == 0) break; - str[i] = 0; - return str; -} - -void CLASS parse_foveon() -{ - int entries, img=0, off, len, tag, save, i, wide, high, pent, poff[256][2]; - char name[64], value[64]; - - order = 0x4949; /* Little-endian */ - fseek (ifp, 36, SEEK_SET); - flip = get4(); - fseek (ifp, -4, SEEK_END); - fseek (ifp, get4(), SEEK_SET); - if (get4() != 0x64434553) return; /* SECd */ - entries = (get4(),get4()); - while (entries--) { - off = get4(); - len = get4(); - tag = get4(); - save = ftell(ifp); - fseek (ifp, off, SEEK_SET); - if (get4() != (0x20434553 | (tag << 24))) return; - switch (tag) { - case 0x47414d49: /* IMAG */ - case 0x32414d49: /* IMA2 */ - fseek (ifp, 8, SEEK_CUR); - pent = get4(); - wide = get4(); - high = get4(); - if (wide > raw_width && high > raw_height) { - switch (pent) { - case 5: load_flags = 1; - case 6: load_raw = &CLASS foveon_sd_load_raw; break; - case 30: load_raw = &CLASS foveon_dp_load_raw; break; - default: load_raw = 0; - } - raw_width = wide; - raw_height = high; - data_offset = off+28; - } - fseek (ifp, off+28, SEEK_SET); - if (fgetc(ifp) == 0xff && fgetc(ifp) == 0xd8 - && thumb_length < len-28) { - thumb_offset = off+28; - thumb_length = len-28; - write_thumb = &CLASS jpeg_thumb; - } - if (++img == 2 && !thumb_length) { - thumb_offset = off+24; - thumb_width = wide; - thumb_height = high; - write_thumb = &CLASS foveon_thumb; - } - break; - case 0x464d4143: /* CAMF */ - meta_offset = off+8; - meta_length = len-28; - break; - case 0x504f5250: /* PROP */ - pent = (get4(),get4()); - fseek (ifp, 12, SEEK_CUR); - off += pent*8 + 24; - if ((unsigned) pent > 256) pent=256; - for (i=0; i < pent*2; i++) - poff[0][i] = off + get4()*2; - for (i=0; i < pent; i++) { - foveon_gets (poff[i][0], name, 64); - foveon_gets (poff[i][1], value, 64); - if (!strcmp (name, "ISO")) - iso_speed = atoi(value); - if (!strcmp (name, "CAMMANUF")) - strcpy (make, value); - if (!strcmp (name, "CAMMODEL")) - strcpy (model, value); - if (!strcmp (name, "WB_DESC")) - strcpy (model2, value); - if (!strcmp (name, "TIME")) - timestamp = atoi(value); - if (!strcmp (name, "EXPTIME")) - shutter = atoi(value) / 1000000.0; - if (!strcmp (name, "APERTURE")) - aperture = atof(value); - if (!strcmp (name, "FLENGTH")) - focal_len = atof(value); - } -#ifdef LOCALTIME - timestamp = mktime (gmtime (×tamp)); -#endif - } - fseek (ifp, save, SEEK_SET); - } - is_foveon = 1; -} - -/* - All matrices are from Adobe DNG Converter unless otherwise noted. - */ -void CLASS adobe_coeff (const char *make, const char *model) -{ - static const struct { - const char *prefix; - short black, maximum, trans[12]; - } table[] = { - { "AGFAPHOTO DC-833m", 0, 0, /* DJC */ - { 11438,-3762,-1115,-2409,9914,2497,-1227,2295,5300 } }, - { "Apple QuickTake", 0, 0, /* DJC */ - { 21392,-5653,-3353,2406,8010,-415,7166,1427,2078 } }, - { "Canon EOS D2000", 0, 0, - { 24542,-10860,-3401,-1490,11370,-297,2858,-605,3225 } }, - { "Canon EOS D6000", 0, 0, - { 20482,-7172,-3125,-1033,10410,-285,2542,226,3136 } }, - { "Canon EOS D30", 0, 0, - { 9805,-2689,-1312,-5803,13064,3068,-2438,3075,8775 } }, - { "Canon EOS D60", 0, 0xfa0, - { 6188,-1341,-890,-7168,14489,2937,-2640,3228,8483 } }, - { "Canon EOS 5D Mark III", 0, 0x3c80, - { 6722,-635,-963,-4287,12460,2028,-908,2162,5668 } }, - { "Canon EOS 5D Mark II", 0, 0x3cf0, - { 4716,603,-830,-7798,15474,2480,-1496,1937,6651 } }, - { "Canon EOS 5D", 0, 0xe6c, - { 6347,-479,-972,-8297,15954,2480,-1968,2131,7649 } }, - { "Canon EOS 7D", 0, 0x3510, - { 6844,-996,-856,-3876,11761,2396,-593,1772,6198 } }, - { "Canon EOS 10D", 0, 0xfa0, - { 8197,-2000,-1118,-6714,14335,2592,-2536,3178,8266 } }, - { "Canon EOS 20Da", 0, 0, - { 14155,-5065,-1382,-6550,14633,2039,-1623,1824,6561 } }, - { "Canon EOS 20D", 0, 0xfff, - { 6599,-537,-891,-8071,15783,2424,-1983,2234,7462 } }, - { "Canon EOS 30D", 0, 0, - { 6257,-303,-1000,-7880,15621,2396,-1714,1904,7046 } }, - { "Canon EOS 40D", 0, 0x3f60, - { 6071,-747,-856,-7653,15365,2441,-2025,2553,7315 } }, - { "Canon EOS 50D", 0, 0x3d93, - { 4920,616,-593,-6493,13964,2784,-1774,3178,7005 } }, - { "Canon EOS 60D", 0, 0x2ff7, - { 6719,-994,-925,-4408,12426,2211,-887,2129,6051 } }, - { "Canon EOS 300D", 0, 0xfa0, - { 8197,-2000,-1118,-6714,14335,2592,-2536,3178,8266 } }, - { "Canon EOS 350D", 0, 0xfff, - { 6018,-617,-965,-8645,15881,2975,-1530,1719,7642 } }, - { "Canon EOS 400D", 0, 0xe8e, - { 7054,-1501,-990,-8156,15544,2812,-1278,1414,7796 } }, - { "Canon EOS 450D", 0, 0x390d, - { 5784,-262,-821,-7539,15064,2672,-1982,2681,7427 } }, - { "Canon EOS 500D", 0, 0x3479, - { 4763,712,-646,-6821,14399,2640,-1921,3276,6561 } }, - { "Canon EOS 550D", 0, 0x3dd7, - { 6941,-1164,-857,-3825,11597,2534,-416,1540,6039 } }, - { "Canon EOS 600D", 0, 0x3510, - { 6461,-907,-882,-4300,12184,2378,-819,1944,5931 } }, - { "Canon EOS 1000D", 0, 0xe43, - { 6771,-1139,-977,-7818,15123,2928,-1244,1437,7533 } }, - { "Canon EOS 1100D", 0, 0x3510, - { 6444,-904,-893,-4563,12308,2535,-903,2016,6728 } }, - { "Canon EOS-1Ds Mark III", 0, 0x3bb0, - { 5859,-211,-930,-8255,16017,2353,-1732,1887,7448 } }, - { "Canon EOS-1Ds Mark II", 0, 0xe80, - { 6517,-602,-867,-8180,15926,2378,-1618,1771,7633 } }, - { "Canon EOS-1D Mark IV", 0, 0x3bb0, - { 6014,-220,-795,-4109,12014,2361,-561,1824,5787 } }, - { "Canon EOS-1D Mark III", 0, 0x3bb0, - { 6291,-540,-976,-8350,16145,2311,-1714,1858,7326 } }, - { "Canon EOS-1D Mark II N", 0, 0xe80, - { 6240,-466,-822,-8180,15825,2500,-1801,1938,8042 } }, - { "Canon EOS-1D Mark II", 0, 0xe80, - { 6264,-582,-724,-8312,15948,2504,-1744,1919,8664 } }, - { "Canon EOS-1DS", 0, 0xe20, - { 4374,3631,-1743,-7520,15212,2472,-2892,3632,8161 } }, - { "Canon EOS-1D X", 0, 0, - { 6847,-614,-1014,-4669,12737,2139,-1197,2488,6846 } }, - { "Canon EOS-1D", 0, 0xe20, - { 6806,-179,-1020,-8097,16415,1687,-3267,4236,7690 } }, - { "Canon EOS", 0, 0, - { 8197,-2000,-1118,-6714,14335,2592,-2536,3178,8266 } }, - { "Canon PowerShot A530", 0, 0, - { 0 } }, /* don't want the A5 matrix */ - { "Canon PowerShot A50", 0, 0, - { -5300,9846,1776,3436,684,3939,-5540,9879,6200,-1404,11175,217 } }, - { "Canon PowerShot A5", 0, 0, - { -4801,9475,1952,2926,1611,4094,-5259,10164,5947,-1554,10883,547 } }, - { "Canon PowerShot G10", 0, 0, - { 11093,-3906,-1028,-5047,12492,2879,-1003,1750,5561 } }, - { "Canon PowerShot G11", 0, 0, - { 12177,-4817,-1069,-1612,9864,2049,-98,850,4471 } }, - { "Canon PowerShot G12", 0, 0, - { 13244,-5501,-1248,-1508,9858,1935,-270,1083,4366 } }, - { "Canon PowerShot G1 X", 0, 0, - { 7378,-1255,-1043,-4088,12251,2048,-876,1946,5805 } }, - { "Canon PowerShot G1", 0, 0, - { -4778,9467,2172,4743,-1141,4344,-5146,9908,6077,-1566,11051,557 } }, - { "Canon PowerShot G2", 0, 0, - { 9087,-2693,-1049,-6715,14382,2537,-2291,2819,7790 } }, - { "Canon PowerShot G3", 0, 0, - { 9212,-2781,-1073,-6573,14189,2605,-2300,2844,7664 } }, - { "Canon PowerShot G5", 0, 0, - { 9757,-2872,-933,-5972,13861,2301,-1622,2328,7212 } }, - { "Canon PowerShot G6", 0, 0, - { 9877,-3775,-871,-7613,14807,3072,-1448,1305,7485 } }, - { "Canon PowerShot G9", 0, 0, - { 7368,-2141,-598,-5621,13254,2625,-1418,1696,5743 } }, - { "Canon PowerShot Pro1", 0, 0, - { 10062,-3522,-999,-7643,15117,2730,-765,817,7323 } }, - { "Canon PowerShot Pro70", 34, 0, - { -4155,9818,1529,3939,-25,4522,-5521,9870,6610,-2238,10873,1342 } }, - { "Canon PowerShot Pro90", 0, 0, - { -4963,9896,2235,4642,-987,4294,-5162,10011,5859,-1770,11230,577 } }, - { "Canon PowerShot S30", 0, 0, - { 10566,-3652,-1129,-6552,14662,2006,-2197,2581,7670 } }, - { "Canon PowerShot S40", 0, 0, - { 8510,-2487,-940,-6869,14231,2900,-2318,2829,9013 } }, - { "Canon PowerShot S45", 0, 0, - { 8163,-2333,-955,-6682,14174,2751,-2077,2597,8041 } }, - { "Canon PowerShot S50", 0, 0, - { 8882,-2571,-863,-6348,14234,2288,-1516,2172,6569 } }, - { "Canon PowerShot S60", 0, 0, - { 8795,-2482,-797,-7804,15403,2573,-1422,1996,7082 } }, - { "Canon PowerShot S70", 0, 0, - { 9976,-3810,-832,-7115,14463,2906,-901,989,7889 } }, - { "Canon PowerShot S90", 0, 0, - { 12374,-5016,-1049,-1677,9902,2078,-83,852,4683 } }, - { "Canon PowerShot S95", 0, 0, - { 13440,-5896,-1279,-1236,9598,1931,-180,1001,4651 } }, - { "Canon PowerShot S100", 0, 0, - { 7968,-2565,-636,-2873,10697,2513,180,667,4211 } }, - { "Canon PowerShot A470", 0, 0, /* DJC */ - { 12513,-4407,-1242,-2680,10276,2405,-878,2215,4734 } }, - { "Canon PowerShot A610", 0, 0, /* DJC */ - { 15591,-6402,-1592,-5365,13198,2168,-1300,1824,5075 } }, - { "Canon PowerShot A620", 0, 0, /* DJC */ - { 15265,-6193,-1558,-4125,12116,2010,-888,1639,5220 } }, - { "Canon PowerShot A630", 0, 0, /* DJC */ - { 14201,-5308,-1757,-6087,14472,1617,-2191,3105,5348 } }, - { "Canon PowerShot A640", 0, 0, /* DJC */ - { 13124,-5329,-1390,-3602,11658,1944,-1612,2863,4885 } }, - { "Canon PowerShot A650", 0, 0, /* DJC */ - { 9427,-3036,-959,-2581,10671,1911,-1039,1982,4430 } }, - { "Canon PowerShot A720", 0, 0, /* DJC */ - { 14573,-5482,-1546,-1266,9799,1468,-1040,1912,3810 } }, - { "Canon PowerShot S3 IS", 0, 0, /* DJC */ - { 14062,-5199,-1446,-4712,12470,2243,-1286,2028,4836 } }, - { "Canon PowerShot SX1 IS", 0, 0, - { 6578,-259,-502,-5974,13030,3309,-308,1058,4970 } }, - { "Canon PowerShot SX110 IS", 0, 0, /* DJC */ - { 14134,-5576,-1527,-1991,10719,1273,-1158,1929,3581 } }, - { "Canon PowerShot SX220", 0, 0, /* DJC */ - { 13898,-5076,-1447,-1405,10109,1297,-244,1860,3687 } }, - { "CASIO EX-S20", 0, 0, /* DJC */ - { 11634,-3924,-1128,-4968,12954,2015,-1588,2648,7206 } }, - { "CASIO EX-Z750", 0, 0, /* DJC */ - { 10819,-3873,-1099,-4903,13730,1175,-1755,3751,4632 } }, - { "CASIO EX-Z10", 128, 0xfff, /* DJC */ - { 9790,-3338,-603,-2321,10222,2099,-344,1273,4799 } }, - { "CINE 650", 0, 0, - { 3390,480,-500,-800,3610,340,-550,2336,1192 } }, - { "CINE 660", 0, 0, - { 3390,480,-500,-800,3610,340,-550,2336,1192 } }, - { "CINE", 0, 0, - { 20183,-4295,-423,-3940,15330,3985,-280,4870,9800 } }, - { "Contax N Digital", 0, 0xf1e, - { 7777,1285,-1053,-9280,16543,2916,-3677,5679,7060 } }, - { "EPSON R-D1", 0, 0, - { 6827,-1878,-732,-8429,16012,2564,-704,592,7145 } }, - { "FUJIFILM E550", 0, 0, - { 11044,-3888,-1120,-7248,15168,2208,-1531,2277,8069 } }, - { "FUJIFILM E900", 0, 0, - { 9183,-2526,-1078,-7461,15071,2574,-2022,2440,8639 } }, - { "FUJIFILM F5", 0, 0, - { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, - { "FUJIFILM F6", 0, 0, - { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, - { "FUJIFILM F77", 0, 0, - { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, - { "FUJIFILM F7", 0, 0, - { 10004,-3219,-1201,-7036,15047,2107,-1863,2565,7736 } }, - { "FUJIFILM F8", 0, 0, - { 11044,-3888,-1120,-7248,15168,2208,-1531,2277,8069 } }, - { "FUJIFILM S100FS", 514, 0, - { 11521,-4355,-1065,-6524,13767,3058,-1466,1984,6045 } }, - { "FUJIFILM S200EXR", 512, 0x3fff, - { 11401,-4498,-1312,-5088,12751,2613,-838,1568,5941 } }, - { "FUJIFILM S20Pro", 0, 0, - { 10004,-3219,-1201,-7036,15047,2107,-1863,2565,7736 } }, - { "FUJIFILM S2Pro", 128, 0, - { 12492,-4690,-1402,-7033,15423,1647,-1507,2111,7697 } }, - { "FUJIFILM S3Pro", 0, 0, - { 11807,-4612,-1294,-8927,16968,1988,-2120,2741,8006 } }, - { "FUJIFILM S5Pro", 0, 0, - { 12300,-5110,-1304,-9117,17143,1998,-1947,2448,8100 } }, - { "FUJIFILM S5000", 0, 0, - { 8754,-2732,-1019,-7204,15069,2276,-1702,2334,6982 } }, - { "FUJIFILM S5100", 0, 0, - { 11940,-4431,-1255,-6766,14428,2542,-993,1165,7421 } }, - { "FUJIFILM S5500", 0, 0, - { 11940,-4431,-1255,-6766,14428,2542,-993,1165,7421 } }, - { "FUJIFILM S5200", 0, 0, - { 9636,-2804,-988,-7442,15040,2589,-1803,2311,8621 } }, - { "FUJIFILM S5600", 0, 0, - { 9636,-2804,-988,-7442,15040,2589,-1803,2311,8621 } }, - { "FUJIFILM S6", 0, 0, - { 12628,-4887,-1401,-6861,14996,1962,-2198,2782,7091 } }, - { "FUJIFILM S7000", 0, 0, - { 10190,-3506,-1312,-7153,15051,2238,-2003,2399,7505 } }, - { "FUJIFILM S9000", 0, 0, - { 10491,-3423,-1145,-7385,15027,2538,-1809,2275,8692 } }, - { "FUJIFILM S9500", 0, 0, - { 10491,-3423,-1145,-7385,15027,2538,-1809,2275,8692 } }, - { "FUJIFILM S9100", 0, 0, - { 12343,-4515,-1285,-7165,14899,2435,-1895,2496,8800 } }, - { "FUJIFILM S9600", 0, 0, - { 12343,-4515,-1285,-7165,14899,2435,-1895,2496,8800 } }, - { "FUJIFILM IS-1", 0, 0, - { 21461,-10807,-1441,-2332,10599,1999,289,875,7703 } }, - { "FUJIFILM IS Pro", 0, 0, - { 12300,-5110,-1304,-9117,17143,1998,-1947,2448,8100 } }, - { "FUJIFILM HS10 HS11", 0, 0xf68, - { 12440,-3954,-1183,-1123,9674,1708,-83,1614,4086 } }, - { "FUJIFILM HS20EXR", 0, 0, - { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, - { "FUJIFILM HS3", 0, 0, - { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, - { "FUJIFILM X100", 0, 0, - { 12161,-4457,-1069,-5034,12874,2400,-795,1724,6904 } }, - { "FUJIFILM X10", 0, 0, - { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, - { "FUJIFILM X-Pro1", 0, 0, - { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, - { "FUJIFILM X-S1", 0, 0, - { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, - { "Imacon Ixpress", 0, 0, /* DJC */ - { 7025,-1415,-704,-5188,13765,1424,-1248,2742,6038 } }, - { "KODAK NC2000", 0, 0, - { 13891,-6055,-803,-465,9919,642,2121,82,1291 } }, - { "Kodak DCS315C", 8, 0, - { 17523,-4827,-2510,756,8546,-137,6113,1649,2250 } }, - { "Kodak DCS330C", 8, 0, - { 20620,-7572,-2801,-103,10073,-396,3551,-233,2220 } }, - { "KODAK DCS420", 0, 0, - { 10868,-1852,-644,-1537,11083,484,2343,628,2216 } }, - { "KODAK DCS460", 0, 0, - { 10592,-2206,-967,-1944,11685,230,2206,670,1273 } }, - { "KODAK EOSDCS1", 0, 0, - { 10592,-2206,-967,-1944,11685,230,2206,670,1273 } }, - { "KODAK EOSDCS3B", 0, 0, - { 9898,-2700,-940,-2478,12219,206,1985,634,1031 } }, - { "Kodak DCS520C", 180, 0, - { 24542,-10860,-3401,-1490,11370,-297,2858,-605,3225 } }, - { "Kodak DCS560C", 188, 0, - { 20482,-7172,-3125,-1033,10410,-285,2542,226,3136 } }, - { "Kodak DCS620C", 180, 0, - { 23617,-10175,-3149,-2054,11749,-272,2586,-489,3453 } }, - { "Kodak DCS620X", 185, 0, - { 13095,-6231,154,12221,-21,-2137,895,4602,2258 } }, - { "Kodak DCS660C", 214, 0, - { 18244,-6351,-2739,-791,11193,-521,3711,-129,2802 } }, - { "Kodak DCS720X", 0, 0, - { 11775,-5884,950,9556,1846,-1286,-1019,6221,2728 } }, - { "Kodak DCS760C", 0, 0, - { 16623,-6309,-1411,-4344,13923,323,2285,274,2926 } }, - { "Kodak DCS Pro SLR", 0, 0, - { 5494,2393,-232,-6427,13850,2846,-1876,3997,5445 } }, - { "Kodak DCS Pro 14nx", 0, 0, - { 5494,2393,-232,-6427,13850,2846,-1876,3997,5445 } }, - { "Kodak DCS Pro 14", 0, 0, - { 7791,3128,-776,-8588,16458,2039,-2455,4006,6198 } }, - { "Kodak ProBack645", 0, 0, - { 16414,-6060,-1470,-3555,13037,473,2545,122,4948 } }, - { "Kodak ProBack", 0, 0, - { 21179,-8316,-2918,-915,11019,-165,3477,-180,4210 } }, - { "KODAK P712", 0, 0, - { 9658,-3314,-823,-5163,12695,2768,-1342,1843,6044 } }, - { "KODAK P850", 0, 0xf7c, - { 10511,-3836,-1102,-6946,14587,2558,-1481,1792,6246 } }, - { "KODAK P880", 0, 0xfff, - { 12805,-4662,-1376,-7480,15267,2360,-1626,2194,7904 } }, - { "KODAK EasyShare Z980", 0, 0, - { 11313,-3559,-1101,-3893,11891,2257,-1214,2398,4908 } }, - { "KODAK EasyShare Z981", 0, 0, - { 12729,-4717,-1188,-1367,9187,2582,274,860,4411 } }, - { "KODAK EasyShare Z990", 0, 0xfed, - { 11749,-4048,-1309,-1867,10572,1489,-138,1449,4522 } }, - { "KODAK EASYSHARE Z1015", 0, 0xef1, - { 11265,-4286,-992,-4694,12343,2647,-1090,1523,5447 } }, - { "Leaf CMost", 0, 0, - { 3952,2189,449,-6701,14585,2275,-4536,7349,6536 } }, - { "Leaf Valeo 6", 0, 0, - { 3952,2189,449,-6701,14585,2275,-4536,7349,6536 } }, - { "Leaf Aptus 54S", 0, 0, - { 8236,1746,-1314,-8251,15953,2428,-3673,5786,5771 } }, - { "Leaf Aptus 65", 0, 0, - { 7914,1414,-1190,-8777,16582,2280,-2811,4605,5562 } }, - { "Leaf Aptus 75", 0, 0, - { 7914,1414,-1190,-8777,16582,2280,-2811,4605,5562 } }, - { "Leaf", 0, 0, - { 8236,1746,-1314,-8251,15953,2428,-3673,5786,5771 } }, - { "Mamiya ZD", 0, 0, - { 7645,2579,-1363,-8689,16717,2015,-3712,5941,5961 } }, - { "Micron 2010", 110, 0, /* DJC */ - { 16695,-3761,-2151,155,9682,163,3433,951,4904 } }, - { "Minolta DiMAGE 5", 0, 0xf7d, - { 8983,-2942,-963,-6556,14476,2237,-2426,2887,8014 } }, - { "Minolta DiMAGE 7Hi", 0, 0xf7d, - { 11368,-3894,-1242,-6521,14358,2339,-2475,3056,7285 } }, - { "Minolta DiMAGE 7", 0, 0xf7d, - { 9144,-2777,-998,-6676,14556,2281,-2470,3019,7744 } }, - { "Minolta DiMAGE A1", 0, 0xf8b, - { 9274,-2547,-1167,-8220,16323,1943,-2273,2720,8340 } }, - { "MINOLTA DiMAGE A200", 0, 0, - { 8560,-2487,-986,-8112,15535,2771,-1209,1324,7743 } }, - { "Minolta DiMAGE A2", 0, 0xf8f, - { 9097,-2726,-1053,-8073,15506,2762,-966,981,7763 } }, - { "Minolta DiMAGE Z2", 0, 0, /* DJC */ - { 11280,-3564,-1370,-4655,12374,2282,-1423,2168,5396 } }, - { "MINOLTA DYNAX 5", 0, 0xffb, - { 10284,-3283,-1086,-7957,15762,2316,-829,882,6644 } }, - { "MINOLTA DYNAX 7", 0, 0xffb, - { 10239,-3104,-1099,-8037,15727,2451,-927,925,6871 } }, - { "MOTOROLA PIXL", 0, 0, /* DJC */ - { 8898,-989,-1033,-3292,11619,1674,-661,3178,5216 } }, - { "NIKON D100", 0, 0, - { 5902,-933,-782,-8983,16719,2354,-1402,1455,6464 } }, - { "NIKON D1H", 0, 0, - { 7577,-2166,-926,-7454,15592,1934,-2377,2808,8606 } }, - { "NIKON D1X", 0, 0, - { 7702,-2245,-975,-9114,17242,1875,-2679,3055,8521 } }, - { "NIKON D1", 0, 0, /* multiplied by 2.218750, 1.0, 1.148438 */ - { 16772,-4726,-2141,-7611,15713,1972,-2846,3494,9521 } }, - { "NIKON D200", 0, 0xfbc, - { 8367,-2248,-763,-8758,16447,2422,-1527,1550,8053 } }, - { "NIKON D2H", 0, 0, - { 5710,-901,-615,-8594,16617,2024,-2975,4120,6830 } }, - { "NIKON D2X", 0, 0, - { 10231,-2769,-1255,-8301,15900,2552,-797,680,7148 } }, - { "NIKON D3000", 0, 0, - { 8736,-2458,-935,-9075,16894,2251,-1354,1242,8263 } }, - { "NIKON D3100", 0, 0, - { 7911,-2167,-813,-5327,13150,2408,-1288,2483,7968 } }, - { "NIKON D3200", 0, 0, - { 7013,-1408,-635,-5268,12902,2640,-1470,2801,7379 } }, - { "NIKON D300", 0, 0, - { 9030,-1992,-715,-8465,16302,2255,-2689,3217,8069 } }, - { "NIKON D3X", 0, 0, - { 7171,-1986,-648,-8085,15555,2718,-2170,2512,7457 } }, - { "NIKON D3S", 0, 0, - { 8828,-2406,-694,-4874,12603,2541,-660,1509,7587 } }, - { "NIKON D3", 0, 0, - { 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 } }, - { "NIKON D40X", 0, 0, - { 8819,-2543,-911,-9025,16928,2151,-1329,1213,8449 } }, - { "NIKON D40", 0, 0, - { 6992,-1668,-806,-8138,15748,2543,-874,850,7897 } }, - { "NIKON D4", 0, 0, - { 8598,-2848,-857,-5618,13606,2195,-1002,1773,7137 } }, - { "NIKON D5000", 0, 0xf00, - { 7309,-1403,-519,-8474,16008,2622,-2433,2826,8064 } }, - { "NIKON D5100", 0, 0x3de6, - { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } }, - { "NIKON D50", 0, 0, - { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } }, - { "NIKON D60", 0, 0, - { 8736,-2458,-935,-9075,16894,2251,-1354,1242,8263 } }, - { "NIKON D7000", 0, 0, - { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } }, - { "NIKON D700", 0, 0, - { 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 } }, - { "NIKON D70", 0, 0, - { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } }, - { "NIKON D800", 0, 0, - { 7866,-2108,-555,-4869,12483,2681,-1176,2069,7501 } }, - { "NIKON D80", 0, 0, - { 8629,-2410,-883,-9055,16940,2171,-1490,1363,8520 } }, - { "NIKON D90", 0, 0xf00, - { 7309,-1403,-519,-8474,16008,2622,-2434,2826,8064 } }, - { "NIKON E950", 0, 0x3dd, /* DJC */ - { -3746,10611,1665,9621,-1734,2114,-2389,7082,3064,3406,6116,-244 } }, - { "NIKON E995", 0, 0, /* copied from E5000 */ - { -5547,11762,2189,5814,-558,3342,-4924,9840,5949,688,9083,96 } }, - { "NIKON E2100", 0, 0, /* copied from Z2, new white balance */ - { 13142,-4152,-1596,-4655,12374,2282,-1769,2696,6711} }, - { "NIKON E2500", 0, 0, - { -5547,11762,2189,5814,-558,3342,-4924,9840,5949,688,9083,96 } }, - { "NIKON E3200", 0, 0, /* DJC */ - { 9846,-2085,-1019,-3278,11109,2170,-774,2134,5745 } }, - { "NIKON E4300", 0, 0, /* copied from Minolta DiMAGE Z2 */ - { 11280,-3564,-1370,-4655,12374,2282,-1423,2168,5396 } }, - { "NIKON E4500", 0, 0, - { -5547,11762,2189,5814,-558,3342,-4924,9840,5949,688,9083,96 } }, - { "NIKON E5000", 0, 0, - { -5547,11762,2189,5814,-558,3342,-4924,9840,5949,688,9083,96 } }, - { "NIKON E5400", 0, 0, - { 9349,-2987,-1001,-7919,15766,2266,-2098,2680,6839 } }, - { "NIKON E5700", 0, 0, - { -5368,11478,2368,5537,-113,3148,-4969,10021,5782,778,9028,211 } }, - { "NIKON E8400", 0, 0, - { 7842,-2320,-992,-8154,15718,2599,-1098,1342,7560 } }, - { "NIKON E8700", 0, 0, - { 8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354 } }, - { "NIKON E8800", 0, 0, - { 7971,-2314,-913,-8451,15762,2894,-1442,1520,7610 } }, - { "NIKON COOLPIX P6000", 0, 0, - { 9698,-3367,-914,-4706,12584,2368,-837,968,5801 } }, - { "NIKON COOLPIX P7000", 0, 0, - { 11432,-3679,-1111,-3169,11239,2202,-791,1380,4455 } }, - { "NIKON COOLPIX P7100", 0, 0, - { 11053,-4269,-1024,-1976,10182,2088,-526,1263,4469 } }, - { "NIKON 1 ", 0, 0, - { 8994,-2667,-865,-4594,12324,2552,-699,1786,6260 } }, - { "OLYMPUS C5050", 0, 0, - { 10508,-3124,-1273,-6079,14294,1901,-1653,2306,6237 } }, - { "OLYMPUS C5060", 0, 0, - { 10445,-3362,-1307,-7662,15690,2058,-1135,1176,7602 } }, - { "OLYMPUS C7070", 0, 0, - { 10252,-3531,-1095,-7114,14850,2436,-1451,1723,6365 } }, - { "OLYMPUS C70", 0, 0, - { 10793,-3791,-1146,-7498,15177,2488,-1390,1577,7321 } }, - { "OLYMPUS C80", 0, 0, - { 8606,-2509,-1014,-8238,15714,2703,-942,979,7760 } }, - { "OLYMPUS E-10", 0, 0xffc, - { 12745,-4500,-1416,-6062,14542,1580,-1934,2256,6603 } }, - { "OLYMPUS E-1", 0, 0, - { 11846,-4767,-945,-7027,15878,1089,-2699,4122,8311 } }, - { "OLYMPUS E-20", 0, 0xffc, - { 13173,-4732,-1499,-5807,14036,1895,-2045,2452,7142 } }, - { "OLYMPUS E-300", 0, 0, - { 7828,-1761,-348,-5788,14071,1830,-2853,4518,6557 } }, - { "OLYMPUS E-330", 0, 0, - { 8961,-2473,-1084,-7979,15990,2067,-2319,3035,8249 } }, - { "OLYMPUS E-30", 0, 0xfbc, - { 8144,-1861,-1111,-7763,15894,1929,-1865,2542,7607 } }, - { "OLYMPUS E-3", 0, 0xf99, - { 9487,-2875,-1115,-7533,15606,2010,-1618,2100,7389 } }, - { "OLYMPUS E-400", 0, 0, - { 6169,-1483,-21,-7107,14761,2536,-2904,3580,8568 } }, - { "OLYMPUS E-410", 0, 0xf6a, - { 8856,-2582,-1026,-7761,15766,2082,-2009,2575,7469 } }, - { "OLYMPUS E-420", 0, 0xfd7, - { 8746,-2425,-1095,-7594,15612,2073,-1780,2309,7416 } }, - { "OLYMPUS E-450", 0, 0xfd2, - { 8745,-2425,-1095,-7594,15613,2073,-1780,2309,7416 } }, - { "OLYMPUS E-500", 0, 0, - { 8136,-1968,-299,-5481,13742,1871,-2556,4205,6630 } }, - { "OLYMPUS E-510", 0, 0xf6a, - { 8785,-2529,-1033,-7639,15624,2112,-1783,2300,7817 } }, - { "OLYMPUS E-520", 0, 0xfd2, - { 8344,-2322,-1020,-7596,15635,2048,-1748,2269,7287 } }, - { "OLYMPUS E-5", 0, 0, - { 11200,-3783,-1325,-4576,12593,2206,-695,1742,7504 } }, - { "OLYMPUS E-600", 0, 0xfaf, - { 8453,-2198,-1092,-7609,15681,2008,-1725,2337,7824 } }, - { "OLYMPUS E-620", 0, 0xfaf, - { 8453,-2198,-1092,-7609,15681,2008,-1725,2337,7824 } }, - { "OLYMPUS E-P1", 0, 0xffd, - { 8343,-2050,-1021,-7715,15705,2103,-1831,2380,8235 } }, - { "OLYMPUS E-P2", 0, 0xffd, - { 8343,-2050,-1021,-7715,15705,2103,-1831,2380,8235 } }, - { "OLYMPUS E-P3", 0, 0, - { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } }, - { "OLYMPUS E-PL1s", 0, 0, - { 11409,-3872,-1393,-4572,12757,2003,-709,1810,7415 } }, - { "OLYMPUS E-PL1", 0, 0, - { 11408,-4289,-1215,-4286,12385,2118,-387,1467,7787 } }, - { "OLYMPUS E-PL2", 0, 0, - { 15030,-5552,-1806,-3987,12387,1767,-592,1670,7023 } }, - { "OLYMPUS E-PL3", 0, 0, - { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } }, - { "OLYMPUS E-PM1", 0, 0, - { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } }, - { "OLYMPUS E-M5", 0, 0, - { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, - { "OLYMPUS SP350", 0, 0, - { 12078,-4836,-1069,-6671,14306,2578,-786,939,7418 } }, - { "OLYMPUS SP3", 0, 0, - { 11766,-4445,-1067,-6901,14421,2707,-1029,1217,7572 } }, - { "OLYMPUS SP500UZ", 0, 0xfff, - { 9493,-3415,-666,-5211,12334,3260,-1548,2262,6482 } }, - { "OLYMPUS SP510UZ", 0, 0xffe, - { 10593,-3607,-1010,-5881,13127,3084,-1200,1805,6721 } }, - { "OLYMPUS SP550UZ", 0, 0xffe, - { 11597,-4006,-1049,-5432,12799,2957,-1029,1750,6516 } }, - { "OLYMPUS SP560UZ", 0, 0xff9, - { 10915,-3677,-982,-5587,12986,2911,-1168,1968,6223 } }, - { "OLYMPUS SP570UZ", 0, 0, - { 11522,-4044,-1146,-4736,12172,2904,-988,1829,6039 } }, - { "OLYMPUS XZ-1", 0, 0, - { 10901,-4095,-1074,-1141,9208,2293,-62,1417,5158 } }, - { "PENTAX *ist DL2", 0, 0, - { 10504,-2438,-1189,-8603,16207,2531,-1022,863,12242 } }, - { "PENTAX *ist DL", 0, 0, - { 10829,-2838,-1115,-8339,15817,2696,-837,680,11939 } }, - { "PENTAX *ist DS2", 0, 0, - { 10504,-2438,-1189,-8603,16207,2531,-1022,863,12242 } }, - { "PENTAX *ist DS", 0, 0, - { 10371,-2333,-1206,-8688,16231,2602,-1230,1116,11282 } }, - { "PENTAX *ist D", 0, 0, - { 9651,-2059,-1189,-8881,16512,2487,-1460,1345,10687 } }, - { "PENTAX K10D", 0, 0, - { 9566,-2863,-803,-7170,15172,2112,-818,803,9705 } }, - { "PENTAX K1", 0, 0, - { 11095,-3157,-1324,-8377,15834,2720,-1108,947,11688 } }, - { "PENTAX K20D", 0, 0, - { 9427,-2714,-868,-7493,16092,1373,-2199,3264,7180 } }, - { "PENTAX K200D", 0, 0, - { 9186,-2678,-907,-8693,16517,2260,-1129,1094,8524 } }, - { "PENTAX K2000", 0, 0, - { 11057,-3604,-1155,-5152,13046,2329,-282,375,8104 } }, - { "PENTAX K-m", 0, 0, - { 11057,-3604,-1155,-5152,13046,2329,-282,375,8104 } }, - { "PENTAX K-x", 0, 0, - { 8843,-2837,-625,-5025,12644,2668,-411,1234,7410 } }, - { "PENTAX K-r", 0, 0, - { 9895,-3077,-850,-5304,13035,2521,-883,1768,6936 } }, - { "PENTAX K-5", 0, 0, - { 8713,-2833,-743,-4342,11900,2772,-722,1543,6247 } }, - { "PENTAX K-7", 0, 0, - { 9142,-2947,-678,-8648,16967,1663,-2224,2898,8615 } }, - { "PENTAX 645D", 0, 0x3e00, - { 10646,-3593,-1158,-3329,11699,1831,-667,2874,6287 } }, - { "Panasonic DMC-FZ8", 0, 0xf7f, - { 8986,-2755,-802,-6341,13575,3077,-1476,2144,6379 } }, - { "Panasonic DMC-FZ18", 0, 0, - { 9932,-3060,-935,-5809,13331,2753,-1267,2155,5575 } }, - { "Panasonic DMC-FZ28", 15, 0xf96, - { 10109,-3488,-993,-5412,12812,2916,-1305,2140,5543 } }, - { "Panasonic DMC-FZ30", 0, 0xf94, - { 10976,-4029,-1141,-7918,15491,2600,-1670,2071,8246 } }, - { "Panasonic DMC-FZ3", 143, 0, - { 9938,-2780,-890,-4604,12393,2480,-1117,2304,4620 } }, - { "Panasonic DMC-FZ4", 143, 0, - { 13639,-5535,-1371,-1698,9633,2430,316,1152,4108 } }, - { "Panasonic DMC-FZ50", 0, 0, - { 7906,-2709,-594,-6231,13351,3220,-1922,2631,6537 } }, - { "LEICA V-LUX1", 0, 0, - { 7906,-2709,-594,-6231,13351,3220,-1922,2631,6537 } }, - { "Panasonic DMC-L10", 15, 0xf96, - { 8025,-1942,-1050,-7920,15904,2100,-2456,3005,7039 } }, - { "Panasonic DMC-L1", 0, 0xf7f, - { 8054,-1885,-1025,-8349,16367,2040,-2805,3542,7629 } }, - { "LEICA DIGILUX 3", 0, 0xf7f, - { 8054,-1885,-1025,-8349,16367,2040,-2805,3542,7629 } }, - { "Panasonic DMC-LC1", 0, 0, - { 11340,-4069,-1275,-7555,15266,2448,-2960,3426,7685 } }, - { "LEICA DIGILUX 2", 0, 0, - { 11340,-4069,-1275,-7555,15266,2448,-2960,3426,7685 } }, - { "Panasonic DMC-LX1", 0, 0xf7f, - { 10704,-4187,-1230,-8314,15952,2501,-920,945,8927 } }, - { "LEICA D-LUX2", 0, 0xf7f, - { 10704,-4187,-1230,-8314,15952,2501,-920,945,8927 } }, - { "Panasonic DMC-LX2", 0, 0, - { 8048,-2810,-623,-6450,13519,3272,-1700,2146,7049 } }, - { "LEICA D-LUX3", 0, 0, - { 8048,-2810,-623,-6450,13519,3272,-1700,2146,7049 } }, - { "Panasonic DMC-LX3", 15, 0, - { 8128,-2668,-655,-6134,13307,3161,-1782,2568,6083 } }, - { "LEICA D-LUX 4", 15, 0, - { 8128,-2668,-655,-6134,13307,3161,-1782,2568,6083 } }, - { "Panasonic DMC-LX5", 143, 0, - { 10909,-4295,-948,-1333,9306,2399,22,1738,4582 } }, - { "LEICA D-LUX 5", 143, 0, - { 10909,-4295,-948,-1333,9306,2399,22,1738,4582 } }, - { "Panasonic DMC-FZ100", 143, 0xfff, - { 16197,-6146,-1761,-2393,10765,1869,366,2238,5248 } }, - { "LEICA V-LUX 2", 143, 0xfff, - { 16197,-6146,-1761,-2393,10765,1869,366,2238,5248 } }, - { "Panasonic DMC-FZ150", 143, 0xfff, - { 11904,-4541,-1189,-2355,10899,1662,-296,1586,4289 } }, - { "LEICA V-LUX 3", 143, 0xfff, - { 11904,-4541,-1189,-2355,10899,1662,-296,1586,4289 } }, - { "Panasonic DMC-FX150", 15, 0xfff, - { 9082,-2907,-925,-6119,13377,3058,-1797,2641,5609 } }, - { "Panasonic DMC-G10", 0, 0, - { 10113,-3400,-1114,-4765,12683,2317,-377,1437,6710 } }, - { "Panasonic DMC-G1", 15, 0xf94, - { 8199,-2065,-1056,-8124,16156,2033,-2458,3022,7220 } }, - { "Panasonic DMC-G2", 15, 0xf3c, - { 10113,-3400,-1114,-4765,12683,2317,-377,1437,6710 } }, - { "Panasonic DMC-G3", 143, 0xfff, - { 6763,-1919,-863,-3868,11515,2684,-1216,2387,5879 } }, - { "Panasonic DMC-GF1", 15, 0xf92, - { 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } }, - { "Panasonic DMC-GF2", 143, 0xfff, - { 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } }, - { "Panasonic DMC-GF3", 143, 0xfff, - { 9051,-2468,-1204,-5212,13276,2121,-1197,2510,6890 } }, - { "Panasonic DMC-GF5", 143, 0xfff, - { 8228,-2945,-660,-3938,11792,2430,-1094,2278,5793 } }, - { "Panasonic DMC-GH1", 15, 0xf92, - { 6299,-1466,-532,-6535,13852,2969,-2331,3112,5984 } }, - { "Panasonic DMC-GH2", 15, 0xf95, - { 7780,-2410,-806,-3913,11724,2484,-1018,2390,5298 } }, - { "Panasonic DMC-GX1", 143, 0, - { 6763,-1919,-863,-3868,11515,2684,-1216,2387,5879 } }, - { "Phase One H 20", 0, 0, /* DJC */ - { 1313,1855,-109,-6715,15908,808,-327,1840,6020 } }, - { "Phase One H 25", 0, 0, - { 2905,732,-237,-8134,16626,1476,-3038,4253,7517 } }, - { "Phase One P 2", 0, 0, - { 2905,732,-237,-8134,16626,1476,-3038,4253,7517 } }, - { "Phase One P 30", 0, 0, - { 4516,-245,-37,-7020,14976,2173,-3206,4671,7087 } }, - { "Phase One P 45", 0, 0, - { 5053,-24,-117,-5684,14076,1702,-2619,4492,5849 } }, - { "Phase One P40", 0, 0, - { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, - { "Phase One P65", 0, 0, - { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, - { "RED ONE", 704, 0xffff, /* DJC */ - { 21014,-7891,-2613,-3056,12201,856,-2203,5125,8042 } }, - { "SAMSUNG EX1", 0, 0x3e00, - { 8898,-2498,-994,-3144,11328,2066,-760,1381,4576 } }, - { "SAMSUNG NX2", 0, 0xfff, /* NX20, NX200, NX210 */ - { 6933,-2268,-753,-4921,13387,1647,-803,1641,6096 } }, - { "SAMSUNG NX", 0, 0, /* NX5, NX10, NX11, NX100 */ - { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, - { "SAMSUNG WB2000", 0, 0xfff, - { 12093,-3557,-1155,-1000,9534,1733,-22,1787,4576 } }, - { "SAMSUNG GX-1", 0, 0, - { 10504,-2438,-1189,-8603,16207,2531,-1022,863,12242 } }, - { "SAMSUNG S85", 0, 0xffff, /* DJC */ - { 11885,-3968,-1473,-4214,12299,1916,-835,1655,5549 } }, - { "Sinar", 0, 0, /* DJC */ - { 16442,-2956,-2422,-2877,12128,750,-1136,6066,4559 } }, - { "SONY DSC-F828", 491, 0, - { 7924,-1910,-777,-8226,15459,2998,-1517,2199,6818,-7242,11401,3481 } }, - { "SONY DSC-R1", 512, 0, - { 8512,-2641,-694,-8042,15670,2526,-1821,2117,7414 } }, - { "SONY DSC-V3", 0, 0, - { 7511,-2571,-692,-7894,15088,3060,-948,1111,8128 } }, - { "SONY DSLR-A100", 0, 0xfeb, - { 9437,-2811,-774,-8405,16215,2290,-710,596,7181 } }, - { "SONY DSLR-A290", 0, 0, - { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, - { "SONY DSLR-A2", 0, 0, - { 9847,-3091,-928,-8485,16345,2225,-715,595,7103 } }, - { "SONY DSLR-A300", 0, 0, - { 9847,-3091,-928,-8485,16345,2225,-715,595,7103 } }, - { "SONY DSLR-A330", 0, 0, - { 9847,-3091,-929,-8485,16346,2225,-714,595,7103 } }, - { "SONY DSLR-A350", 0, 0xffc, - { 6038,-1484,-578,-9146,16746,2513,-875,746,7217 } }, - { "SONY DSLR-A380", 0, 0, - { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, - { "SONY DSLR-A390", 0, 0, - { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, - { "SONY DSLR-A450", 128, 0xfeb, - { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, - { "SONY DSLR-A580", 128, 0xfeb, - { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } }, - { "SONY DSLR-A5", 128, 0xfeb, - { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, - { "SONY DSLR-A700", 126, 0, - { 5775,-805,-359,-8574,16295,2391,-1943,2341,7249 } }, - { "SONY DSLR-A850", 128, 0, - { 5413,-1162,-365,-5665,13098,2866,-608,1179,8440 } }, - { "SONY DSLR-A900", 128, 0, - { 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } }, - { "SONY NEX-5N", 128, 0, - { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "SONY NEX-3", 138, 0, /* DJC */ - { 6907,-1256,-645,-4940,12621,2320,-1710,2581,6230 } }, - { "SONY NEX-5", 116, 0, /* DJC */ - { 6807,-1350,-342,-4216,11649,2567,-1089,2001,6420 } }, - { "SONY NEX-3", 128, 0, /* Adobe */ - { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } }, - { "SONY NEX-5", 128, 0, /* Adobe */ - { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } }, - { "SONY NEX-7", 128, 0, - { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "SONY NEX", 128, 0, /* NEX-C3, NEX-F3 */ - { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "SONY SLT-A33", 128, 0, - { 6069,-1221,-366,-5221,12779,2734,-1024,2066,6834 } }, - { "SONY SLT-A35", 128, 0, - { 5986,-1618,-415,-4557,11820,3120,-681,1404,6971 } }, - { "SONY SLT-A37", 128, 0, - { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "SONY SLT-A55", 128, 0, - { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } }, - { "SONY SLT-A57", 128, 0, - { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "SONY SLT-A65", 128, 0, - { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "SONY SLT-A77", 128, 0, - { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } } - }; - double cam_xyz[4][3]; - char name[130]; - int i, j; - - sprintf (name, "%s %s", make, model); - for (i=0; i < sizeof table / sizeof *table; i++) - if (!strncmp (name, table[i].prefix, strlen(table[i].prefix))) { - if (table[i].black) black = (ushort) table[i].black; - if (table[i].maximum) maximum = (ushort) table[i].maximum; - if (table[i].trans[0]) { - for (j=0; j < 12; j++) - cam_xyz[0][j] = table[i].trans[j] / 10000.0; - cam_xyz_coeff (cam_xyz); - } - break; - } -} - -void CLASS simple_coeff (int index) -{ - static const float table[][12] = { - /* index 0 -- all Foveon cameras */ - { 1.4032,-0.2231,-0.1016,-0.5263,1.4816,0.017,-0.0112,0.0183,0.9113 }, - /* index 1 -- Kodak DC20 and DC25 */ - { 2.25,0.75,-1.75,-0.25,-0.25,0.75,0.75,-0.25,-0.25,-1.75,0.75,2.25 }, - /* index 2 -- Logitech Fotoman Pixtura */ - { 1.893,-0.418,-0.476,-0.495,1.773,-0.278,-1.017,-0.655,2.672 }, - /* index 3 -- Nikon E880, E900, and E990 */ - { -1.936280, 1.800443, -1.448486, 2.584324, - 1.405365, -0.524955, -0.289090, 0.408680, - -1.204965, 1.082304, 2.941367, -1.818705 } - }; - int i, c; - - for (raw_color = i=0; i < 3; i++) - FORCC rgb_cam[i][c] = table[index][i*colors+c]; -} - -short CLASS guess_byte_order (int words) -{ - uchar test[4][2]; - int t=2, msb; - double diff, sum[2] = {0,0}; - - fread (test[0], 2, 2, ifp); - for (words-=2; words--; ) { - fread (test[t], 2, 1, ifp); - for (msb=0; msb < 2; msb++) { - diff = (test[t^2][msb] << 8 | test[t^2][!msb]) - - (test[t ][msb] << 8 | test[t ][!msb]); - sum[msb] += diff*diff; - } - t = (t+1) & 3; - } - return sum[0] < sum[1] ? 0x4d4d : 0x4949; -} - -float CLASS find_green (int bps, int bite, int off0, int off1) -{ - UINT64 bitbuf=0; - int vbits, col, i, c; - ushort img[2][2064]; - double sum[]={0,0}; - - FORC(2) { - fseek (ifp, c ? off1:off0, SEEK_SET); - for (vbits=col=0; col < width; col++) { - for (vbits -= bps; vbits < 0; vbits += bite) { - bitbuf <<= bite; - for (i=0; i < bite; i+=8) - bitbuf |= (unsigned) (fgetc(ifp) << i); - } - img[c][col] = bitbuf << (64-bps-vbits) >> (64-bps); - } - } - FORC(width-1) { - sum[ c & 1] += ABS(img[0][c]-img[1][c+1]); - sum[~c & 1] += ABS(img[1][c]-img[0][c+1]); - } - return 100 * log(sum[0]/sum[1]); -} - -/* - Identify which camera created this file, and set global variables - accordingly. - */ -void CLASS identify() -{ - char head[32], *cp; - int hlen, flen, fsize, zero_fsize=1, i, c, is_canon; - struct jhead jh; - short pana[][6] = { - { 3130, 1743, 4, 0, -6, 0 }, - { 3130, 2055, 4, 0, -6, 0 }, - { 3130, 2319, 4, 0, -6, 0 }, - { 3170, 2103, 18, 0,-42, 20 }, - { 3170, 2367, 18, 13,-42,-21 }, - { 3177, 2367, 0, 0, -1, 0 }, - { 3304, 2458, 0, 0, -1, 0 }, - { 3330, 2463, 9, 0, -5, 0 }, - { 3330, 2479, 9, 0,-17, 4 }, - { 3370, 1899, 15, 0,-44, 20 }, - { 3370, 2235, 15, 0,-44, 20 }, - { 3370, 2511, 15, 10,-44,-21 }, - { 3690, 2751, 3, 0, -8, -3 }, - { 3710, 2751, 0, 0, -3, 0 }, - { 3724, 2450, 0, 0, 0, -2 }, - { 3770, 2487, 17, 0,-44, 19 }, - { 3770, 2799, 17, 15,-44,-19 }, - { 3880, 2170, 6, 0, -6, 0 }, - { 4060, 3018, 0, 0, 0, -2 }, - { 4290, 2391, 3, 0, -8, -1 }, - { 4330, 2439, 17, 15,-44,-19 }, - { 4508, 2962, 0, 0, -3, -4 }, - { 4508, 3330, 0, 0, -3, -6 } }; - static const struct { - int fsize; - char make[12], model[19], withjpeg; - } table[] = { - { 62464, "Kodak", "DC20" ,0 }, - { 124928, "Kodak", "DC20" ,0 }, - { 1652736, "Kodak", "DCS200" ,0 }, - { 4159302, "Kodak", "C330" ,0 }, - { 4162462, "Kodak", "C330" ,0 }, - { 460800, "Kodak", "C603v" ,0 }, - { 614400, "Kodak", "C603v" ,0 }, - { 6163328, "Kodak", "C603" ,0 }, - { 6166488, "Kodak", "C603" ,0 }, - { 9116448, "Kodak", "C603y" ,0 }, - { 311696, "ST Micro", "STV680 VGA" ,0 }, /* SPYz */ - { 787456, "Creative", "PC-CAM 600" ,0 }, - { 1138688, "Minolta", "RD175" ,0 }, - { 3840000, "Foculus", "531C" ,0 }, - { 307200, "Generic", "640x480" ,0 }, - { 786432, "AVT", "F-080C" ,0 }, - { 1447680, "AVT", "F-145C" ,0 }, - { 1920000, "AVT", "F-201C" ,0 }, - { 5067304, "AVT", "F-510C" ,0 }, - { 5067316, "AVT", "F-510C" ,0 }, - { 10134608, "AVT", "F-510C" ,0 }, - { 10134620, "AVT", "F-510C" ,0 }, - { 16157136, "AVT", "F-810C" ,0 }, - { 1409024, "Sony", "XCD-SX910CR" ,0 }, - { 2818048, "Sony", "XCD-SX910CR" ,0 }, - { 3884928, "Micron", "2010" ,0 }, - { 6624000, "Pixelink", "A782" ,0 }, - { 13248000, "Pixelink", "A782" ,0 }, - { 6291456, "RoverShot","3320AF" ,0 }, - { 6553440, "Canon", "PowerShot A460" ,0 }, - { 6653280, "Canon", "PowerShot A530" ,0 }, - { 6573120, "Canon", "PowerShot A610" ,0 }, - { 9219600, "Canon", "PowerShot A620" ,0 }, - { 9243240, "Canon", "PowerShot A470" ,0 }, - { 10341600, "Canon", "PowerShot A720 IS",0 }, - { 10383120, "Canon", "PowerShot A630" ,0 }, - { 12945240, "Canon", "PowerShot A640" ,0 }, - { 15636240, "Canon", "PowerShot A650" ,0 }, - { 5298000, "Canon", "PowerShot SD300" ,0 }, - { 7710960, "Canon", "PowerShot S3 IS" ,0 }, - { 15467760, "Canon", "PowerShot SX110 IS",0 }, - { 15534576, "Canon", "PowerShot SX120 IS",0 }, - { 18653760, "Canon", "PowerShot SX20 IS",0 }, - { 19131120, "Canon", "PowerShot SX220 HS",0 }, - { 21936096, "Canon", "PowerShot SX30 IS",0 }, - { 5939200, "OLYMPUS", "C770UZ" ,0 }, - { 1581060, "NIKON", "E900" ,1 }, /* or E900s,E910 */ - { 2465792, "NIKON", "E950" ,1 }, /* or E800,E700 */ - { 2940928, "NIKON", "E2100" ,1 }, /* or E2500 */ - { 4771840, "NIKON", "E990" ,1 }, /* or E995, Oly C3030Z */ - { 4775936, "NIKON", "E3700" ,1 }, /* or Optio 33WR */ - { 5869568, "NIKON", "E4300" ,1 }, /* or DiMAGE Z2 */ - { 5865472, "NIKON", "E4500" ,1 }, - { 7438336, "NIKON", "E5000" ,1 }, /* or E5700 */ - { 8998912, "NIKON", "COOLPIX S6" ,1 }, - { 1976352, "CASIO", "QV-2000UX" ,1 }, - { 3217760, "CASIO", "QV-3*00EX" ,1 }, - { 6218368, "CASIO", "QV-5700" ,1 }, - { 6054400, "CASIO", "QV-R41" ,1 }, - { 7530816, "CASIO", "QV-R51" ,1 }, - { 7684000, "CASIO", "QV-4000" ,1 }, - { 2937856, "CASIO", "EX-S20" ,1 }, - { 4948608, "CASIO", "EX-S100" ,1 }, - { 7542528, "CASIO", "EX-Z50" ,1 }, - { 7562048, "CASIO", "EX-Z500" ,1 }, - { 7753344, "CASIO", "EX-Z55" ,1 }, - { 7816704, "CASIO", "EX-Z60" ,1 }, - { 10843712, "CASIO", "EX-Z75" ,1 }, - { 10834368, "CASIO", "EX-Z750" ,1 }, - { 12310144, "CASIO", "EX-Z850" ,1 }, - { 12489984, "CASIO", "EX-Z8" ,1 }, - { 15499264, "CASIO", "EX-Z1050" ,1 }, - { 7426656, "CASIO", "EX-P505" ,1 }, - { 9313536, "CASIO", "EX-P600" ,1 }, - { 10979200, "CASIO", "EX-P700" ,1 }, - { 3178560, "PENTAX", "Optio S" ,1 }, - { 4841984, "PENTAX", "Optio S" ,1 }, - { 6114240, "PENTAX", "Optio S4" ,1 }, /* or S4i, CASIO EX-Z4 */ - { 10702848, "PENTAX", "Optio 750Z" ,1 }, - { 15980544, "AGFAPHOTO","DC-833m" ,1 }, - { 16098048, "SAMSUNG", "S85" ,1 }, - { 16215552, "SAMSUNG", "S85" ,1 }, - { 20487168, "SAMSUNG", "WB550" ,1 }, - { 24000000, "SAMSUNG", "WB550" ,1 }, - { 12582980, "Sinar", "" ,0 }, - { 33292868, "Sinar", "" ,0 }, - { 44390468, "Sinar", "" ,0 } }; - static const char *corp[] = - { "Canon", "NIKON", "EPSON", "KODAK", "Kodak", "OLYMPUS", "PENTAX", - "MINOLTA", "Minolta", "Konica", "CASIO", "Sinar", "Phase One", - "SAMSUNG", "Mamiya", "MOTOROLA", "LEICA" }; - - tiff_flip = flip = filters = -1; /* 0 is valid, so -1 is unknown */ - raw_height = raw_width = fuji_width = fuji_layout = cr2_slice[0] = 0; - maximum = height = width = top_margin = left_margin = 0; - cdesc[0] = desc[0] = artist[0] = make[0] = model[0] = model2[0] = 0; - iso_speed = shutter = aperture = focal_len = unique_id = 0; - tiff_nifds = 0; - memset (tiff_ifd, 0, sizeof tiff_ifd); - memset (gpsdata, 0, sizeof gpsdata); - memset (cblack, 0, sizeof cblack); - memset (white, 0, sizeof white); - memset (mask, 0, sizeof mask); - thumb_offset = thumb_length = thumb_width = thumb_height = 0; - load_raw = thumb_load_raw = 0; - write_thumb = &CLASS jpeg_thumb; - data_offset = meta_length = tiff_bps = tiff_compress = 0; - kodak_cbpp = zero_after_ff = dng_version = load_flags = 0; - timestamp = shot_order = tiff_samples = black = is_foveon = 0; - mix_green = profile_length = data_error = zero_is_bad = 0; - pixel_aspect = is_raw = raw_color = 1; - tile_width = tile_length = 0; - for (i=0; i < 4; i++) { - cam_mul[i] = i == 1; - pre_mul[i] = i < 3; - FORC3 cmatrix[c][i] = 0; - FORC3 rgb_cam[c][i] = c == i; - } - colors = 3; - for (i=0; i < 0x10000; i++) curve[i] = i; - - order = get2(); - hlen = get4(); - fseek (ifp, 0, SEEK_SET); - fread (head, 1, 32, ifp); - fseek (ifp, 0, SEEK_END); - flen = fsize = ftell(ifp); - if ((cp = (char *) memmem (head, 32, "MMMM", 4)) || - (cp = (char *) memmem (head, 32, "IIII", 4))) { - parse_phase_one (cp-head); - if (cp-head && parse_tiff(0)) apply_tiff(); - } else if (order == 0x4949 || order == 0x4d4d) { - if (!memcmp (head+6,"HEAPCCDR",8)) { - data_offset = hlen; - parse_ciff (hlen, flen - hlen); - } else if (parse_tiff(0)) apply_tiff(); - } else if (!memcmp (head,"\xff\xd8\xff\xe1",4) && - !memcmp (head+6,"Exif",4)) { - fseek (ifp, 4, SEEK_SET); - data_offset = 4 + get2(); - fseek (ifp, data_offset, SEEK_SET); - if (fgetc(ifp) != 0xff) - parse_tiff(12); - thumb_offset = 0; - } else if (!memcmp (head+25,"ARECOYK",7)) { - strcpy (make, "Contax"); - strcpy (model,"N Digital"); - fseek (ifp, 33, SEEK_SET); - get_timestamp(1); - fseek (ifp, 60, SEEK_SET); - FORC4 cam_mul[c ^ (c >> 1)] = get4(); - } else if (!strcmp (head, "PXN")) { - strcpy (make, "Logitech"); - strcpy (model,"Fotoman Pixtura"); - } else if (!strcmp (head, "qktk")) { - strcpy (make, "Apple"); - strcpy (model,"QuickTake 100"); - load_raw = &CLASS quicktake_100_load_raw; - } else if (!strcmp (head, "qktn")) { - strcpy (make, "Apple"); - strcpy (model,"QuickTake 150"); - load_raw = &CLASS kodak_radc_load_raw; - } else if (!memcmp (head,"FUJIFILM",8)) { - fseek (ifp, 84, SEEK_SET); - thumb_offset = get4(); - thumb_length = get4(); - fseek (ifp, 92, SEEK_SET); - parse_fuji (get4()); - if (thumb_offset > 120) { - fseek (ifp, 120, SEEK_SET); - is_raw += (i = get4()) && 1; - if (is_raw == 2 && shot_select) - parse_fuji (i); - } - load_raw = &CLASS unpacked_load_raw; - fseek (ifp, 100+28*(shot_select > 0), SEEK_SET); - parse_tiff (data_offset = get4()); - parse_tiff (thumb_offset+12); - apply_tiff(); - } else if (!memcmp (head,"RIFF",4)) { - fseek (ifp, 0, SEEK_SET); - parse_riff(); - } else if (!memcmp (head,"\0\001\0\001\0@",6)) { - fseek (ifp, 6, SEEK_SET); - fread (make, 1, 8, ifp); - fread (model, 1, 8, ifp); - fread (model2, 1, 16, ifp); - data_offset = get2(); - get2(); - raw_width = get2(); - raw_height = get2(); - load_raw = &CLASS nokia_load_raw; - filters = 0x61616161; - } else if (!memcmp (head,"NOKIARAW",8)) { - strcpy (make, "NOKIA"); - strcpy (model, "X2"); - order = 0x4949; - fseek (ifp, 300, SEEK_SET); - data_offset = get4(); - i = get4(); - width = get2(); - height = get2(); - data_offset += i - width * 5 / 4 * height; - load_raw = &CLASS nokia_load_raw; - filters = 0x61616161; - } else if (!memcmp (head,"ARRI",4)) { - order = 0x4949; - fseek (ifp, 20, SEEK_SET); - width = get4(); - height = get4(); - strcpy (make, "ARRI"); - fseek (ifp, 668, SEEK_SET); - fread (model, 1, 64, ifp); - data_offset = 4096; - load_raw = &CLASS packed_load_raw; - load_flags = 88; - filters = 0x61616161; - } else if (!memcmp (head+4,"RED1",4)) { - strcpy (make, "RED"); - strcpy (model,"ONE"); - parse_redcine(); - load_raw = &CLASS redcine_load_raw; - gamma_curve (1/2.4, 12.92, 1, 4095); - filters = 0x49494949; - } else if (!memcmp (head,"DSC-Image",9)) - parse_rollei(); - else if (!memcmp (head,"PWAD",4)) - parse_sinar_ia(); - else if (!memcmp (head,"\0MRM",4)) - parse_minolta(0); - else if (!memcmp (head,"FOVb",4)) - parse_foveon(); - else if (!memcmp (head,"CI",2)) - parse_cine(); - else - for (zero_fsize=i=0; i < sizeof table / sizeof *table; i++) - if (fsize == table[i].fsize) { - strcpy (make, table[i].make ); - strcpy (model, table[i].model); - if (table[i].withjpeg) - parse_external_jpeg(); - } - if (zero_fsize) fsize = 0; - if (make[0] == 0) parse_smal (0, flen); - if (make[0] == 0) parse_jpeg (is_raw = 0); - - for (i=0; i < sizeof corp / sizeof *corp; i++) - if (strstr (make, corp[i])) /* Simplify company names */ - strcpy (make, corp[i]); - if (!strncmp (make,"KODAK",5) && - ((cp = strstr(model," DIGITAL CAMERA")) || - (cp = strstr(model," Digital Camera")) || - (cp = strstr(model,"FILE VERSION")))) - *cp = 0; - cp = make + strlen(make); /* Remove trailing spaces */ - while (*--cp == ' ') *cp = 0; - cp = model + strlen(model); - while (*--cp == ' ') *cp = 0; - i = strlen(make); /* Remove make from model */ - if (!strncasecmp (model, make, i) && model[i++] == ' ') - memmove (model, model+i, 64-i); - if (!strncmp (model,"FinePix ",8)) - strcpy (model, model+8); - if (!strncmp (model,"Digital Camera ",15)) - strcpy (model, model+15); - desc[511] = artist[63] = make[63] = model[63] = model2[63] = 0; - if (!is_raw) goto notraw; - - if (!height) height = raw_height; - if (!width) width = raw_width; - if (height == 2624 && width == 3936) /* Pentax K10D and Samsung GX10 */ - { height = 2616; width = 3896; } - if (height == 3136 && width == 4864) /* Pentax K20D and Samsung GX20 */ - { height = 3124; width = 4688; filters = 0x16161616; } - if (width == 4352 && (!strcmp(model,"K-r") || !strcmp(model,"K-x"))) - { width = 4309; filters = 0x16161616; } - if (width >= 4960 && !strcmp(model,"K-5")) - { left_margin = 10; width = 4950; filters = 0x16161616; } - if (width == 4736 && !strcmp(model,"K-7")) - { height = 3122; width = 4684; filters = 0x16161616; top_margin = 2; } - if (width == 7424 && !strcmp(model,"645D")) - { height = 5502; width = 7328; filters = 0x61616161; top_margin = 29; - left_margin = 48; } - if (height == 3014 && width == 4096) /* Ricoh GX200 */ - width = 4014; - if (dng_version) { - if (filters == UINT_MAX) filters = 0; - if (filters) is_raw = tiff_samples; - else colors = tiff_samples; - if (tiff_compress == 1) - load_raw = &CLASS packed_dng_load_raw; - if (tiff_compress == 7) - load_raw = &CLASS lossless_dng_load_raw; - goto dng_skip; - } - if ((is_canon = !strcmp(make,"Canon"))) - load_raw = memcmp (head+6,"HEAPCCDR",8) ? - &CLASS lossless_jpeg_load_raw : &CLASS canon_load_raw; - if (!strcmp(make,"NIKON")) { - if (!load_raw) - load_raw = &CLASS packed_load_raw; - if (model[0] == 'E') - load_flags |= !data_offset << 2 | 2; - } - if (!strcmp(make,"CASIO")) { - load_raw = &CLASS packed_load_raw; - maximum = 0xf7f; - } - -/* Set parameters based on camera name (for non-DNG files). */ - - if (is_foveon) { - if (height*2 < width) pixel_aspect = 0.5; - if (height > width) pixel_aspect = 2; - filters = 0; - simple_coeff(0); - } else if (is_canon && tiff_bps == 15) { - switch (width) { - case 3344: width -= 66; - case 3872: width -= 6; - } - filters = 0; - load_raw = &CLASS canon_sraw_load_raw; - } else if (!strcmp(model,"PowerShot 600")) { - height = 613; - width = 854; - raw_width = 896; - pixel_aspect = 607/628.0; - colors = 4; - filters = 0xe1e4e1e4; - load_raw = &CLASS canon_600_load_raw; - } else if (!strcmp(model,"PowerShot A5") || - !strcmp(model,"PowerShot A5 Zoom")) { - height = 773; - width = 960; - raw_width = 992; - pixel_aspect = 256/235.0; - colors = 4; - filters = 0x1e4e1e4e; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A50")) { - height = 968; - width = 1290; - raw_width = 1320; - colors = 4; - filters = 0x1b4e4b1e; - goto canon_a5; - } else if (!strcmp(model,"PowerShot Pro70")) { - height = 1024; - width = 1552; - colors = 4; - filters = 0x1e4b4e1b; - goto canon_a5; - } else if (!strcmp(model,"PowerShot SD300")) { - height = 1752; - width = 2344; - raw_height = 1766; - raw_width = 2400; - top_margin = 12; - left_margin = 12; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A460")) { - height = 1960; - width = 2616; - raw_height = 1968; - raw_width = 2664; - top_margin = 4; - left_margin = 4; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A530")) { - height = 1984; - width = 2620; - raw_height = 1992; - raw_width = 2672; - top_margin = 6; - left_margin = 10; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A610")) { - if (canon_s2is()) strcpy (model+10, "S2 IS"); - height = 1960; - width = 2616; - raw_height = 1968; - raw_width = 2672; - top_margin = 8; - left_margin = 12; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A620")) { - height = 2328; - width = 3112; - raw_height = 2340; - raw_width = 3152; - top_margin = 12; - left_margin = 36; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A470")) { - height = 2328; - width = 3096; - raw_height = 2346; - raw_width = 3152; - top_margin = 6; - left_margin = 12; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A720 IS")) { - height = 2472; - width = 3298; - raw_height = 2480; - raw_width = 3336; - top_margin = 5; - left_margin = 6; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A630")) { - height = 2472; - width = 3288; - raw_height = 2484; - raw_width = 3344; - top_margin = 6; - left_margin = 12; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A640")) { - height = 2760; - width = 3672; - raw_height = 2772; - raw_width = 3736; - top_margin = 6; - left_margin = 12; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A650")) { - height = 3024; - width = 4032; - raw_height = 3048; - raw_width = 4104; - top_margin = 12; - left_margin = 48; - goto canon_a5; - } else if (!strcmp(model,"PowerShot S3 IS")) { - height = 2128; - width = 2840; - raw_height = 2136; - raw_width = 2888; - top_margin = 8; - left_margin = 44; -canon_a5: - tiff_bps = 10; - load_raw = &CLASS packed_load_raw; - load_flags = 40; - if (raw_width > 1600) zero_is_bad = 1; - } else if (!strcmp(model,"PowerShot SX110 IS")) { - height = 2760; - width = 3684; - raw_height = 2772; - raw_width = 3720; - top_margin = 12; - left_margin = 6; - load_raw = &CLASS packed_load_raw; - load_flags = 40; - zero_is_bad = 1; - } else if (!strcmp(model,"PowerShot SX120 IS")) { - height = 2742; - width = 3664; - raw_height = 2778; - raw_width = 3728; - top_margin = 18; - left_margin = 16; - filters = 0x49494949; - load_raw = &CLASS packed_load_raw; - load_flags = 40; - zero_is_bad = 1; - } else if (!strcmp(model,"PowerShot SX20 IS")) { - height = 3024; - width = 4032; - raw_height = 3048; - raw_width = 4080; - top_margin = 12; - left_margin = 24; - load_raw = &CLASS packed_load_raw; - load_flags = 40; - zero_is_bad = 1; - } else if (!strcmp(model,"PowerShot SX220 HS")) { - height = 3043; - width = 4072; - raw_height = 3060; - raw_width = 4168; - mask[0][0] = top_margin = 16; - mask[0][2] = top_margin + height; - mask[0][3] = left_margin = 92; - load_raw = &CLASS packed_load_raw; - load_flags = 8; - zero_is_bad = 1; - } else if (!strcmp(model,"PowerShot SX30 IS")) { - height = 3254; - width = 4366; - raw_height = 3276; - raw_width = 4464; - top_margin = 10; - left_margin = 25; - filters = 0x16161616; - load_raw = &CLASS packed_load_raw; - load_flags = 40; - zero_is_bad = 1; - } else if (!strcmp(model,"PowerShot Pro90 IS")) { - width = 1896; - colors = 4; - filters = 0xb4b4b4b4; - } else if (is_canon && raw_width == 2144) { - height = 1550; - width = 2088; - top_margin = 8; - left_margin = 4; - if (!strcmp(model,"PowerShot G1")) { - colors = 4; - filters = 0xb4b4b4b4; - } - } else if (is_canon && raw_width == 2224) { - height = 1448; - width = 2176; - top_margin = 6; - left_margin = 48; - } else if (is_canon && raw_width == 2376) { - height = 1720; - width = 2312; - top_margin = 6; - left_margin = 12; - } else if (is_canon && raw_width == 2672) { - height = 1960; - width = 2616; - top_margin = 6; - left_margin = 12; - } else if (is_canon && raw_width == 3152) { - height = 2056; - width = 3088; - top_margin = 12; - left_margin = 64; - if (unique_id == 0x80000170) - adobe_coeff ("Canon","EOS 300D"); - } else if (is_canon && raw_width == 3160) { - height = 2328; - width = 3112; - top_margin = 12; - left_margin = 44; - } else if (is_canon && raw_width == 3344) { - height = 2472; - width = 3288; - top_margin = 6; - left_margin = 4; - } else if (!strcmp(model,"EOS D2000C")) { - filters = 0x61616161; - black = curve[200]; - } else if (is_canon && raw_width == 3516) { - top_margin = 14; - left_margin = 42; - if (unique_id == 0x80000189) - adobe_coeff ("Canon","EOS 350D"); - goto canon_cr2; - } else if (is_canon && raw_width == 3596) { - top_margin = 12; - left_margin = 74; - goto canon_cr2; - } else if (is_canon && raw_width == 3744) { - height = 2760; - width = 3684; - top_margin = 16; - left_margin = 8; - if (unique_id > 0x2720000) { - top_margin = 12; - left_margin = 52; - } - } else if (is_canon && raw_width == 3944) { - height = 2602; - width = 3908; - top_margin = 18; - left_margin = 30; - } else if (is_canon && raw_width == 3948) { - top_margin = 18; - left_margin = 42; - height -= 2; - if (unique_id == 0x80000236) - adobe_coeff ("Canon","EOS 400D"); - if (unique_id == 0x80000254) - adobe_coeff ("Canon","EOS 1000D"); - goto canon_cr2; - } else if (is_canon && raw_width == 3984) { - top_margin = 20; - left_margin = 76; - height -= 2; - goto canon_cr2; - } else if (is_canon && raw_width == 4104) { - height = 3024; - width = 4032; - top_margin = 12; - left_margin = 48; - } else if (is_canon && raw_width == 4152) { - top_margin = 12; - left_margin = 192; - goto canon_cr2; - } else if (is_canon && raw_width == 4160) { - height = 3048; - width = 4048; - top_margin = 11; - left_margin = 104; - } else if (is_canon && raw_width == 4312) { - top_margin = 18; - left_margin = 22; - height -= 2; - if (unique_id == 0x80000176) - adobe_coeff ("Canon","EOS 450D"); - goto canon_cr2; - } else if (is_canon && raw_width == 4352) { - top_margin = 18; - left_margin = 62; - if (unique_id == 0x80000288) - adobe_coeff ("Canon","EOS 1100D"); - goto canon_cr2; - } else if (is_canon && raw_width == 4476) { - top_margin = 34; - left_margin = 90; - goto canon_cr2; - } else if (is_canon && raw_width == 4480) { - height = 3326; - width = 4432; - top_margin = 10; - left_margin = 12; - filters = 0x49494949; - } else if (is_canon && raw_width == 4496) { - height = 3316; - width = 4404; - top_margin = 50; - left_margin = 80; - } else if (is_canon && raw_width == 4832) { - top_margin = unique_id == 0x80000261 ? 51:26; - left_margin = 62; - if (unique_id == 0x80000252) - adobe_coeff ("Canon","EOS 500D"); - goto canon_cr2; - } else if (is_canon && raw_width == 5108) { - top_margin = 13; - left_margin = 98; - goto canon_cr2; - } else if (is_canon && raw_width == 5120) { - height -= top_margin = 45; - left_margin = 142; - width = 4916; - } else if (is_canon && raw_width == 5344) { - top_margin = 51; - left_margin = 142; - if (unique_id == 0x80000269) { - top_margin = 100; - left_margin = 126; - height -= 2; - adobe_coeff ("Canon","EOS-1D X"); - } - if (unique_id == 0x80000270) - adobe_coeff ("Canon","EOS 550D"); - if (unique_id == 0x80000286) - adobe_coeff ("Canon","EOS 600D"); - goto canon_cr2; - } else if (is_canon && raw_width == 5360) { - top_margin = 51; - left_margin = 158; - goto canon_cr2; - } else if (is_canon && raw_width == 5712) { - height = 3752; - width = 5640; - top_margin = 20; - left_margin = 62; - } else if (is_canon && raw_width == 5792) { - top_margin = 51; - left_margin = 158; -canon_cr2: - height -= top_margin; - width -= left_margin; - } else if (is_canon && raw_width == 5920) { - height = 3870; - width = 5796; - top_margin = 80; - left_margin = 122; - } else if (!strcmp(model,"D1")) { - cam_mul[0] *= 256/527.0; - cam_mul[2] *= 256/317.0; - } else if (!strcmp(model,"D1X")) { - width -= 4; - pixel_aspect = 0.5; - } else if (!strcmp(model,"D40X") || - !strcmp(model,"D60") || - !strcmp(model,"D80") || - !strcmp(model,"D3000")) { - height -= 3; - width -= 4; - } else if (!strcmp(model,"D3") || - !strcmp(model,"D3S") || - !strcmp(model,"D700")) { - width -= 4; - left_margin = 2; - } else if (!strcmp(model,"D3100")) { - width -= 28; - left_margin = 6; - } else if (!strcmp(model,"D5000") || - !strcmp(model,"D90")) { - width -= 42; - } else if (!strcmp(model,"D5100") || - !strcmp(model,"D7000")) { - width -= 44; - } else if (!strcmp(model,"D3200") || - !strcmp(model,"D800")) { - width -= 46; - } else if (!strcmp(model,"D4")) { - width -= 52; - left_margin = 2; - } else if (!strncmp(model,"D40",3) || - !strncmp(model,"D50",3) || - !strncmp(model,"D70",3)) { - width--; - } else if (!strcmp(model,"D100")) { - if (tiff_compress == 34713 && !nikon_is_compressed()) { - load_raw = &CLASS packed_load_raw; - load_flags |= 1; - raw_width = (width += 3) + 3; - } - } else if (!strcmp(model,"D200")) { - left_margin = 1; - width -= 4; - filters = 0x94949494; - } else if (!strncmp(model,"D2H",3)) { - left_margin = 6; - width -= 14; - } else if (!strncmp(model,"D2X",3)) { - if (width == 3264) width -= 32; - else width -= 8; - } else if (!strncmp(model,"D300",4)) { - width -= 32; - } else if (!strncmp(model,"COOLPIX P",9)) { - load_flags = 24; - filters = 0x94949494; - if (model[9] == '7' && iso_speed >= 400) - black = 255; - } else if (!strncmp(model,"1 ",2)) { - height -= 2; - } else if (fsize == 1581060) { - height = 963; - width = 1287; - raw_width = 1632; - maximum = 0x3f4; - colors = 4; - filters = 0x1e1e1e1e; - simple_coeff(3); - pre_mul[0] = 1.2085; - pre_mul[1] = 1.0943; - pre_mul[3] = 1.1103; - goto e900; - } else if (fsize == 2465792) { - height = 1203; - width = 1616; - raw_width = 2048; - colors = 4; - filters = 0x4b4b4b4b; - adobe_coeff ("NIKON","E950"); -e900: - tiff_bps = 10; - load_raw = &CLASS packed_load_raw; - load_flags = 6; - } else if (fsize == 4771840) { - height = 1540; - width = 2064; - colors = 4; - filters = 0xe1e1e1e1; - load_raw = &CLASS packed_load_raw; - load_flags = 6; - if (!timestamp && nikon_e995()) - strcpy (model, "E995"); - if (strcmp(model,"E995")) { - filters = 0xb4b4b4b4; - simple_coeff(3); - pre_mul[0] = 1.196; - pre_mul[1] = 1.246; - pre_mul[2] = 1.018; - } - } else if (!strcmp(model,"E2100")) { - if (!timestamp && !nikon_e2100()) goto cp_e2500; - height = 1206; - width = 1616; - load_flags = 30; - } else if (!strcmp(model,"E2500")) { -cp_e2500: - strcpy (model, "E2500"); - height = 1204; - width = 1616; - colors = 4; - filters = 0x4b4b4b4b; - } else if (fsize == 4775936) { - height = 1542; - width = 2064; - load_raw = &CLASS packed_load_raw; - load_flags = 30; - if (!timestamp) nikon_3700(); - if (model[0] == 'E' && atoi(model+1) < 3700) - filters = 0x49494949; - if (!strcmp(model,"Optio 33WR")) { - flip = 1; - filters = 0x16161616; - } - if (make[0] == 'O') { - i = find_green (12, 32, 1188864, 3576832); - c = find_green (12, 32, 2383920, 2387016); - if (abs(i) < abs(c)) { - SWAP(i,c); - load_flags = 24; - } - if (i < 0) filters = 0x61616161; - } - } else if (fsize == 5869568) { - height = 1710; - width = 2288; - filters = 0x16161616; - if (!timestamp && minolta_z2()) { - strcpy (make, "Minolta"); - strcpy (model,"DiMAGE Z2"); - } - load_raw = &CLASS packed_load_raw; - load_flags = 6 + 24*(make[0] == 'M'); - } else if (!strcmp(model,"E4500")) { - height = 1708; - width = 2288; - colors = 4; - filters = 0xb4b4b4b4; - } else if (fsize == 7438336) { - height = 1924; - width = 2576; - colors = 4; - filters = 0xb4b4b4b4; - } else if (fsize == 8998912) { - height = 2118; - width = 2832; - maximum = 0xf83; - load_raw = &CLASS packed_load_raw; - load_flags = 30; - } else if (!strcmp(make,"FUJIFILM")) { - if (!strcmp(model+7,"S2Pro")) { - strcpy (model,"S2Pro"); - height = 2144; - width = 2880; - flip = 6; - } else if (load_raw != &CLASS packed_load_raw) - maximum = (is_raw == 2 && shot_select) ? 0x2f00 : 0x3e00; - top_margin = (raw_height - height) >> 2 << 1; - left_margin = (raw_width - width ) >> 2 << 1; - if (width == 3328) { - width = 3262; - left_margin = 34; - } - if (!strcmp(model,"X10") || !strcmp(model,"X-S1")) - filters = 0x16161616; - if (!strcmp(model,"X-Pro1")) { - left_margin = 0; - filters = 2; - } - if (fuji_layout) raw_width *= is_raw; - } else if (!strcmp(model,"RD175")) { - height = 986; - width = 1534; - data_offset = 513; - filters = 0x61616161; - load_raw = &CLASS minolta_rd175_load_raw; - } else if (!strcmp(model,"KD-400Z")) { - height = 1712; - width = 2312; - raw_width = 2336; - goto konica_400z; - } else if (!strcmp(model,"KD-510Z")) { - goto konica_510z; - } else if (!strcasecmp(make,"MINOLTA")) { - load_raw = &CLASS unpacked_load_raw; - maximum = 0xfff; - if (!strncmp(model,"DiMAGE A",8)) { - if (!strcmp(model,"DiMAGE A200")) - filters = 0x49494949; - tiff_bps = 12; - load_raw = &CLASS packed_load_raw; - } else if (!strncmp(model,"ALPHA",5) || - !strncmp(model,"DYNAX",5) || - !strncmp(model,"MAXXUM",6)) { - sprintf (model+20, "DYNAX %-10s", model+6+(model[0]=='M')); - adobe_coeff (make, model+20); - load_raw = &CLASS packed_load_raw; - } else if (!strncmp(model,"DiMAGE G",8)) { - if (model[8] == '4') { - height = 1716; - width = 2304; - } else if (model[8] == '5') { -konica_510z: - height = 1956; - width = 2607; - raw_width = 2624; - } else if (model[8] == '6') { - height = 2136; - width = 2848; - } - data_offset += 14; - filters = 0x61616161; -konica_400z: - load_raw = &CLASS unpacked_load_raw; - maximum = 0x3df; - order = 0x4d4d; - } - } else if (!strcmp(model,"*ist D")) { - load_raw = &CLASS unpacked_load_raw; - data_error = -1; - } else if (!strcmp(model,"*ist DS")) { - height -= 2; - } else if (!strcmp(model,"Optio S")) { - if (fsize == 3178560) { - height = 1540; - width = 2064; - load_raw = &CLASS eight_bit_load_raw; - cam_mul[0] *= 4; - cam_mul[2] *= 4; - } else { - height = 1544; - width = 2068; - raw_width = 3136; - load_raw = &CLASS packed_load_raw; - maximum = 0xf7c; - } - } else if (fsize == 6114240) { - height = 1737; - width = 2324; - raw_width = 3520; - load_raw = &CLASS packed_load_raw; - maximum = 0xf7a; - } else if (!strcmp(model,"Optio 750Z")) { - height = 2302; - width = 3072; - load_raw = &CLASS packed_load_raw; - load_flags = 30; - } else if (!strcmp(model,"DC-833m")) { - height = 2448; - width = 3264; - order = 0x4949; - filters = 0x61616161; - load_raw = &CLASS unpacked_load_raw; - maximum = 0xfc00; - } else if (!strncmp(model,"S85",3)) { - height = 2448; - width = 3264; - raw_width = fsize/height/2; - order = 0x4d4d; - load_raw = &CLASS unpacked_load_raw; - } else if (!strncmp(model,"NX1",3)) { - height -= top_margin = 8; - width -= 2 * (left_margin = 8); - load_flags = 32; - } else if (!strcmp(model,"NX200")) { - order = 0x4949; - height = 3694; - top_margin = 2; - width = 5574 - (left_margin = 32 + tiff_bps); - if (tiff_bps == 12) load_flags = 80; - } else if (!strcmp(model,"EX1")) { - order = 0x4949; - height -= 20; - top_margin = 2; - if ((width -= 6) > 3682) { - height -= 10; - width -= 46; - top_margin = 8; - } - } else if (!strcmp(model,"WB2000")) { - order = 0x4949; - height -= 3; - top_margin = 2; - if ((width -= 10) > 3718) { - height -= 28; - width -= 56; - top_margin = 8; - } - } else if (fsize == 20487168) { - height = 2808; - width = 3648; - goto wb550; - } else if (fsize == 24000000) { - height = 3000; - width = 4000; -wb550: - strcpy (model, "WB550"); - order = 0x4d4d; - load_raw = &CLASS unpacked_load_raw; - load_flags = 6; - maximum = 0x3df; - } else if (!strcmp(model,"STV680 VGA")) { - height = 484; - width = 644; - load_raw = &CLASS eight_bit_load_raw; - flip = 2; - filters = 0x16161616; - black = 16; - } else if (!strcmp(model,"N95")) { - height = raw_height - (top_margin = 2); - } else if (!strcmp(model,"531C")) { - height = 1200; - width = 1600; - load_raw = &CLASS unpacked_load_raw; - filters = 0x49494949; - } else if (!strcmp(model,"640x480")) { - height = 480; - width = 640; - load_raw = &CLASS eight_bit_load_raw; - gamma_curve (0.45, 4.5, 1, 255); - } else if (!strcmp(model,"F-080C")) { - height = 768; - width = 1024; - load_raw = &CLASS eight_bit_load_raw; - } else if (!strcmp(model,"F-145C")) { - height = 1040; - width = 1392; - load_raw = &CLASS eight_bit_load_raw; - } else if (!strcmp(model,"F-201C")) { - height = 1200; - width = 1600; - load_raw = &CLASS eight_bit_load_raw; - } else if (!strcmp(model,"F-510C")) { - height = 1958; - width = 2588; - load_raw = fsize < 7500000 ? - &CLASS eight_bit_load_raw : &CLASS unpacked_load_raw; - data_offset = fsize - width*height*(fsize >> 22); - maximum = 0xfff0; - } else if (!strcmp(model,"F-810C")) { - height = 2469; - width = 3272; - load_raw = &CLASS unpacked_load_raw; - maximum = 0xfff0; - } else if (!strcmp(model,"XCD-SX910CR")) { - height = 1024; - width = 1375; - raw_width = 1376; - filters = 0x49494949; - maximum = 0x3ff; - load_raw = fsize < 2000000 ? - &CLASS eight_bit_load_raw : &CLASS unpacked_load_raw; - } else if (!strcmp(model,"2010")) { - height = 1207; - width = 1608; - order = 0x4949; - filters = 0x16161616; - data_offset = 3212; - maximum = 0x3ff; - load_raw = &CLASS unpacked_load_raw; - } else if (!strcmp(model,"A782")) { - height = 3000; - width = 2208; - filters = 0x61616161; - load_raw = fsize < 10000000 ? - &CLASS eight_bit_load_raw : &CLASS unpacked_load_raw; - maximum = 0xffc0; - } else if (!strcmp(model,"3320AF")) { - height = 1536; - raw_width = width = 2048; - filters = 0x61616161; - load_raw = &CLASS unpacked_load_raw; - maximum = 0x3ff; - fseek (ifp, 0x300000, SEEK_SET); - if ((order = guess_byte_order(0x10000)) == 0x4d4d) { - height -= (top_margin = 16); - width -= (left_margin = 28); - maximum = 0xf5c0; - strcpy (make, "ISG"); - model[0] = 0; - } - } else if (!strcmp(make,"Hasselblad")) { - if (load_raw == &CLASS lossless_jpeg_load_raw) - load_raw = &CLASS hasselblad_load_raw; - if (raw_width == 7262) { - height = 5444; - width = 7248; - top_margin = 4; - left_margin = 7; - filters = 0x61616161; - } else if (raw_width == 7410) { - height = 5502; - width = 7328; - top_margin = 4; - left_margin = 41; - filters = 0x61616161; - } else if (raw_width == 9044) { - height = 6716; - width = 8964; - top_margin = 8; - left_margin = 40; - black += load_flags = 256; - maximum = 0x8101; - } else if (raw_width == 4090) { - strcpy (model, "V96C"); - height -= (top_margin = 6); - width -= (left_margin = 3) + 7; - filters = 0x61616161; - } - } else if (!strcmp(make,"Sinar")) { - if (!memcmp(head,"8BPS",4)) { - fseek (ifp, 14, SEEK_SET); - height = get4(); - width = get4(); - filters = 0x61616161; - data_offset = 68; - } - if (!load_raw) load_raw = &CLASS unpacked_load_raw; - maximum = 0x3fff; - } else if (!strcmp(make,"Leaf")) { - maximum = 0x3fff; - fseek (ifp, data_offset, SEEK_SET); - if (ljpeg_start (&jh, 1) && jh.bits == 15) - maximum = 0x1fff; - if (tiff_samples > 1) filters = 0; - if (tiff_samples > 1 || tile_length < raw_height) { - load_raw = &CLASS leaf_hdr_load_raw; - raw_width = tile_width; - } - if ((width | height) == 2048) { - if (tiff_samples == 1) { - filters = 1; - strcpy (cdesc, "RBTG"); - strcpy (model, "CatchLight"); - top_margin = 8; left_margin = 18; height = 2032; width = 2016; - } else { - strcpy (model, "DCB2"); - top_margin = 10; left_margin = 16; height = 2028; width = 2022; - } - } else if (width+height == 3144+2060) { - if (!model[0]) strcpy (model, "Cantare"); - if (width > height) { - top_margin = 6; left_margin = 32; height = 2048; width = 3072; - filters = 0x61616161; - } else { - left_margin = 6; top_margin = 32; width = 2048; height = 3072; - filters = 0x16161616; - } - if (!cam_mul[0] || model[0] == 'V') filters = 0; - else is_raw = tiff_samples; - } else if (width == 2116) { - strcpy (model, "Valeo 6"); - height -= 2 * (top_margin = 30); - width -= 2 * (left_margin = 55); - filters = 0x49494949; - } else if (width == 3171) { - strcpy (model, "Valeo 6"); - height -= 2 * (top_margin = 24); - width -= 2 * (left_margin = 24); - filters = 0x16161616; - } - } else if (!strcmp(make,"LEICA") || !strcmp(make,"Panasonic")) { - if ((flen - data_offset) / (raw_width*8/7) == raw_height) - load_raw = &CLASS panasonic_load_raw; - if (!load_raw) { - load_raw = &CLASS unpacked_load_raw; - load_flags = 4; - } - zero_is_bad = 1; - if ((height += 12) > raw_height) height = raw_height; - for (i=0; i < sizeof pana / sizeof *pana; i++) - if (raw_width == pana[i][0] && raw_height == pana[i][1]) { - left_margin = pana[i][2]; - top_margin = pana[i][3]; - width += pana[i][4]; - height += pana[i][5]; - } - filters = 0x01010101 * (uchar) "\x94\x61\x49\x16" - [((filters-1) ^ (left_margin & 1) ^ (top_margin << 1)) & 3]; - } else if (!strcmp(model,"C770UZ")) { - height = 1718; - width = 2304; - filters = 0x16161616; - load_raw = &CLASS packed_load_raw; - load_flags = 30; - } else if (!strcmp(make,"OLYMPUS")) { - height += height & 1; - filters = exif_cfa; - if (width == 4100) width -= 4; - if (width == 4080) width -= 24; - if (load_raw == &CLASS unpacked_load_raw) - load_flags = 4; - tiff_bps = 12; - if (!strcmp(model,"E-300") || - !strcmp(model,"E-500")) { - width -= 20; - if (load_raw == &CLASS unpacked_load_raw) { - maximum = 0xfc3; - memset (cblack, 0, sizeof cblack); - } - } else if (!strcmp(model,"E-330")) { - width -= 30; - if (load_raw == &CLASS unpacked_load_raw) - maximum = 0xf79; - } else if (!strcmp(model,"SP550UZ")) { - thumb_length = flen - (thumb_offset = 0xa39800); - thumb_height = 480; - thumb_width = 640; - } - } else if (!strcmp(model,"N Digital")) { - height = 2047; - width = 3072; - filters = 0x61616161; - data_offset = 0x1a00; - load_raw = &CLASS packed_load_raw; - } else if (!strcmp(model,"DSC-F828")) { - width = 3288; - left_margin = 5; - data_offset = 862144; - load_raw = &CLASS sony_load_raw; - filters = 0x9c9c9c9c; - colors = 4; - strcpy (cdesc, "RGBE"); - } else if (!strcmp(model,"DSC-V3")) { - width = 3109; - left_margin = 59; - data_offset = 787392; - load_raw = &CLASS sony_load_raw; - } else if (!strcmp(make,"SONY") && raw_width == 3984) { - adobe_coeff ("SONY","DSC-R1"); - width = 3925; - order = 0x4d4d; - } else if (!strcmp(make,"SONY") && raw_width == 6048) { - width -= 24; - } else if (!strcmp(model,"DSLR-A100")) { - if (width == 3880) { - height--; - width = ++raw_width; - } else { - order = 0x4d4d; - load_flags = 2; - } - filters = 0x61616161; - } else if (!strcmp(model,"DSLR-A350")) { - height -= 4; - } else if (!strcmp(model,"PIXL")) { - height -= top_margin = 4; - width -= left_margin = 32; - gamma_curve (0, 7, 1, 255); - } else if (!strcmp(model,"C603v")) { - height = 480; - width = 640; - if (fsize < 614400 || find_green (16, 16, 3840, 5120) < 25) goto c603v; - strcpy (model,"KAI-0340"); - height -= 3; - data_offset = 3840; - order = 0x4949; - load_raw = &CLASS unpacked_load_raw; - } else if (!strcmp(model,"C603y")) { - height = 2134; - width = 2848; -c603v: - filters = 0; - load_raw = &CLASS kodak_yrgb_load_raw; - gamma_curve (0, 3.875, 1, 255); - } else if (!strcmp(model,"C603")) { - raw_height = height = 2152; - raw_width = width = 2864; - goto c603; - } else if (!strcmp(model,"C330")) { - height = 1744; - width = 2336; - raw_height = 1779; - raw_width = 2338; - top_margin = 33; - left_margin = 1; -c603: - order = 0x4949; - if ((data_offset = fsize - raw_height*raw_width)) { - fseek (ifp, 168, SEEK_SET); - read_shorts (curve, 256); - } else gamma_curve (0, 3.875, 1, 255); - load_raw = &CLASS eight_bit_load_raw; - } else if (!strncasecmp(model,"EasyShare",9)) { - data_offset = data_offset < 0x15000 ? 0x15000 : 0x17000; - load_raw = &CLASS packed_load_raw; - } else if (!strcasecmp(make,"KODAK")) { - if (filters == UINT_MAX) filters = 0x61616161; - if (!strncmp(model,"NC2000",6)) { - width -= 4; - left_margin = 2; - } else if (!strcmp(model,"EOSDCS3B")) { - width -= 4; - left_margin = 2; - } else if (!strcmp(model,"EOSDCS1")) { - width -= 4; - left_margin = 2; - } else if (!strcmp(model,"DCS420")) { - width -= 4; - left_margin = 2; - } else if (!strncmp(model,"DCS460 ",7)) { - model[6] = 0; - width -= 4; - left_margin = 2; - } else if (!strcmp(model,"DCS460A")) { - width -= 4; - left_margin = 2; - colors = 1; - filters = 0; - } else if (!strcmp(model,"DCS660M")) { - black = 214; - colors = 1; - filters = 0; - } else if (!strcmp(model,"DCS760M")) { - colors = 1; - filters = 0; - } - if (!strcmp(model+4,"20X")) - strcpy (cdesc, "MYCY"); - if (strstr(model,"DC25")) { - strcpy (model, "DC25"); - data_offset = 15424; - } - if (!strncmp(model,"DC2",3)) { - raw_height = height = 242; - if (flen < 100000) { - raw_width = 256; width = 249; - pixel_aspect = (4.0*height) / (3.0*width); - } else { - raw_width = 512; width = 501; - pixel_aspect = (493.0*height) / (373.0*width); - } - data_offset += raw_width + 1; - colors = 4; - filters = 0x8d8d8d8d; - simple_coeff(1); - pre_mul[1] = 1.179; - pre_mul[2] = 1.209; - pre_mul[3] = 1.036; - load_raw = &CLASS eight_bit_load_raw; - } else if (!strcmp(model,"40")) { - strcpy (model, "DC40"); - height = 512; - width = 768; - data_offset = 1152; - load_raw = &CLASS kodak_radc_load_raw; - } else if (strstr(model,"DC50")) { - strcpy (model, "DC50"); - height = 512; - width = 768; - data_offset = 19712; - load_raw = &CLASS kodak_radc_load_raw; - } else if (strstr(model,"DC120")) { - strcpy (model, "DC120"); - height = 976; - width = 848; - pixel_aspect = height/0.75/width; - load_raw = tiff_compress == 7 ? - &CLASS kodak_jpeg_load_raw : &CLASS kodak_dc120_load_raw; - } else if (!strcmp(model,"DCS200")) { - thumb_height = 128; - thumb_width = 192; - thumb_offset = 6144; - thumb_misc = 360; - write_thumb = &CLASS layer_thumb; - height = 1024; - width = 1536; - data_offset = 79872; - load_raw = &CLASS eight_bit_load_raw; - black = 17; - } - } else if (!strcmp(model,"Fotoman Pixtura")) { - height = 512; - width = 768; - data_offset = 3632; - load_raw = &CLASS kodak_radc_load_raw; - filters = 0x61616161; - simple_coeff(2); - } else if (!strncmp(model,"QuickTake",9)) { - if (head[5]) strcpy (model+10, "200"); - fseek (ifp, 544, SEEK_SET); - height = get2(); - width = get2(); - data_offset = (get4(),get2()) == 30 ? 738:736; - if (height > width) { - SWAP(height,width); - fseek (ifp, data_offset-6, SEEK_SET); - flip = ~get2() & 3 ? 5:6; - } - filters = 0x61616161; - } else if (!strcmp(make,"Rollei") && !load_raw) { - switch (raw_width) { - case 1316: - height = 1030; - width = 1300; - top_margin = 1; - left_margin = 6; - break; - case 2568: - height = 1960; - width = 2560; - top_margin = 2; - left_margin = 8; - } - filters = 0x16161616; - load_raw = &CLASS rollei_load_raw; - } else if (!strcmp(model,"PC-CAM 600")) { - height = 768; - data_offset = width = 1024; - filters = 0x49494949; - load_raw = &CLASS eight_bit_load_raw; - } else if (!strcmp(model,"QV-2000UX")) { - height = 1208; - width = 1632; - data_offset = width * 2; - load_raw = &CLASS eight_bit_load_raw; - } else if (fsize == 3217760) { - height = 1546; - width = 2070; - raw_width = 2080; - load_raw = &CLASS eight_bit_load_raw; - } else if (!strcmp(model,"QV-4000")) { - height = 1700; - width = 2260; - load_raw = &CLASS unpacked_load_raw; - maximum = 0xffff; - } else if (!strcmp(model,"QV-5700")) { - height = 1924; - width = 2576; - raw_width = 3232; - tiff_bps = 10; - } else if (!strcmp(model,"QV-R41")) { - height = 1720; - width = 2312; - raw_width = 3520; - left_margin = 2; - } else if (!strcmp(model,"QV-R51")) { - height = 1926; - width = 2580; - raw_width = 3904; - } else if (!strcmp(model,"EX-S20")) { - height = 1208; - width = 1620; - raw_width = 2432; - flip = 3; - } else if (!strcmp(model,"EX-S100")) { - height = 1544; - width = 2058; - raw_width = 3136; - } else if (!strcmp(model,"EX-Z50")) { - height = 1931; - width = 2570; - raw_width = 3904; - } else if (!strcmp(model,"EX-Z500")) { - height = 1937; - width = 2577; - raw_width = 3904; - filters = 0x16161616; - } else if (!strcmp(model,"EX-Z55")) { - height = 1960; - width = 2570; - raw_width = 3904; - } else if (!strcmp(model,"EX-Z60")) { - height = 2145; - width = 2833; - raw_width = 3584; - filters = 0x16161616; - tiff_bps = 10; - } else if (!strcmp(model,"EX-Z75")) { - height = 2321; - width = 3089; - raw_width = 4672; - maximum = 0xfff; - } else if (!strcmp(model,"EX-Z750")) { - height = 2319; - width = 3087; - raw_width = 4672; - maximum = 0xfff; - } else if (!strcmp(model,"EX-Z850")) { - height = 2468; - width = 3279; - raw_width = 4928; - maximum = 0xfff; - } else if (!strcmp(model,"EX-Z8")) { - height = 2467; - width = 3281; - raw_height = 2502; - raw_width = 4992; - maximum = 0xfff; - } else if (fsize == 15499264) { /* EX-Z1050 or EX-Z1080 */ - height = 2752; - width = 3672; - raw_width = 5632; - } else if (!strcmp(model,"EX-P505")) { - height = 1928; - width = 2568; - raw_width = 3852; - maximum = 0xfff; - } else if (fsize == 9313536) { /* EX-P600 or QV-R61 */ - height = 2142; - width = 2844; - raw_width = 4288; - } else if (!strcmp(model,"EX-P700")) { - height = 2318; - width = 3082; - raw_width = 4672; - } - if (!model[0]) - sprintf (model, "%dx%d", width, height); - if (filters == UINT_MAX) filters = 0x94949494; - if (raw_color) adobe_coeff (make, model); - if (load_raw == &CLASS kodak_radc_load_raw) - if (raw_color) adobe_coeff ("Apple","Quicktake"); - if (thumb_offset && !thumb_height) { - fseek (ifp, thumb_offset, SEEK_SET); - if (ljpeg_start (&jh, 1)) { - thumb_width = jh.wide; - thumb_height = jh.high; - } - } -dng_skip: - if (fuji_width) { - fuji_width = width >> !fuji_layout; - if (~fuji_width & 1) filters = 0x49494949; - width = (height >> fuji_layout) + fuji_width; - height = width - 1; - pixel_aspect = 1; - } else { - if (raw_height < height) raw_height = height; - if (raw_width < width ) raw_width = width; - } - if (!tiff_bps) tiff_bps = 12; - if (!maximum) maximum = (1 << tiff_bps) - 1; - if (!load_raw || height < 22) is_raw = 0; -#ifdef NO_JASPER - if (load_raw == &CLASS redcine_load_raw) { - fprintf (stderr,_("%s: You must link dcraw with %s!!\n"), - ifname, "libjasper"); - is_raw = 0; - } -#endif -#ifdef NO_JPEG - if (load_raw == &CLASS kodak_jpeg_load_raw || - load_raw == &CLASS lossy_dng_load_raw) { - fprintf (stderr,_("%s: You must link dcraw with %s!!\n"), - ifname, "libjpeg"); - is_raw = 0; - } -#endif - if (!cdesc[0]) - strcpy (cdesc, colors == 3 ? "RGBG":"GMCY"); - if (!raw_height) raw_height = height; - if (!raw_width ) raw_width = width; - if (filters && colors == 3) - filters |= ((filters >> 2 & 0x22222222) | - (filters << 2 & 0x88888888)) & filters << 1; -notraw: - if (flip == -1) flip = tiff_flip; - if (flip == -1) flip = 0; -} - -#ifndef NO_LCMS -void CLASS apply_profile (const char *input, const char *output) -{ - char *prof; - cmsHPROFILE hInProfile=0, hOutProfile=0; - cmsHTRANSFORM hTransform; - FILE *fp; - unsigned size; - - cmsErrorAction (LCMS_ERROR_SHOW); - if (strcmp (input, "embed")) - hInProfile = cmsOpenProfileFromFile (input, "r"); - else if (profile_length) { - prof = (char *) malloc (profile_length); - merror (prof, "apply_profile()"); - fseek (ifp, profile_offset, SEEK_SET); - fread (prof, 1, profile_length, ifp); - hInProfile = cmsOpenProfileFromMem (prof, profile_length); - free (prof); - } else - fprintf (stderr,_("%s has no embedded profile.\n"), ifname); - if (!hInProfile) return; - if (!output) - hOutProfile = cmsCreate_sRGBProfile(); - else if ((fp = fopen (output, "rb"))) { - fread (&size, 4, 1, fp); - fseek (fp, 0, SEEK_SET); - oprof = (unsigned *) malloc (size = ntohl(size)); - merror (oprof, "apply_profile()"); - fread (oprof, 1, size, fp); - fclose (fp); - if (!(hOutProfile = cmsOpenProfileFromMem (oprof, size))) { - free (oprof); - oprof = 0; - } - } else - fprintf (stderr,_("Cannot open file %s!\n"), output); - if (!hOutProfile) goto quit; - if (verbose) - fprintf (stderr,_("Applying color profile...\n")); - hTransform = cmsCreateTransform (hInProfile, TYPE_RGBA_16, - hOutProfile, TYPE_RGBA_16, INTENT_PERCEPTUAL, 0); - cmsDoTransform (hTransform, image, image, width*height); - raw_color = 1; /* Don't use rgb_cam with a profile */ - cmsDeleteTransform (hTransform); - cmsCloseProfile (hOutProfile); -quit: - cmsCloseProfile (hInProfile); -} -#endif - -void CLASS convert_to_rgb() -{ - int row, col, c, i, j, k; - ushort *img; - float out[3], out_cam[3][4]; - double num, inverse[3][3]; - static const double xyzd50_srgb[3][3] = - { { 0.436083, 0.385083, 0.143055 }, - { 0.222507, 0.716888, 0.060608 }, - { 0.013930, 0.097097, 0.714022 } }; - static const double rgb_rgb[3][3] = - { { 1,0,0 }, { 0,1,0 }, { 0,0,1 } }; - static const double adobe_rgb[3][3] = - { { 0.715146, 0.284856, 0.000000 }, - { 0.000000, 1.000000, 0.000000 }, - { 0.000000, 0.041166, 0.958839 } }; - static const double wide_rgb[3][3] = - { { 0.593087, 0.404710, 0.002206 }, - { 0.095413, 0.843149, 0.061439 }, - { 0.011621, 0.069091, 0.919288 } }; - static const double prophoto_rgb[3][3] = - { { 0.529317, 0.330092, 0.140588 }, - { 0.098368, 0.873465, 0.028169 }, - { 0.016879, 0.117663, 0.865457 } }; - static const double (*out_rgb[])[3] = - { rgb_rgb, adobe_rgb, wide_rgb, prophoto_rgb, xyz_rgb }; - static const char *name[] = - { "sRGB", "Adobe RGB (1998)", "WideGamut D65", "ProPhoto D65", "XYZ" }; - static const unsigned phead[] = - { 1024, 0, 0x2100000, 0x6d6e7472, 0x52474220, 0x58595a20, 0, 0, 0, - 0x61637370, 0, 0, 0x6e6f6e65, 0, 0, 0, 0, 0xf6d6, 0x10000, 0xd32d }; - unsigned pbody[] = - { 10, 0x63707274, 0, 36, /* cprt */ - 0x64657363, 0, 40, /* desc */ - 0x77747074, 0, 20, /* wtpt */ - 0x626b7074, 0, 20, /* bkpt */ - 0x72545243, 0, 14, /* rTRC */ - 0x67545243, 0, 14, /* gTRC */ - 0x62545243, 0, 14, /* bTRC */ - 0x7258595a, 0, 20, /* rXYZ */ - 0x6758595a, 0, 20, /* gXYZ */ - 0x6258595a, 0, 20 }; /* bXYZ */ - static const unsigned pwhite[] = { 0xf351, 0x10000, 0x116cc }; - unsigned pcurve[] = { 0x63757276, 0, 1, 0x1000000 }; - - gamma_curve (gamm[0], gamm[1], 0, 0); - memcpy (out_cam, rgb_cam, sizeof out_cam); - raw_color |= colors == 1 || document_mode || - output_color < 1 || output_color > 5; - if (!raw_color) { - oprof = (unsigned *) calloc (phead[0], 1); - merror (oprof, "convert_to_rgb()"); - memcpy (oprof, phead, sizeof phead); - if (output_color == 5) oprof[4] = oprof[5]; - oprof[0] = 132 + 12*pbody[0]; - for (i=0; i < pbody[0]; i++) { - oprof[oprof[0]/4] = i ? (i > 1 ? 0x58595a20 : 0x64657363) : 0x74657874; - pbody[i*3+2] = oprof[0]; - oprof[0] += (pbody[i*3+3] + 3) & -4; - } - memcpy (oprof+32, pbody, sizeof pbody); - oprof[pbody[5]/4+2] = strlen(name[output_color-1]) + 1; - memcpy ((char *)oprof+pbody[8]+8, pwhite, sizeof pwhite); - pcurve[3] = (short)(256/gamm[5]+0.5) << 16; - for (i=4; i < 7; i++) - memcpy ((char *)oprof+pbody[i*3+2], pcurve, sizeof pcurve); - pseudoinverse ((double (*)[3]) out_rgb[output_color-1], inverse, 3); - for (i=0; i < 3; i++) - for (j=0; j < 3; j++) { - for (num = k=0; k < 3; k++) - num += xyzd50_srgb[i][k] * inverse[j][k]; - oprof[pbody[j*3+23]/4+i+2] = num * 0x10000 + 0.5; - } - for (i=0; i < phead[0]/4; i++) - oprof[i] = htonl(oprof[i]); - strcpy ((char *)oprof+pbody[2]+8, "auto-generated by dcraw"); - strcpy ((char *)oprof+pbody[5]+12, name[output_color-1]); - for (i=0; i < 3; i++) - for (j=0; j < colors; j++) - for (out_cam[i][j] = k=0; k < 3; k++) - out_cam[i][j] += out_rgb[output_color-1][i][k] * rgb_cam[k][j]; - } - if (verbose) - fprintf (stderr, raw_color ? _("Building histograms...\n") : - _("Converting to %s colorspace...\n"), name[output_color-1]); - - memset (histogram, 0, sizeof histogram); - for (img=image[0], row=0; row < height; row++) - for (col=0; col < width; col++, img+=4) { - if (!raw_color) { - out[0] = out[1] = out[2] = 0; - FORCC { - out[0] += out_cam[0][c] * img[c]; - out[1] += out_cam[1][c] * img[c]; - out[2] += out_cam[2][c] * img[c]; - } - FORC3 img[c] = CLIP((int) out[c]); - } - else if (document_mode) - img[0] = img[fcol(row,col)]; - FORCC histogram[c][img[c] >> 3]++; - } - if (colors == 4 && output_color) colors = 3; - if (document_mode && filters) colors = 1; -} - -void CLASS fuji_rotate() -{ - int i, row, col; - double step; - float r, c, fr, fc; - unsigned ur, uc; - ushort wide, high, (*img)[4], (*pix)[4]; - - if (!fuji_width) return; - if (verbose) - fprintf (stderr,_("Rotating image 45 degrees...\n")); - fuji_width = (fuji_width - 1 + shrink) >> shrink; - step = sqrt(0.5); - wide = fuji_width / step; - high = (height - fuji_width) / step; - img = (ushort (*)[4]) calloc (wide*high, sizeof *img); - merror (img, "fuji_rotate()"); - - for (row=0; row < high; row++) - for (col=0; col < wide; col++) { - ur = r = fuji_width + (row-col)*step; - uc = c = (row+col)*step; - if (ur > height-2 || uc > width-2) continue; - fr = r - ur; - fc = c - uc; - pix = image + ur*width + uc; - for (i=0; i < colors; i++) - img[row*wide+col][i] = - (pix[ 0][i]*(1-fc) + pix[ 1][i]*fc) * (1-fr) + - (pix[width][i]*(1-fc) + pix[width+1][i]*fc) * fr; - } - free (image); - width = wide; - height = high; - image = img; - fuji_width = 0; -} - -void CLASS stretch() -{ - ushort newdim, (*img)[4], *pix0, *pix1; - int row, col, c; - double rc, frac; - - if (pixel_aspect == 1) return; - if (verbose) fprintf (stderr,_("Stretching the image...\n")); - if (pixel_aspect < 1) { - newdim = height / pixel_aspect + 0.5; - img = (ushort (*)[4]) calloc (width*newdim, sizeof *img); - merror (img, "stretch()"); - for (rc=row=0; row < newdim; row++, rc+=pixel_aspect) { - frac = rc - (c = rc); - pix0 = pix1 = image[c*width]; - if (c+1 < height) pix1 += width*4; - for (col=0; col < width; col++, pix0+=4, pix1+=4) - FORCC img[row*width+col][c] = pix0[c]*(1-frac) + pix1[c]*frac + 0.5; - } - height = newdim; - } else { - newdim = width * pixel_aspect + 0.5; - img = (ushort (*)[4]) calloc (height*newdim, sizeof *img); - merror (img, "stretch()"); - for (rc=col=0; col < newdim; col++, rc+=1/pixel_aspect) { - frac = rc - (c = rc); - pix0 = pix1 = image[c]; - if (c+1 < width) pix1 += 4; - for (row=0; row < height; row++, pix0+=width*4, pix1+=width*4) - FORCC img[row*newdim+col][c] = pix0[c]*(1-frac) + pix1[c]*frac + 0.5; - } - width = newdim; - } - free (image); - image = img; -} - -int CLASS flip_index (int row, int col) -{ - if (flip & 4) SWAP(row,col); - if (flip & 2) row = iheight - 1 - row; - if (flip & 1) col = iwidth - 1 - col; - return row * iwidth + col; -} - -struct tiff_tag { - ushort tag, type; - int count; - union { char c[4]; short s[2]; int i; } val; -}; - -struct tiff_hdr { - ushort order, magic; - int ifd; - ushort pad, ntag; - struct tiff_tag tag[23]; - int nextifd; - ushort pad2, nexif; - struct tiff_tag exif[4]; - ushort pad3, ngps; - struct tiff_tag gpst[10]; - short bps[4]; - int rat[10]; - unsigned gps[26]; - char desc[512], make[64], model[64], soft[32], date[20], artist[64]; -}; - -void CLASS tiff_set (ushort *ntag, - ushort tag, ushort type, int count, int val) -{ - struct tiff_tag *tt; - int c; - - tt = (struct tiff_tag *)(ntag+1) + (*ntag)++; - tt->tag = tag; - tt->type = type; - tt->count = count; - if (type < 3 && count <= 4) - FORC(4) tt->val.c[c] = val >> (c << 3); - else if (type == 3 && count <= 2) - FORC(2) tt->val.s[c] = val >> (c << 4); - else tt->val.i = val; -} - -#define TOFF(ptr) ((char *)(&(ptr)) - (char *)th) - -void CLASS tiff_head (struct tiff_hdr *th, int full) -{ - int c, psize=0; - struct tm *t; - - memset (th, 0, sizeof *th); - th->order = htonl(0x4d4d4949) >> 16; - th->magic = 42; - th->ifd = 10; - if (full) { - tiff_set (&th->ntag, 254, 4, 1, 0); - tiff_set (&th->ntag, 256, 4, 1, width); - tiff_set (&th->ntag, 257, 4, 1, height); - tiff_set (&th->ntag, 258, 3, colors, output_bps); - if (colors > 2) - th->tag[th->ntag-1].val.i = TOFF(th->bps); - FORC4 th->bps[c] = output_bps; - tiff_set (&th->ntag, 259, 3, 1, 1); - tiff_set (&th->ntag, 262, 3, 1, 1 + (colors > 1)); - } - tiff_set (&th->ntag, 270, 2, 512, TOFF(th->desc)); - tiff_set (&th->ntag, 271, 2, 64, TOFF(th->make)); - tiff_set (&th->ntag, 272, 2, 64, TOFF(th->model)); - if (full) { - if (oprof) psize = ntohl(oprof[0]); - tiff_set (&th->ntag, 273, 4, 1, sizeof *th + psize); - tiff_set (&th->ntag, 277, 3, 1, colors); - tiff_set (&th->ntag, 278, 4, 1, height); - tiff_set (&th->ntag, 279, 4, 1, height*width*colors*output_bps/8); - } else - tiff_set (&th->ntag, 274, 3, 1, "12435867"[flip]-'0'); - tiff_set (&th->ntag, 282, 5, 1, TOFF(th->rat[0])); - tiff_set (&th->ntag, 283, 5, 1, TOFF(th->rat[2])); - tiff_set (&th->ntag, 284, 3, 1, 1); - tiff_set (&th->ntag, 296, 3, 1, 2); - tiff_set (&th->ntag, 305, 2, 32, TOFF(th->soft)); - tiff_set (&th->ntag, 306, 2, 20, TOFF(th->date)); - tiff_set (&th->ntag, 315, 2, 64, TOFF(th->artist)); - tiff_set (&th->ntag, 34665, 4, 1, TOFF(th->nexif)); - if (psize) tiff_set (&th->ntag, 34675, 7, psize, sizeof *th); - tiff_set (&th->nexif, 33434, 5, 1, TOFF(th->rat[4])); - tiff_set (&th->nexif, 33437, 5, 1, TOFF(th->rat[6])); - tiff_set (&th->nexif, 34855, 3, 1, iso_speed); - tiff_set (&th->nexif, 37386, 5, 1, TOFF(th->rat[8])); - if (gpsdata[1]) { - tiff_set (&th->ntag, 34853, 4, 1, TOFF(th->ngps)); - tiff_set (&th->ngps, 0, 1, 4, 0x202); - tiff_set (&th->ngps, 1, 2, 2, gpsdata[29]); - tiff_set (&th->ngps, 2, 5, 3, TOFF(th->gps[0])); - tiff_set (&th->ngps, 3, 2, 2, gpsdata[30]); - tiff_set (&th->ngps, 4, 5, 3, TOFF(th->gps[6])); - tiff_set (&th->ngps, 5, 1, 1, gpsdata[31]); - tiff_set (&th->ngps, 6, 5, 1, TOFF(th->gps[18])); - tiff_set (&th->ngps, 7, 5, 3, TOFF(th->gps[12])); - tiff_set (&th->ngps, 18, 2, 12, TOFF(th->gps[20])); - tiff_set (&th->ngps, 29, 2, 12, TOFF(th->gps[23])); - memcpy (th->gps, gpsdata, sizeof th->gps); - } - th->rat[0] = th->rat[2] = 300; - th->rat[1] = th->rat[3] = 1; - FORC(6) th->rat[4+c] = 1000000; - th->rat[4] *= shutter; - th->rat[6] *= aperture; - th->rat[8] *= focal_len; - strncpy (th->desc, desc, 512); - strncpy (th->make, make, 64); - strncpy (th->model, model, 64); - strcpy (th->soft, "dcraw v"DCRAW_VERSION); - t = localtime (×tamp); - sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d", - t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); - strncpy (th->artist, artist, 64); -} - -void CLASS jpeg_thumb() -{ - char *thumb; - ushort exif[5]; - struct tiff_hdr th; - - thumb = (char *) malloc (thumb_length); - merror (thumb, "jpeg_thumb()"); - fread (thumb, 1, thumb_length, ifp); - fputc (0xff, ofp); - fputc (0xd8, ofp); - if (strcmp (thumb+6, "Exif")) { - memcpy (exif, "\xff\xe1 Exif\0\0", 10); - exif[1] = htons (8 + sizeof th); - fwrite (exif, 1, sizeof exif, ofp); - tiff_head (&th, 0); - fwrite (&th, 1, sizeof th, ofp); - } - fwrite (thumb+2, 1, thumb_length-2, ofp); - free (thumb); -} - -void CLASS write_ppm_tiff() -{ - struct tiff_hdr th; - uchar *ppm; - ushort *ppm2; - int c, row, col, soff, rstep, cstep; - int perc, val, total, white=0x2000; - - perc = width * height * 0.01; /* 99th percentile white level */ - if (fuji_width) perc /= 2; - if (!((highlight & ~2) || no_auto_bright)) - for (white=c=0; c < colors; c++) { - for (val=0x2000, total=0; --val > 32; ) - if ((total += histogram[c][val]) > perc) break; - if (white < val) white = val; - } - gamma_curve (gamm[0], gamm[1], 2, (white << 3)/bright); - iheight = height; - iwidth = width; - if (flip & 4) SWAP(height,width); - ppm = (uchar *) calloc (width, colors*output_bps/8); - ppm2 = (ushort *) ppm; - merror (ppm, "write_ppm_tiff()"); - if (output_tiff) { - tiff_head (&th, 1); - fwrite (&th, sizeof th, 1, ofp); - if (oprof) - fwrite (oprof, ntohl(oprof[0]), 1, ofp); - } else if (colors > 3) - fprintf (ofp, - "P7\nWIDTH %d\nHEIGHT %d\nDEPTH %d\nMAXVAL %d\nTUPLTYPE %s\nENDHDR\n", - width, height, colors, (1 << output_bps)-1, cdesc); - else - fprintf (ofp, "P%d\n%d %d\n%d\n", - colors/2+5, width, height, (1 << output_bps)-1); - soff = flip_index (0, 0); - cstep = flip_index (0, 1) - soff; - rstep = flip_index (1, 0) - flip_index (0, width); - for (row=0; row < height; row++, soff += rstep) { - for (col=0; col < width; col++, soff += cstep) - if (output_bps == 8) - FORCC ppm [col*colors+c] = curve[image[soff][c]] >> 8; - else FORCC ppm2[col*colors+c] = curve[image[soff][c]]; - if (output_bps == 16 && !output_tiff && htons(0x55aa) != 0x55aa) - swab (ppm2, ppm2, width*colors*2); - fwrite (ppm, colors*output_bps/8, width, ofp); - } - free (ppm); -} - -int CLASS main (int argc, const char **argv) -{ - int arg, status=0, quality, i, c; - int timestamp_only=0, thumbnail_only=0, identify_only=0; - int user_qual=-1, user_black=-1, user_sat=-1, user_flip=-1; - int use_fuji_rotate=1, write_to_stdout=0, read_from_stdin=0; - const char *sp, *bpfile=0, *dark_frame=0, *write_ext; - char opm, opt, *ofname, *cp; - struct utimbuf ut; -#ifndef NO_LCMS - const char *cam_profile=0, *out_profile=0; -#endif - -#ifndef LOCALTIME - putenv ((char *) "TZ=UTC"); -#endif -#ifdef LOCALEDIR - setlocale (LC_CTYPE, ""); - setlocale (LC_MESSAGES, ""); - bindtextdomain ("dcraw", LOCALEDIR); - textdomain ("dcraw"); -#endif - - if (argc == 1) { - printf(_("\nRaw photo decoder \"dcraw\" v%s"), DCRAW_VERSION); - printf(_("\nby Dave Coffin, dcoffin a cybercom o net\n")); - printf(_("\nUsage: %s [OPTION]... [FILE]...\n\n"), argv[0]); - puts(_("-v Print verbose messages")); - puts(_("-c Write image data to standard output")); - puts(_("-e Extract embedded thumbnail image")); - puts(_("-i Identify files without decoding them")); - puts(_("-i -v Identify files and show metadata")); - puts(_("-z Change file dates to camera timestamp")); - puts(_("-w Use camera white balance, if possible")); - puts(_("-a Average the whole image for white balance")); - puts(_("-A Average a grey box for white balance")); - puts(_("-r Set custom white balance")); - puts(_("+M/-M Use/don't use an embedded color matrix")); - puts(_("-C Correct chromatic aberration")); - puts(_("-P Fix the dead pixels listed in this file")); - puts(_("-K Subtract dark frame (16-bit raw PGM)")); - puts(_("-k Set the darkness level")); - puts(_("-S Set the saturation level")); - puts(_("-n Set threshold for wavelet denoising")); - puts(_("-H [0-9] Highlight mode (0=clip, 1=unclip, 2=blend, 3+=rebuild)")); - puts(_("-t [0-7] Flip image (0=none, 3=180, 5=90CCW, 6=90CW)")); - puts(_("-o [0-5] Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ)")); -#ifndef NO_LCMS - puts(_("-o Apply output ICC profile from file")); - puts(_("-p Apply camera ICC profile from file or \"embed\"")); -#endif - puts(_("-d Document mode (no color, no interpolation)")); - puts(_("-D Document mode without scaling (totally raw)")); - puts(_("-j Don't stretch or rotate raw pixels")); - puts(_("-W Don't automatically brighten the image")); - puts(_("-b Adjust brightness (default = 1.0)")); - puts(_("-g

    Set custom gamma curve (default = 2.222 4.5)")); - puts(_("-q [0-3] Set the interpolation quality")); - puts(_("-h Half-size color image (twice as fast as \"-q 0\")")); - puts(_("-f Interpolate RGGB as four colors")); - puts(_("-m Apply a 3x3 median filter to R-G and B-G")); - puts(_("-s [0..N-1] Select one raw image or \"all\" from each file")); - puts(_("-6 Write 16-bit instead of 8-bit")); - puts(_("-4 Linear 16-bit, same as \"-6 -W -g 1 1\"")); - puts(_("-T Write TIFF instead of PPM")); - puts(""); - return 1; - } - argv[argc] = ""; - for (arg=1; (((opm = argv[arg][0]) - 2) | 2) == '+'; ) { - opt = argv[arg++][1]; - if ((cp = (char *) strchr (sp="nbrkStqmHACg", opt))) - for (i=0; i < "114111111422"[cp-sp]-'0'; i++) - if (!isdigit(argv[arg+i][0])) { - fprintf (stderr,_("Non-numeric argument to \"-%c\"\n"), opt); - return 1; - } - switch (opt) { - case 'n': threshold = atof(argv[arg++]); break; - case 'b': bright = atof(argv[arg++]); break; - case 'r': - FORC4 user_mul[c] = atof(argv[arg++]); break; - case 'C': aber[0] = 1 / atof(argv[arg++]); - aber[2] = 1 / atof(argv[arg++]); break; - case 'g': gamm[0] = atof(argv[arg++]); - gamm[1] = atof(argv[arg++]); - if (gamm[0]) gamm[0] = 1/gamm[0]; break; - case 'k': user_black = atoi(argv[arg++]); break; - case 'S': user_sat = atoi(argv[arg++]); break; - case 't': user_flip = atoi(argv[arg++]); break; - case 'q': user_qual = atoi(argv[arg++]); break; - case 'm': med_passes = atoi(argv[arg++]); break; - case 'H': highlight = atoi(argv[arg++]); break; - case 's': - shot_select = abs(atoi(argv[arg])); - multi_out = !strcmp(argv[arg++],"all"); - break; - case 'o': - if (isdigit(argv[arg][0]) && !argv[arg][1]) - output_color = atoi(argv[arg++]); -#ifndef NO_LCMS - else out_profile = argv[arg++]; - break; - case 'p': cam_profile = argv[arg++]; -#endif - break; - case 'P': bpfile = argv[arg++]; break; - case 'K': dark_frame = argv[arg++]; break; - case 'z': timestamp_only = 1; break; - case 'e': thumbnail_only = 1; break; - case 'i': identify_only = 1; break; - case 'c': write_to_stdout = 1; break; - case 'v': verbose = 1; break; - case 'h': half_size = 1; /* "-h" implies "-f" */ - case 'f': four_color_rgb = 1; break; - case 'A': FORC4 greybox[c] = atoi(argv[arg++]); - case 'a': use_auto_wb = 1; break; - case 'w': use_camera_wb = 1; break; - case 'M': use_camera_matrix = (opm == '+'); break; - case 'I': read_from_stdin = 1; break; - case 'E': document_mode++; - case 'D': document_mode++; - case 'd': document_mode++; - case 'j': use_fuji_rotate = 0; break; - case 'W': no_auto_bright = 1; break; - case 'T': output_tiff = 1; break; - case '4': gamm[0] = gamm[1] = - no_auto_bright = 1; - case '6': output_bps = 16; break; - default: - fprintf (stderr,_("Unknown option \"-%c\".\n"), opt); - return 1; - } - } - if (use_camera_matrix < 0) - use_camera_matrix = use_camera_wb; - if (arg == argc) { - fprintf (stderr,_("No files to process.\n")); - return 1; - } - if (write_to_stdout) { - if (isatty(1)) { - fprintf (stderr,_("Will not write an image to the terminal!\n")); - return 1; - } -#if defined(WIN32) || defined(DJGPP) || defined(__CYGWIN__) - if (setmode(1,O_BINARY) < 0) { - perror ("setmode()"); - return 1; - } -#endif - } - for ( ; arg < argc; arg++) { - status = 1; - raw_image = 0; - image = 0; - oprof = 0; - meta_data = ofname = 0; - ofp = stdout; - if (setjmp (failure)) { - if (fileno(ifp) > 2) fclose(ifp); - if (fileno(ofp) > 2) fclose(ofp); - status = 1; - goto cleanup; - } - ifname = argv[arg]; - if (!(ifp = fopen (ifname, "rb"))) { - perror (ifname); - continue; - } - status = (identify(),!is_raw); - if (user_flip >= 0) - flip = user_flip; - switch ((flip+3600) % 360) { - case 270: flip = 5; break; - case 180: flip = 3; break; - case 90: flip = 6; - } - if (timestamp_only) { - if ((status = !timestamp)) - fprintf (stderr,_("%s has no timestamp.\n"), ifname); - else if (identify_only) - printf ("%10ld%10d %s\n", (long) timestamp, shot_order, ifname); - else { - if (verbose) - fprintf (stderr,_("%s time set to %d.\n"), ifname, (int) timestamp); - ut.actime = ut.modtime = timestamp; - utime (ifname, &ut); - } - goto next; - } - write_fun = &CLASS write_ppm_tiff; - if (thumbnail_only) { - if ((status = !thumb_offset)) { - fprintf (stderr,_("%s has no thumbnail.\n"), ifname); - goto next; - } else if (thumb_load_raw) { - load_raw = thumb_load_raw; - data_offset = thumb_offset; - height = thumb_height; - width = thumb_width; - filters = 0; - } else { - fseek (ifp, thumb_offset, SEEK_SET); - write_fun = write_thumb; - goto thumbnail; - } - } - if (load_raw == &CLASS kodak_ycbcr_load_raw) { - height += height & 1; - width += width & 1; - } - if (identify_only && verbose && make[0]) { - printf (_("\nFilename: %s\n"), ifname); - printf (_("Timestamp: %s"), ctime(×tamp)); - printf (_("Camera: %s %s\n"), make, model); - if (artist[0]) - printf (_("Owner: %s\n"), artist); - if (dng_version) { - printf (_("DNG Version: ")); - for (i=24; i >= 0; i -= 8) - printf ("%d%c", dng_version >> i & 255, i ? '.':'\n'); - } - printf (_("ISO speed: %d\n"), (int) iso_speed); - printf (_("Shutter: ")); - if (shutter > 0 && shutter < 1) - shutter = (printf ("1/"), 1 / shutter); - printf (_("%0.1f sec\n"), shutter); - printf (_("Aperture: f/%0.1f\n"), aperture); - printf (_("Focal length: %0.1f mm\n"), focal_len); - printf (_("Embedded ICC profile: %s\n"), profile_length ? _("yes"):_("no")); - printf (_("Number of raw images: %d\n"), is_raw); - if (pixel_aspect != 1) - printf (_("Pixel Aspect Ratio: %0.6f\n"), pixel_aspect); - if (thumb_offset) - printf (_("Thumb size: %4d x %d\n"), thumb_width, thumb_height); - printf (_("Full size: %4d x %d\n"), raw_width, raw_height); - } else if (!is_raw) - fprintf (stderr,_("Cannot decode file %s\n"), ifname); - if (!is_raw) goto next; - shrink = filters && (half_size || (!identify_only && - (threshold || aber[0] != 1 || aber[2] != 1))); - if (document_mode == 3) { - top_margin = left_margin = fuji_width = 0; - height = raw_height; - if (width <= raw_width * 8 / tiff_bps) - width = raw_width * 8 / tiff_bps; - else width = raw_width; - } - iheight = (height + shrink) >> shrink; - iwidth = (width + shrink) >> shrink; - if (identify_only) { - if (verbose) { - if (use_fuji_rotate) { - if (fuji_width) { - fuji_width = (fuji_width - 1 + shrink) >> shrink; - iwidth = fuji_width / sqrt(0.5); - iheight = (iheight - fuji_width) / sqrt(0.5); - } else { - if (pixel_aspect < 1) iheight = iheight / pixel_aspect + 0.5; - if (pixel_aspect > 1) iwidth = iwidth * pixel_aspect + 0.5; - } - } - if (flip & 4) - SWAP(iheight,iwidth); - printf (_("Image size: %4d x %d\n"), width, height); - printf (_("Output size: %4d x %d\n"), iwidth, iheight); - printf (_("Raw colors: %d"), colors); - if (filters) { - printf (_("\nFilter pattern: ")); - for (i=0; i < 16; i++) - putchar (cdesc[fcol(i >> 1,i & 1)]); - } - printf (_("\nDaylight multipliers:")); - FORCC printf (" %f", pre_mul[c]); - if (cam_mul[0] > 0) { - printf (_("\nCamera multipliers:")); - FORC4 printf (" %f", cam_mul[c]); - } - putchar ('\n'); - } else - printf (_("%s is a %s %s image.\n"), ifname, make, model); -next: - fclose(ifp); - continue; - } - if (use_camera_matrix && cmatrix[0][0] > 0.25) { - memcpy (rgb_cam, cmatrix, sizeof cmatrix); - raw_color = 0; - } - image = (ushort (*)[4]) calloc (iheight*iwidth, sizeof *image); - merror (image, "main()"); - if (meta_length) { - meta_data = (char *) malloc (meta_length); - merror (meta_data, "main()"); - } - if (filters || colors == 1) { - raw_image = (ushort *) calloc ((raw_height+7)*raw_width, 2); - merror (raw_image, "main()"); - } - if (verbose) - fprintf (stderr,_("Loading %s %s image from %s ...\n"), - make, model, ifname); - if (shot_select >= is_raw) - fprintf (stderr,_("%s: \"-s %d\" requests a nonexistent image!\n"), - ifname, shot_select); - fseeko (ifp, data_offset, SEEK_SET); - if (raw_image && read_from_stdin) - fread (raw_image, 2, raw_height*raw_width, stdin); - else (*load_raw)(); - if (raw_image) { - crop_masked_pixels(); - free (raw_image); - } - if (zero_is_bad) remove_zeroes(); - bad_pixels (bpfile); - if (dark_frame) subtract (dark_frame); - quality = 2 + !fuji_width; - if (user_qual >= 0) quality = user_qual; - i = cblack[3]; - FORC3 if (i > cblack[c]) i = cblack[c]; - FORC4 cblack[c] -= i; - black += i; - if (user_black >= 0) black = user_black; - FORC4 cblack[c] += black; - if (user_sat > 0) maximum = user_sat; -#ifdef COLORCHECK - colorcheck(); -#endif - if (is_foveon) { - if (document_mode || model[0] == 'D') { - for (i=0; i < height*width*4; i++) - if ((short) image[0][i] < 0) image[0][i] = 0; - } else foveon_interpolate(); - } else if (document_mode < 2) - scale_colors(); - pre_interpolate(); - if (filters && !document_mode) { - if (quality == 0) - lin_interpolate(); - else if (quality == 1 || colors > 3 || filters < 1000) - vng_interpolate(); - else if (quality == 2) - ppg_interpolate(); - else ahd_interpolate(); - } - if (mix_green) - for (colors=3, i=0; i < height*width; i++) - image[i][1] = (image[i][1] + image[i][3]) >> 1; - if (!is_foveon && colors == 3) median_filter(); - if (!is_foveon && highlight == 2) blend_highlights(); - if (!is_foveon && highlight > 2) recover_highlights(); - if (use_fuji_rotate) fuji_rotate(); -#ifndef NO_LCMS - if (cam_profile) apply_profile (cam_profile, out_profile); -#endif - convert_to_rgb(); - if (use_fuji_rotate) stretch(); -thumbnail: - if (write_fun == &CLASS jpeg_thumb) - write_ext = ".jpg"; - else if (output_tiff && write_fun == &CLASS write_ppm_tiff) - write_ext = ".tiff"; - else - write_ext = ".pgm\0.ppm\0.ppm\0.pam" + colors*5-5; - ofname = (char *) malloc (strlen(ifname) + 64); - merror (ofname, "main()"); - if (write_to_stdout) - strcpy (ofname,_("standard output")); - else { - strcpy (ofname, ifname); - if ((cp = strrchr (ofname, '.'))) *cp = 0; - if (multi_out) - sprintf (ofname+strlen(ofname), "_%0*d", - snprintf(0,0,"%d",is_raw-1), shot_select); - if (thumbnail_only) - strcat (ofname, ".thumb"); - strcat (ofname, write_ext); - ofp = fopen (ofname, "wb"); - if (!ofp) { - status = 1; - perror (ofname); - goto cleanup; - } - } - if (verbose) - fprintf (stderr,_("Writing data to %s ...\n"), ofname); - (*write_fun)(); - fclose(ifp); - if (ofp != stdout) fclose(ofp); -cleanup: - if (meta_data) free (meta_data); - if (ofname) free (ofname); - if (oprof) free (oprof); - if (image) free (image); - if (multi_out) { - if (++shot_select < is_raw) arg--; - else shot_select = 0; - } - } - return status; -} diff --git a/Source/LibRawLite/internal/dcb_demosaicing.c b/Source/LibRawLite/internal/dcb_demosaicing.c deleted file mode 100644 index 4839004..0000000 --- a/Source/LibRawLite/internal/dcb_demosaicing.c +++ /dev/null @@ -1,710 +0,0 @@ -/* - * Copyright (C) 2010, Jacek Gozdz (cuniek@kft.umcs.lublin.pl) - * - * This code is licensed under a (3-clause) BSD license as follows : - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following - * conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright 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 author nor the names of its - * contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - */ - -// DCB demosaicing by Jacek Gozdz (cuniek@kft.umcs.lublin.pl) - -// FBDD denoising by Jacek Gozdz (cuniek@kft.umcs.lublin.pl) and -// Luis Sanz Rodríguez (luis.sanz.rodriguez@gmail.com) - -// last modification: 11.07.2010 - - -// interpolates green vertically and saves it to image3 -void CLASS dcb_ver(float (*image3)[3]) -{ - int row, col, u=width, v=2*u, indx; - - for (row=2; row < height-2; row++) - for (col=2+(FC(row,2)&1),indx=row*width+col; col < u-2; col+=2,indx+=2) { - - image3[indx][1] = CLIP((image[indx+u][1] + image[indx-u][1])/2.0); - - } -} - - -// interpolates green horizontally and saves it to image2 -void CLASS dcb_hor(float (*image2)[3]) -{ - int row, col, u=width, v=2*u, indx; - - for (row=2; row < height-2; row++) - for (col=2+(FC(row,2)&1),indx=row*width+col; col < u-2; col+=2,indx+=2) { - - image2[indx][1] = CLIP((image[indx+1][1] + image[indx-1][1])/2.0); - - } -} - - - -// missing colors are interpolated -void CLASS dcb_color() -{ - int row, col, c, d, u=width, indx; - - - for (row=1; row < height-1; row++) - for (col=1+(FC(row,1) & 1), indx=row*width+col, c=2-FC(row,col); col < u-1; col+=2, indx+=2) { - - - image[indx][c] = CLIP(( - 4*image[indx][1] - - image[indx+u+1][1] - image[indx+u-1][1] - image[indx-u+1][1] - image[indx-u-1][1] - + image[indx+u+1][c] + image[indx+u-1][c] + image[indx-u+1][c] + image[indx-u-1][c] )/4.0); - } - - for (row=1; row ( image[indx-1][1] + image[indx+1][1] + image[indx-u][1] + image[indx+u][1])/4.0) - image[indx][3] = ((MIN( image[indx-1][1], image[indx+1][1]) + image[indx-1][1] + image[indx+1][1]) < - (MIN( image[indx-u][1], image[indx+u][1]) + image[indx-u][1] + image[indx+u][1])); - else - image[indx][3] = ((MAX( image[indx-1][1], image[indx+1][1]) + image[indx-1][1] + image[indx+1][1]) > - (MAX( image[indx-u][1], image[indx+u][1]) + image[indx-u][1] + image[indx+u][1])); - } - } -} - - -// interpolated green pixels are corrected using the map -void CLASS dcb_correction() -{ - int current, row, col, u=width, v=2*u, indx; - - for (row=2; row < height-2; row++) - for (col=2+(FC(row,2)&1),indx=row*width+col; col < u-2; col+=2,indx+=2) { - - current = 4*image[indx][3] + - 2*(image[indx+u][3] + image[indx-u][3] + image[indx+1][3] + image[indx-1][3]) + - image[indx+v][3] + image[indx-v][3] + image[indx+2][3] + image[indx-2][3]; - - image[indx][1] = ((16-current)*(image[indx-1][1] + image[indx+1][1])/2.0 + current*(image[indx-u][1] + image[indx+u][1])/2.0)/16.0; - - } - -} - - -// interpolated green pixels are corrected using the map -// with contrast correction -void CLASS dcb_correction2() -{ - int current, row, col, c, u=width, v=2*u, indx; - ushort (*pix)[4]; - - for (row=4; row < height-4; row++) - for (col=4+(FC(row,2)&1),indx=row*width+col, c=FC(row,col); col < u-4; col+=2,indx+=2) { - - current = 4*image[indx][3] + - 2*(image[indx+u][3] + image[indx-u][3] + image[indx+1][3] + image[indx-1][3]) + - image[indx+v][3] + image[indx-v][3] + image[indx+2][3] + image[indx-2][3]; - - image[indx][1] = CLIP(((16-current)*((image[indx-1][1] + image[indx+1][1])/2.0 + image[indx][c] - (image[indx+2][c] + image[indx-2][c])/2.0) + current*((image[indx-u][1] + image[indx+u][1])/2.0 + image[indx][c] - (image[indx+v][c] + image[indx-v][c])/2.0))/16.0); - - } - -} - - -void CLASS dcb_refinement() -{ - int row, col, c, u=width, v=2*u, w=3*u, indx, current; - float f[5], g1, g2, tmp, tmp2=0, tmp3=0; - - for (row=4; row < height-4; row++) - for (col=4+(FC(row,2)&1),indx=row*width+col, c=FC(row,col); col < u-4; col+=2,indx+=2) { - - current = 4*image[indx][3] + - 2*(image[indx+u][3] + image[indx-u][3] + image[indx+1][3] + image[indx-1][3]) - +image[indx+v][3] + image[indx-v][3] + image[indx-2][3] + image[indx+2][3]; - -if (image[indx][c] > 1) -{ - -f[0] = (float)(image[indx-u][1] + image[indx+u][1])/(2*image[indx][c]); - - -if (image[indx-v][c] > 0) -f[1] = 2*(float)image[indx-u][1]/(image[indx-v][c] + image[indx][c]); -else -f[1] = f[0]; - -if (image[indx-v][c] > 0) -f[2] = (float)(image[indx-u][1] + image[indx-w][1])/(2*image[indx-v][c]); -else -f[2] = f[0]; - -if (image[indx+v][c] > 0) -f[3] = 2*(float)image[indx+u][1]/(image[indx+v][c] + image[indx][c]); -else -f[3] = f[0]; - -if (image[indx+v][c] > 0) -f[4] = (float)(image[indx+u][1] + image[indx+w][1])/(2*image[indx+v][c]); -else -f[4] = f[0]; - -g1 = (5*f[0] + 3*f[1] + f[2] + 3*f[3] + f[4])/13.0; - - - -f[0] = (float)(image[indx-1][1] + image[indx+1][1])/(2*image[indx][c]); - -if (image[indx-2][c] > 0) -f[1] = 2*(float)image[indx-1][1]/(image[indx-2][c] + image[indx][c]); -else -f[1] = f[0]; - -if (image[indx-2][c] > 0) -f[2] = (float)(image[indx-1][1] + image[indx-3][1])/(2*image[indx-2][c]); -else -f[2] = f[0]; - -if (image[indx+2][c] > 0) -f[3] = 2*(float)image[indx+1][1]/(image[indx+2][c] + image[indx][c]); -else -f[3] = f[0]; - -if (image[indx+2][c] > 0) -f[4] = (float)(image[indx+1][1] + image[indx+3][1])/(2*image[indx+2][c]); -else -f[4] = f[0]; - -g2 = (5*f[0] + 3*f[1] + f[2] + 3*f[3] + f[4])/13.0; - - -image[indx][1] = CLIP((image[indx][c])*(current*g1 + (16-current)*g2)/16.0); -} -else -image[indx][1] = image[indx][c]; - - // get rid of overshooted pixels - - g1 = MIN(image[indx+1+u][1], MIN(image[indx+1-u][1], MIN(image[indx-1+u][1], MIN(image[indx-1-u][1], MIN(image[indx-1][1], MIN(image[indx+1][1], MIN(image[indx-u][1], image[indx+u][1]))))))); - - g2 = MAX(image[indx+1+u][1], MAX(image[indx+1-u][1], MAX(image[indx-1+u][1], MAX(image[indx-1-u][1], MAX(image[indx-1][1], MAX(image[indx+1][1], MAX(image[indx-u][1], image[indx+u][1]))))))); - - image[indx][1] = ULIM(image[indx][1], g2, g1); - - } - - - -} - -// converts RGB to LCH colorspace and saves it to image3 -void CLASS rgb_to_lch(double (*image2)[3]) -{ - int indx; - for (indx=0; indx < height*width; indx++) { - - image2[indx][0] = image[indx][0] + image[indx][1] + image[indx][2]; // L - image2[indx][1] = 1.732050808 *(image[indx][0] - image[indx][1]); // C - image2[indx][2] = 2.0*image[indx][2] - image[indx][0] - image[indx][1]; // H - } -} - -// converts LCH to RGB colorspace and saves it back to image -void CLASS lch_to_rgb(double (*image2)[3]) -{ - int indx; - for (indx=0; indx < height*width; indx++) { - - image[indx][0] = CLIP(image2[indx][0] / 3.0 - image2[indx][2] / 6.0 + image2[indx][1] / 3.464101615); - image[indx][1] = CLIP(image2[indx][0] / 3.0 - image2[indx][2] / 6.0 - image2[indx][1] / 3.464101615); - image[indx][2] = CLIP(image2[indx][0] / 3.0 + image2[indx][2] / 3.0); - } -} - - - - -// denoising using interpolated neighbours -void CLASS fbdd_correction() -{ - int row, col, c, u=width, indx; - ushort (*pix)[4]; - - for (row=2; row < height-2; row++) { - for (col=2, indx=row*width+col; col < width-2; col++, indx++) { - - c = fc(row,col); - - image[indx][c] = ULIM(image[indx][c], - MAX(image[indx-1][c], MAX(image[indx+1][c], MAX(image[indx-u][c], image[indx+u][c]))), - MIN(image[indx-1][c], MIN(image[indx+1][c], MIN(image[indx-u][c], image[indx+u][c])))); - - } - } -} - - -// corrects chroma noise -void CLASS fbdd_correction2(double (*image2)[3]) -{ - int indx, u=width, v=2*width; - int col, row; - double Co, Ho, ratio; - - for (row=6; row < height-6; row++) - { - for (col=6; col < width-6; col++) - { - indx = row*width+col; - - if ( image2[indx][1]*image2[indx][2] != 0 ) - { - Co = (image2[indx+v][1] + image2[indx-v][1] + image2[indx-2][1] + image2[indx+2][1] - - MAX(image2[indx-2][1], MAX(image2[indx+2][1], MAX(image2[indx-v][1], image2[indx+v][1]))) - - MIN(image2[indx-2][1], MIN(image2[indx+2][1], MIN(image2[indx-v][1], image2[indx+v][1]))))/2.0; - Ho = (image2[indx+v][2] + image2[indx-v][2] + image2[indx-2][2] + image2[indx+2][2] - - MAX(image2[indx-2][2], MAX(image2[indx+2][2], MAX(image2[indx-v][2], image2[indx+v][2]))) - - MIN(image2[indx-2][2], MIN(image2[indx+2][2], MIN(image2[indx-v][2], image2[indx+v][2]))))/2.0; - ratio = sqrt ((Co*Co+Ho*Ho) / (image2[indx][1]*image2[indx][1] + image2[indx][2]*image2[indx][2])); - - if (ratio < 0.85) - { - image2[indx][0] = -(image2[indx][1] + image2[indx][2] - Co - Ho) + image2[indx][0]; - image2[indx][1] = Co; - image2[indx][2] = Ho; - } - } - } - } -} - - -// Cubic Spline Interpolation by Li and Randhawa, modified by Jacek Gozdz and Luis Sanz Rodríguez -void CLASS fbdd_green() -{ - int row, col, c, u=width, v=2*u, w=3*u, x=4*u, y=5*u, indx, min, max, current; - float f[4], g[4]; - - for (row=5; row < height-5; row++) - for (col=5+(FC(row,1)&1),indx=row*width+col,c=FC(row,col); col < u-5; col+=2,indx+=2) { - - -f[0]=1.0/(1.0+abs(image[indx-u][1]-image[indx-w][1])+abs(image[indx-w][1]-image[indx+y][1])); -f[1]=1.0/(1.0+abs(image[indx+1][1]-image[indx+3][1])+abs(image[indx+3][1]-image[indx-5][1])); -f[2]=1.0/(1.0+abs(image[indx-1][1]-image[indx-3][1])+abs(image[indx-3][1]-image[indx+5][1])); -f[3]=1.0/(1.0+abs(image[indx+u][1]-image[indx+w][1])+abs(image[indx+w][1]-image[indx-y][1])); - -g[0]=CLIP((23*image[indx-u][1]+23*image[indx-w][1]+2*image[indx-y][1]+8*(image[indx-v][c]-image[indx-x][c])+40*(image[indx][c]-image[indx-v][c]))/48.0); -g[1]=CLIP((23*image[indx+1][1]+23*image[indx+3][1]+2*image[indx+5][1]+8*(image[indx+2][c]-image[indx+4][c])+40*(image[indx][c]-image[indx+2][c]))/48.0); -g[2]=CLIP((23*image[indx-1][1]+23*image[indx-3][1]+2*image[indx-5][1]+8*(image[indx-2][c]-image[indx-4][c])+40*(image[indx][c]-image[indx-2][c]))/48.0); -g[3]=CLIP((23*image[indx+u][1]+23*image[indx+w][1]+2*image[indx+y][1]+8*(image[indx+v][c]-image[indx+x][c])+40*(image[indx][c]-image[indx+v][c]))/48.0); - - image[indx][1]=CLIP((f[0]*g[0]+f[1]*g[1]+f[2]*g[2]+f[3]*g[3])/(f[0]+f[1]+f[2]+f[3])); - - min = MIN(image[indx+1+u][1], MIN(image[indx+1-u][1], MIN(image[indx-1+u][1], MIN(image[indx-1-u][1], MIN(image[indx-1][1], MIN(image[indx+1][1], MIN(image[indx-u][1], image[indx+u][1]))))))); - - max = MAX(image[indx+1+u][1], MAX(image[indx+1-u][1], MAX(image[indx-1+u][1], MAX(image[indx-1-u][1], MAX(image[indx-1][1], MAX(image[indx+1][1], MAX(image[indx-u][1], image[indx+u][1]))))))); - - image[indx][1] = ULIM(image[indx][1], max, min); - } -} - - - - -// FBDD (Fake Before Demosaicing Denoising) -void CLASS fbdd(int noiserd) -{ - double (*image2)[3]; - // safety net: disable for 4-color bayer or full-color images - if(colors!=3 || !filters) - return; - image2 = (double (*)[3]) calloc(width*height, sizeof *image2); - - border_interpolate(4); - -if (noiserd>1) -{ -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("FBDD full noise reduction...\n")); -#endif - fbdd_green(); - //dcb_color_full(image2); - dcb_color_full(); - fbdd_correction(); - - - dcb_color(); - rgb_to_lch(image2); - fbdd_correction2(image2); - fbdd_correction2(image2); - lch_to_rgb(image2); - -} -else -{ -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("FBDD noise reduction...\n")); -#endif - - fbdd_green(); - //dcb_color_full(image2); - dcb_color_full(); - fbdd_correction(); -} - -free(image2); - -} - - - - -// DCB demosaicing main routine -void CLASS dcb(int iterations, int dcb_enhance) -{ - - - int i=1; - - float (*image2)[3]; - image2 = (float (*)[3]) calloc(width*height, sizeof *image2); - - float (*image3)[3]; - image3 = (float (*)[3]) calloc(width*height, sizeof *image3); - -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("DCB demosaicing...\n")); -#endif - - border_interpolate(6); - - dcb_hor(image2); - dcb_color2(image2); - - dcb_ver(image3); - dcb_color3(image3); - - dcb_decide(image2, image3); - - free(image3); - - dcb_copy_to_buffer(image2); - - while (i<=iterations) - { -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("DCB correction pass %d...\n"), i); -#endif - dcb_nyquist(); - dcb_nyquist(); - dcb_nyquist(); - dcb_map(); - dcb_correction(); - i++; - } - - dcb_color(); - dcb_pp(); - -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("finishing DCB...\n")); -#endif - dcb_map(); - dcb_correction2(); - - dcb_map(); - dcb_correction(); - - dcb_map(); - dcb_correction(); - - dcb_map(); - dcb_correction(); - - dcb_map(); - dcb_restore_from_buffer(image2); - dcb_color(); - - if (dcb_enhance) - { -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("optional DCB refinement...\n")); -#endif - dcb_refinement(); - //dcb_color_full(image2); - dcb_color_full(); - } - - - free(image2); - -} - diff --git a/Source/LibRawLite/internal/dcraw_common.cpp b/Source/LibRawLite/internal/dcraw_common.cpp deleted file mode 100644 index 20ed524..0000000 --- a/Source/LibRawLite/internal/dcraw_common.cpp +++ /dev/null @@ -1,9445 +0,0 @@ -/* - Copyright 2008-2010 LibRaw LLC (info@libraw.org) - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - This file is generated from Dave Coffin's dcraw.c - dcraw.c -- Dave Coffin's raw photo decoder - Copyright 1997-2010 by Dave Coffin, dcoffin a cybercom o net - - Look into dcraw homepage (probably http://cybercom.net/~dcoffin/dcraw/) - for more information -*/ - -#include -#define CLASS LibRaw:: -#include "libraw/libraw_types.h" -#define LIBRAW_LIBRARY_BUILD -#define LIBRAW_IO_REDEFINED -#include "libraw/libraw.h" -#include "internal/defines.h" -#include "internal/var_defines.h" -#include "internal/libraw_bytebuffer.h" - -#ifndef __GLIBC__ -char *my_memmem (char *haystack, size_t haystacklen, - char *needle, size_t needlelen) -{ - char *c; - for (c = haystack; c <= haystack + haystacklen - needlelen; c++) - if (!memcmp (c, needle, needlelen)) - return c; - return 0; -} -#define memmem my_memmem -#endif - - -ushort CLASS sget2 (uchar *s) -{ - if (order == 0x4949) /* "II" means little-endian */ - return s[0] | s[1] << 8; - else /* "MM" means big-endian */ - return s[0] << 8 | s[1]; -} - -ushort CLASS get2() -{ - uchar str[2] = { 0xff,0xff }; - fread (str, 1, 2, ifp); - return sget2(str); -} - -unsigned CLASS sget4 (uchar *s) -{ - if (order == 0x4949) - return s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; - else - return s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]; -} -#define sget4(s) sget4((uchar *)s) - -unsigned CLASS get4() -{ - uchar str[4] = { 0xff,0xff,0xff,0xff }; - fread (str, 1, 4, ifp); - return sget4(str); -} - -unsigned CLASS getint (int type) -{ - return type == 3 ? get2() : get4(); -} - -float CLASS int_to_float (int i) -{ - union { int i; float f; } u; - u.i = i; - return u.f; -} - -double CLASS getreal (int type) -{ - union { char c[8]; double d; } u; - int i, rev; - - switch (type) { - case 3: return (unsigned short) get2(); - case 4: return (unsigned int) get4(); - case 5: u.d = (unsigned int) get4(); - return u.d / (unsigned int) get4(); - case 8: return (signed short) get2(); - case 9: return (signed int) get4(); - case 10: u.d = (signed int) get4(); - return u.d / (signed int) get4(); - case 11: return int_to_float (get4()); - case 12: - rev = 7 * ((order == 0x4949) == (ntohs(0x1234) == 0x1234)); - for (i=0; i < 8; i++) - u.c[i ^ rev] = fgetc(ifp); - return u.d; - default: return fgetc(ifp); - } -} - -void CLASS read_shorts (ushort *pixel, int count) -{ - if (fread (pixel, 2, count, ifp) < count) derror(); - if ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) - swab ((char*)pixel, (char*)pixel, count*2); -} - -#ifdef LIBRAW_LIBRARY_BUILD -#define RBAYER(x,y) raw_image[(x)*raw_width+(y)] -#define RRBAYER(x,y) raw_image[((x)+top_margin)*raw_width+(y)+left_margin] -#define CBAYER(x,y) color_image[((x)+top_margin)*raw_width+(y)+left_margin][FC((x),(y))] -#else -#define CBAYER(x,y) BAYER((x),(y)) -#define RBAYER(x,y) BAYER((x),(y)) -#define RRBAYER(x,y) BAYER((x),(y)) -#endif - -void CLASS canon_600_fixed_wb (int temp) -{ - static const short mul[4][5] = { - { 667, 358,397,565,452 }, - { 731, 390,367,499,517 }, - { 1119, 396,348,448,537 }, - { 1399, 485,431,508,688 } }; - int lo, hi, i; - float frac=0; - - for (lo=4; --lo; ) - if (*mul[lo] <= temp) break; - for (hi=0; hi < 3; hi++) - if (*mul[hi] >= temp) break; - if (lo != hi) - frac = (float) (temp - *mul[lo]) / (*mul[hi] - *mul[lo]); - for (i=1; i < 5; i++) - pre_mul[i-1] = 1 / (frac * mul[hi][i] + (1-frac) * mul[lo][i]); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.pre_mul_state = LIBRAW_COLORSTATE_CONST; -#endif -} - -/* Return values: 0 = white 1 = near white 2 = not white */ -int CLASS canon_600_color (int ratio[2], int mar) -{ - int clipped=0, target, miss; - - if (flash_used) { - if (ratio[1] < -104) - { ratio[1] = -104; clipped = 1; } - if (ratio[1] > 12) - { ratio[1] = 12; clipped = 1; } - } else { - if (ratio[1] < -264 || ratio[1] > 461) return 2; - if (ratio[1] < -50) - { ratio[1] = -50; clipped = 1; } - if (ratio[1] > 307) - { ratio[1] = 307; clipped = 1; } - } - target = flash_used || ratio[1] < 197 - ? -38 - (398 * ratio[1] >> 10) - : -123 + (48 * ratio[1] >> 10); - if (target - mar <= ratio[0] && - target + 20 >= ratio[0] && !clipped) return 0; - miss = target - ratio[0]; - if (abs(miss) >= mar*4) return 2; - if (miss < -20) miss = -20; - if (miss > mar) miss = mar; - ratio[0] = target - miss; - return 1; -} - -void CLASS canon_600_auto_wb() -{ - int mar, row, col, i, j, st, count[] = { 0,0 }; - int test[8], total[2][8], ratio[2][2], stat[2]; - - memset (&total, 0, sizeof total); - i = canon_ev + 0.5; - if (i < 10) mar = 150; - else if (i > 12) mar = 20; - else mar = 280 - 20 * i; - if (flash_used) mar = 80; - for (row=14; row < height-14; row+=4) - for (col=10; col < width; col+=2) { - for (i=0; i < 8; i++) - test[(i & 4) + FC(row+(i >> 1),col+(i & 1))] = - BAYER(row+(i >> 1),col+(i & 1)); - for (i=0; i < 8; i++) - if (test[i] < 150 || test[i] > 1500) goto next; - for (i=0; i < 4; i++) - if (abs(test[i] - test[i+4]) > 50) goto next; - for (i=0; i < 2; i++) { - for (j=0; j < 4; j+=2) - ratio[i][j >> 1] = ((test[i*4+j+1]-test[i*4+j]) << 10) / test[i*4+j]; - stat[i] = canon_600_color (ratio[i], mar); - } - if ((st = stat[0] | stat[1]) > 1) goto next; - for (i=0; i < 2; i++) - if (stat[i]) - for (j=0; j < 2; j++) - test[i*4+j*2+1] = test[i*4+j*2] * (0x400 + ratio[i][j]) >> 10; - for (i=0; i < 8; i++) - total[st][i] += test[i]; - count[st]++; -next: ; - } - if (count[0] | count[1]) { - st = count[0]*200 < count[1]; - for (i=0; i < 4; i++) - pre_mul[i] = 1.0 / (total[st][i] + total[st][i+4]); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.pre_mul_state = LIBRAW_COLORSTATE_CALCULATED; -#endif - } -} - -void CLASS canon_600_coeff() -{ - static const short table[6][12] = { - { -190,702,-1878,2390, 1861,-1349,905,-393, -432,944,2617,-2105 }, - { -1203,1715,-1136,1648, 1388,-876,267,245, -1641,2153,3921,-3409 }, - { -615,1127,-1563,2075, 1437,-925,509,3, -756,1268,2519,-2007 }, - { -190,702,-1886,2398, 2153,-1641,763,-251, -452,964,3040,-2528 }, - { -190,702,-1878,2390, 1861,-1349,905,-393, -432,944,2617,-2105 }, - { -807,1319,-1785,2297, 1388,-876,769,-257, -230,742,2067,-1555 } }; - int t=0, i, c; - float mc, yc; - - mc = pre_mul[1] / pre_mul[2]; - yc = pre_mul[3] / pre_mul[2]; - if (mc > 1 && mc <= 1.28 && yc < 0.8789) t=1; - if (mc > 1.28 && mc <= 2) { - if (yc < 0.8789) t=3; - else if (yc <= 2) t=4; - } - if (flash_used) t=5; - for (raw_color = i=0; i < 3; i++) - FORCC rgb_cam[i][c] = table[t][i*4 + c] / 1024.0; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.rgb_cam_state = LIBRAW_COLORSTATE_CALCULATED; -#endif -} - -void CLASS canon_600_load_raw() -{ - uchar data[1120], *dp; - ushort pixel[896], *pix; - int irow, row, col, val; - static const short mul[4][2] = - { { 1141,1145 }, { 1128,1109 }, { 1178,1149 }, { 1128,1109 } }; - - for (irow=row=0; irow < height; irow++) { - if (fread (data, 1, raw_width*5/4, ifp) < raw_width*5/4) derror(); - for (dp=data, pix=pixel; dp < data+1120; dp+=10, pix+=8) { - pix[0] = (dp[0] << 2) + (dp[1] >> 6 ); - pix[1] = (dp[2] << 2) + (dp[1] >> 4 & 3); - pix[2] = (dp[3] << 2) + (dp[1] >> 2 & 3); - pix[3] = (dp[4] << 2) + (dp[1] & 3); - pix[4] = (dp[5] << 2) + (dp[9] & 3); - pix[5] = (dp[6] << 2) + (dp[9] >> 2 & 3); - pix[6] = (dp[7] << 2) + (dp[9] >> 4 & 3); - pix[7] = (dp[8] << 2) + (dp[9] >> 6 ); - } -#ifndef LIBRAW_LIBRARY_BUILD - for (col=0; col < width; col++) - { - BAYER(row,col) = pixel[col]; - } -#else - for (col=0; col < raw_width; col++) - RBAYER(row,col) = pixel[col]; -#endif - - for (col=width; col < raw_width; col++) - { - black += pixel[col]; - } - if ((row+=2) > height) row = 1; - } - if (raw_width > width) - black = black / ((raw_width - width) * height) - 4; -#ifndef LIBRAW_LIBRARY_BUILD - for (row=0; row < height; row++) - for (col=0; col < width; col++) { - if ((val = BAYER(row,col) - black) < 0) val = 0; - val = val * mul[row & 3][col & 1] >> 9; - BAYER(row,col) = val; - } -#else - for (row=0; row < height; row++) - for (col=0; col < raw_width; col++) { - if ((val = RBAYER(row,col) - black) < 0) val = 0; - val = val * mul[row & 3][col & 1] >> 9; - RBAYER(row,col) = val; - } - -#endif - canon_600_fixed_wb(1311); - canon_600_auto_wb(); - canon_600_coeff(); - maximum = (0x3ff - black) * 1109 >> 9; - black = 0; -} - -void CLASS remove_zeroes() -{ - unsigned row, col, tot, n, r, c; - -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_REMOVE_ZEROES,0,2); -#endif - for (row=0; row < height; row++) - for (col=0; col < width; col++) - if (BAYER(row,col) == 0) { - tot = n = 0; - for (r = row-2; r <= row+2; r++) - for (c = col-2; c <= col+2; c++) - if (r < height && c < width && - FC(r,c) == FC(row,col) && BAYER(r,c)) - tot += (n++,BAYER(r,c)); - if (n) BAYER(row,col) = tot/n; - } -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_REMOVE_ZEROES,1,2); -#endif -} - -int CLASS canon_s2is() -{ - unsigned row; - - for (row=0; row < 100; row++) { - fseek (ifp, row*3340 + 3284, SEEK_SET); - if (getc(ifp) > 15) return 1; - } - return 0; -} - -/* - getbits(-1) initializes the buffer - getbits(n) where 0 <= n <= 25 returns an n-bit integer - */ - -unsigned CLASS getbithuff (int nbits, ushort *huff) -{ -#ifdef LIBRAW_NOTHREADS - static unsigned bitbuf=0; - static int vbits=0, reset=0; -#else -#define bitbuf tls->getbits.bitbuf -#define vbits tls->getbits.vbits -#define reset tls->getbits.reset -#endif - unsigned c; - - if (nbits == -1) - return bitbuf = vbits = reset = 0; - if (nbits == 0 || vbits < 0) return 0; - while (!reset && vbits < nbits && (c = fgetc(ifp)) != EOF && - !(reset = zero_after_ff && c == 0xff && fgetc(ifp))) { - bitbuf = (bitbuf << 8) + (uchar) c; - vbits += 8; - } - c = bitbuf << (32-vbits) >> (32-nbits); - if (huff) { - vbits -= huff[c] >> 8; - c = (uchar) huff[c]; - } else - vbits -= nbits; - if (vbits < 0) derror(); - return c; -#ifndef LIBRAW_NOTHREADS -#undef bitbuf -#undef vbits -#undef reset -#endif -} - -#define getbits(n) getbithuff(n,0) -#define gethuff(h) getbithuff(*h,h+1) - -/* - Construct a decode tree according to the specification in *source. - The first 16 bytes specify how many codes should be 1-bit, 2-bit - 3-bit, etc. Bytes after that are the leaf values. - - For example, if the source is - - { 0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0, - 0x04,0x03,0x05,0x06,0x02,0x07,0x01,0x08,0x09,0x00,0x0a,0x0b,0xff }, - - then the code is - - 00 0x04 - 010 0x03 - 011 0x05 - 100 0x06 - 101 0x02 - 1100 0x07 - 1101 0x01 - 11100 0x08 - 11101 0x09 - 11110 0x00 - 111110 0x0a - 1111110 0x0b - 1111111 0xff - */ -ushort * CLASS make_decoder_ref (const uchar **source) -{ - int max, len, h, i, j; - const uchar *count; - ushort *huff; - - count = (*source += 16) - 17; - for (max=16; max && !count[max]; max--); - huff = (ushort *) calloc (1 + (1 << max), sizeof *huff); - merror (huff, "make_decoder()"); - huff[0] = max; - for (h=len=1; len <= max; len++) - for (i=0; i < count[len]; i++, ++*source) - for (j=0; j < 1 << (max-len); j++) - if (h <= 1 << max) - huff[h++] = len << 8 | **source; - return huff; -} - -ushort * CLASS make_decoder (const uchar *source) -{ - return make_decoder_ref (&source); -} - -void CLASS crw_init_tables (unsigned table, ushort *huff[2]) -{ - static const uchar first_tree[3][29] = { - { 0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0, - 0x04,0x03,0x05,0x06,0x02,0x07,0x01,0x08,0x09,0x00,0x0a,0x0b,0xff }, - { 0,2,2,3,1,1,1,1,2,0,0,0,0,0,0,0, - 0x03,0x02,0x04,0x01,0x05,0x00,0x06,0x07,0x09,0x08,0x0a,0x0b,0xff }, - { 0,0,6,3,1,1,2,0,0,0,0,0,0,0,0,0, - - 0x06,0x05,0x07,0x04,0x08,0x03,0x09,0x02,0x00,0x0a,0x01,0x0b,0xff }, - }; - static const uchar second_tree[3][180] = { - { 0,2,2,2,1,4,2,1,2,5,1,1,0,0,0,139, - 0x03,0x04,0x02,0x05,0x01,0x06,0x07,0x08, - 0x12,0x13,0x11,0x14,0x09,0x15,0x22,0x00,0x21,0x16,0x0a,0xf0, - 0x23,0x17,0x24,0x31,0x32,0x18,0x19,0x33,0x25,0x41,0x34,0x42, - 0x35,0x51,0x36,0x37,0x38,0x29,0x79,0x26,0x1a,0x39,0x56,0x57, - 0x28,0x27,0x52,0x55,0x58,0x43,0x76,0x59,0x77,0x54,0x61,0xf9, - 0x71,0x78,0x75,0x96,0x97,0x49,0xb7,0x53,0xd7,0x74,0xb6,0x98, - 0x47,0x48,0x95,0x69,0x99,0x91,0xfa,0xb8,0x68,0xb5,0xb9,0xd6, - 0xf7,0xd8,0x67,0x46,0x45,0x94,0x89,0xf8,0x81,0xd5,0xf6,0xb4, - 0x88,0xb1,0x2a,0x44,0x72,0xd9,0x87,0x66,0xd4,0xf5,0x3a,0xa7, - 0x73,0xa9,0xa8,0x86,0x62,0xc7,0x65,0xc8,0xc9,0xa1,0xf4,0xd1, - 0xe9,0x5a,0x92,0x85,0xa6,0xe7,0x93,0xe8,0xc1,0xc6,0x7a,0x64, - 0xe1,0x4a,0x6a,0xe6,0xb3,0xf1,0xd3,0xa5,0x8a,0xb2,0x9a,0xba, - 0x84,0xa4,0x63,0xe5,0xc5,0xf3,0xd2,0xc4,0x82,0xaa,0xda,0xe4, - 0xf2,0xca,0x83,0xa3,0xa2,0xc3,0xea,0xc2,0xe2,0xe3,0xff,0xff }, - { 0,2,2,1,4,1,4,1,3,3,1,0,0,0,0,140, - 0x02,0x03,0x01,0x04,0x05,0x12,0x11,0x06, - 0x13,0x07,0x08,0x14,0x22,0x09,0x21,0x00,0x23,0x15,0x31,0x32, - 0x0a,0x16,0xf0,0x24,0x33,0x41,0x42,0x19,0x17,0x25,0x18,0x51, - 0x34,0x43,0x52,0x29,0x35,0x61,0x39,0x71,0x62,0x36,0x53,0x26, - 0x38,0x1a,0x37,0x81,0x27,0x91,0x79,0x55,0x45,0x28,0x72,0x59, - 0xa1,0xb1,0x44,0x69,0x54,0x58,0xd1,0xfa,0x57,0xe1,0xf1,0xb9, - 0x49,0x47,0x63,0x6a,0xf9,0x56,0x46,0xa8,0x2a,0x4a,0x78,0x99, - 0x3a,0x75,0x74,0x86,0x65,0xc1,0x76,0xb6,0x96,0xd6,0x89,0x85, - 0xc9,0xf5,0x95,0xb4,0xc7,0xf7,0x8a,0x97,0xb8,0x73,0xb7,0xd8, - 0xd9,0x87,0xa7,0x7a,0x48,0x82,0x84,0xea,0xf4,0xa6,0xc5,0x5a, - 0x94,0xa4,0xc6,0x92,0xc3,0x68,0xb5,0xc8,0xe4,0xe5,0xe6,0xe9, - 0xa2,0xa3,0xe3,0xc2,0x66,0x67,0x93,0xaa,0xd4,0xd5,0xe7,0xf8, - 0x88,0x9a,0xd7,0x77,0xc4,0x64,0xe2,0x98,0xa5,0xca,0xda,0xe8, - 0xf3,0xf6,0xa9,0xb2,0xb3,0xf2,0xd2,0x83,0xba,0xd3,0xff,0xff }, - { 0,0,6,2,1,3,3,2,5,1,2,2,8,10,0,117, - 0x04,0x05,0x03,0x06,0x02,0x07,0x01,0x08, - 0x09,0x12,0x13,0x14,0x11,0x15,0x0a,0x16,0x17,0xf0,0x00,0x22, - 0x21,0x18,0x23,0x19,0x24,0x32,0x31,0x25,0x33,0x38,0x37,0x34, - 0x35,0x36,0x39,0x79,0x57,0x58,0x59,0x28,0x56,0x78,0x27,0x41, - 0x29,0x77,0x26,0x42,0x76,0x99,0x1a,0x55,0x98,0x97,0xf9,0x48, - 0x54,0x96,0x89,0x47,0xb7,0x49,0xfa,0x75,0x68,0xb6,0x67,0x69, - 0xb9,0xb8,0xd8,0x52,0xd7,0x88,0xb5,0x74,0x51,0x46,0xd9,0xf8, - 0x3a,0xd6,0x87,0x45,0x7a,0x95,0xd5,0xf6,0x86,0xb4,0xa9,0x94, - 0x53,0x2a,0xa8,0x43,0xf5,0xf7,0xd4,0x66,0xa7,0x5a,0x44,0x8a, - 0xc9,0xe8,0xc8,0xe7,0x9a,0x6a,0x73,0x4a,0x61,0xc7,0xf4,0xc6, - 0x65,0xe9,0x72,0xe6,0x71,0x91,0x93,0xa6,0xda,0x92,0x85,0x62, - 0xf3,0xc5,0xb2,0xa4,0x84,0xba,0x64,0xa5,0xb3,0xd2,0x81,0xe5, - 0xd3,0xaa,0xc4,0xca,0xf2,0xb1,0xe4,0xd1,0x83,0x63,0xea,0xc3, - 0xe2,0x82,0xf1,0xa3,0xc2,0xa1,0xc1,0xe3,0xa2,0xe1,0xff,0xff } - }; - if (table > 2) table = 2; - huff[0] = make_decoder ( first_tree[table]); - huff[1] = make_decoder (second_tree[table]); -} - -/* - Return 0 if the image starts with compressed data, - 1 if it starts with uncompressed low-order bits. - - In Canon compressed data, 0xff is always followed by 0x00. - */ -int CLASS canon_has_lowbits() -{ - uchar test[0x4000]; - int ret=1; - unsigned i; - - fseek (ifp, 0, SEEK_SET); - fread (test, 1, sizeof test, ifp); - for (i=540; i < sizeof test - 1; i++) - if (test[i] == 0xff) { - if (test[i+1]) return 1; - ret=0; - } - return ret; -} - -void CLASS canon_compressed_load_raw() -{ - ushort *pixel, *prow, *huff[2]; - int nblocks, lowbits, i, c, row, r, col, save, val; - unsigned irow, icol; - int block, diffbuf[64], leaf, len, diff, carry=0, pnum=0, base[2]; - - crw_init_tables (tiff_compress, huff); - pixel = (ushort *) calloc (raw_width*8, sizeof *pixel); - merror (pixel, "canon_compressed_load_raw()"); - lowbits = canon_has_lowbits(); - if (!lowbits) maximum = 0x3ff; - fseek (ifp, 540 + lowbits*raw_height*raw_width/4, SEEK_SET); - zero_after_ff = 1; - getbits(-1); - for (row=0; row < raw_height; row+=8) { - nblocks = MIN (8, raw_height-row) * raw_width >> 6; - for (block=0; block < nblocks; block++) { - memset (diffbuf, 0, sizeof diffbuf); - for (i=0; i < 64; i++ ) { - leaf = gethuff(huff[i > 0]); - if (leaf == 0 && i) break; - if (leaf == 0xff) continue; - i += leaf >> 4; - len = leaf & 15; - if (len == 0) continue; - diff = getbits(len); - if ((diff & (1 << (len-1))) == 0) - diff -= (1 << len) - 1; - if (i < 64) diffbuf[i] = diff; - } - diffbuf[0] += carry; - carry = diffbuf[0]; - for (i=0; i < 64; i++ ) { - if (pnum++ % raw_width == 0) - base[0] = base[1] = 512; - if ((pixel[(block << 6) + i] = base[i & 1] += diffbuf[i]) >> 10) - derror(); - } - } - if (lowbits) { - save = ftell(ifp); - fseek (ifp, 26 + row*raw_width/4, SEEK_SET); - for (prow=pixel, i=0; i < raw_width*2; i++) { - c = fgetc(ifp); - for (r=0; r < 8; r+=2, prow++) { - val = (*prow << 2) + ((c >> r) & 3); - if (raw_width == 2672 && val < 512) val += 2; - *prow = val; - } - } - fseek (ifp, save, SEEK_SET); - } - -#ifdef LIBRAW_LIBRARY_BUILD - for (r=0; r < 8; r++) { - if(row+r>=raw_height) break; // Not sure that raw_height is always N*8 - // MOVE entire row into place - memmove(&raw_image[(row+r)*raw_width],&pixel[r*raw_width],raw_width*sizeof(pixel[0])); - - irow = row - top_margin + r; - if (irow >= height) continue; // if row above image area than irow is VERY positive :) - - // only margins! - for (col=0; col < left_margin; col++) - { - icol = col - left_margin; - c = FC(irow,icol); - if (icol >= width && col > 1 && (unsigned) (col-left_margin+2) > width+3) - cblack[c] += (cblack[4+c]++,pixel[r*raw_width+col]); - } - for (col=width+left_margin; col < raw_width; col++) - { - icol = col - left_margin; - c = FC(irow,icol); - if (icol >= width && col > 1 && (unsigned) (col-left_margin+2) > width+3) - cblack[c] += (cblack[4+c]++,pixel[r*raw_width+col]); - } - - } -#else - // dcraw original code - for (r=0; r < 8; r++) { - irow = row - top_margin + r; - if (irow >= height) continue; - for (col=0; col < raw_width; col++) { - icol = col - left_margin; - c = FC(irow,icol); - if (icol < width) - BAYER(irow,icol) = pixel[r*raw_width+col]; - else if (col > 1 && (unsigned) (col-left_margin+2) > width+3) - cblack[c] += (cblack[4+c]++,pixel[r*raw_width+col]); - } - } -#endif - } - free (pixel); - FORC(2) free (huff[c]); - FORC4 if (cblack[4+c]) cblack[c] /= cblack[4+c]; -} - -int CLASS ljpeg_start (struct jhead *jh, int info_only) -{ - int c, tag, len; - uchar data[0x10000]; - const uchar *dp; - - memset (jh, 0, sizeof *jh); - jh->restart = INT_MAX; - fread (data, 2, 1, ifp); - if (data[1] != 0xd8) return 0; - do { - fread (data, 2, 2, ifp); - tag = data[0] << 8 | data[1]; - len = (data[2] << 8 | data[3]) - 2; - if (tag <= 0xff00) return 0; - fread (data, 1, len, ifp); - switch (tag) { - case 0xffc3: - jh->sraw = ((data[7] >> 4) * (data[7] & 15) - 1) & 3; - case 0xffc0: - jh->bits = data[0]; - jh->high = data[1] << 8 | data[2]; - jh->wide = data[3] << 8 | data[4]; - jh->clrs = data[5] + jh->sraw; - if (len == 9 && !dng_version) getc(ifp); - break; - case 0xffc4: - if (info_only) break; - for (dp = data; dp < data+len && (c = *dp++) < 4; ) - jh->free[c] = jh->huff[c] = make_decoder_ref (&dp); - break; - case 0xffda: - jh->psv = data[1+data[0]*2]; - jh->bits -= data[3+data[0]*2] & 15; - break; - case 0xffdd: - jh->restart = data[0] << 8 | data[1]; - } - } while (tag != 0xffda); - if (info_only) return 1; - FORC(5) if (!jh->huff[c+1]) jh->huff[c+1] = jh->huff[c]; - if (jh->sraw) { - FORC(4) jh->huff[2+c] = jh->huff[1]; - FORC(jh->sraw) jh->huff[1+c] = jh->huff[0]; - } - jh->row = (ushort *) calloc (jh->wide*jh->clrs, 4); - merror (jh->row, "ljpeg_start()"); - return zero_after_ff = 1; -} - -void CLASS ljpeg_end (struct jhead *jh) -{ - int c; - FORC4 if (jh->free[c]) free (jh->free[c]); - free (jh->row); -} - -// used for kodak-262 decoder -int CLASS ljpeg_diff (ushort *huff) -{ - int len, diff; - - len = gethuff(huff); - if (len == 16 && (!dng_version || dng_version >= 0x1010000)) - return -32768; - diff = getbits(len); - if ((diff & (1 << (len-1))) == 0) - diff -= (1 << len) - 1; - return diff; -} - -#ifdef LIBRAW_LIBRARY_BUILD -int CLASS ljpeg_diff_new (LibRaw_bit_buffer& bits, LibRaw_byte_buffer* buf,ushort *huff) -{ - int len, diff; - - len = bits._gethuff_lj(buf,*huff,huff+1); - if (len == 16 && (!dng_version || dng_version >= 0x1010000)) - return -32768; - diff = bits._getbits_lj(buf,len); - if ((diff & (1 << (len-1))) == 0) - diff -= (1 << len) - 1; - return diff; -} - -int CLASS ljpeg_diff_pef (LibRaw_bit_buffer& bits, LibRaw_byte_buffer* buf,ushort *huff) -{ - int len, diff; - - len = bits._gethuff(buf,*huff,huff+1,zero_after_ff); - if (len == 16 && (!dng_version || dng_version >= 0x1010000)) - return -32768; - diff = bits._getbits(buf,len,zero_after_ff); - if ((diff & (1 << (len-1))) == 0) - diff -= (1 << len) - 1; - return diff; -} - - -#endif - - -ushort * CLASS ljpeg_row (int jrow, struct jhead *jh) -{ - int col, c, diff, pred, spred=0; - ushort mark=0, *row[3]; - - if (jrow * jh->wide % jh->restart == 0) { - FORC(6) jh->vpred[c] = 1 << (jh->bits-1); - if (jrow) { - fseek (ifp, -2, SEEK_CUR); - do mark = (mark << 8) + (c = fgetc(ifp)); - while (c != EOF && mark >> 4 != 0xffd); - } - getbits(-1); - } - FORC3 row[c] = jh->row + jh->wide*jh->clrs*((jrow+c) & 1); - for (col=0; col < jh->wide; col++) - FORC(jh->clrs) { - diff = ljpeg_diff (jh->huff[c]); - if (jh->sraw && c <= jh->sraw && (col | c)) - pred = spred; - else if (col) pred = row[0][-jh->clrs]; - else pred = (jh->vpred[c] += diff) - diff; - if (jrow && col) switch (jh->psv) { - case 1: break; - case 2: pred = row[1][0]; break; - case 3: pred = row[1][-jh->clrs]; break; - case 4: pred = pred + row[1][0] - row[1][-jh->clrs]; break; - case 5: pred = pred + ((row[1][0] - row[1][-jh->clrs]) >> 1); break; - case 6: pred = row[1][0] + ((pred - row[1][-jh->clrs]) >> 1); break; - case 7: pred = (pred + row[1][0]) >> 1; break; - default: pred = 0; - } - if ((**row = pred + diff) >> jh->bits) derror(); - if (c <= jh->sraw) spred = **row; - row[0]++; row[1]++; - } - return row[2]; -} - -#ifdef LIBRAW_LIBRARY_BUILD -ushort * CLASS ljpeg_row_new (int jrow, struct jhead *jh, LibRaw_bit_buffer& bits,LibRaw_byte_buffer* bytes) -{ - int col, c, diff, pred, spred=0; - ushort mark=0, *row[3]; - - if (jrow * jh->wide % jh->restart == 0) { - FORC(6) jh->vpred[c] = 1 << (jh->bits-1); - if (jrow) { - bytes->unseek2(); - do mark = (mark << 8) + (c = bytes->get_byte()); - while (c != EOF && mark >> 4 != 0xffd); - } - bits.reset(); - } - FORC3 row[c] = jh->row + jh->wide*jh->clrs*((jrow+c) & 1); - for (col=0; col < jh->wide; col++) - FORC(jh->clrs) { - diff = ljpeg_diff_new (bits,bytes,jh->huff[c]); - if (jh->sraw && c <= jh->sraw && (col | c)) - pred = spred; - else if (col) pred = row[0][-jh->clrs]; - else pred = (jh->vpred[c] += diff) - diff; - if (jrow && col) switch (jh->psv) { - case 1: break; - case 2: pred = row[1][0]; break; - case 3: pred = row[1][-jh->clrs]; break; - case 4: pred = pred + row[1][0] - row[1][-jh->clrs]; break; - case 5: pred = pred + ((row[1][0] - row[1][-jh->clrs]) >> 1); break; - case 6: pred = row[1][0] + ((pred - row[1][-jh->clrs]) >> 1); break; - case 7: pred = (pred + row[1][0]) >> 1; break; - default: pred = 0; - } - if ((**row = pred + diff) >> jh->bits) derror(); - if (c <= jh->sraw) spred = **row; - row[0]++; row[1]++; - } - return row[2]; -} - -#endif - -void CLASS lossless_jpeg_load_raw() -{ - int jwide, jrow, jcol, val, c, i, row=0, col=0; -#ifndef LIBRAW_LIBRARY_BUILD - int jidx,j; -#endif - struct jhead jh; - int min=INT_MAX; - ushort *rp; -#ifdef LIBRAW_LIBRARY_BUILD - int save_min = 0; - unsigned slicesW[16],slicesWcnt=0,slices; - unsigned *offset; - unsigned t_y=0,t_x=0,t_s=0,slice=0,pixelsInSlice,pixno; - if (!strcasecmp(make,"KODAK")) - save_min = 1; -#endif - -#ifdef LIBRAW_LIBRARY_BUILD - if (cr2_slice[0]>15) - throw LIBRAW_EXCEPTION_IO_EOF; // change many slices -#else - if (cr2_slice[0]>15) - { - fprintf(stderr,"Too many CR2 slices: %d\n",cr2_slice[0]+1); - return; - } -#endif - - - if (!ljpeg_start (&jh, 0)) return; - jwide = jh.wide * jh.clrs; - -#ifdef LIBRAW_LIBRARY_BUILD - if(cr2_slice[0]) - { - for(i=0;i= raw_width * raw_height) - throw LIBRAW_EXCEPTION_IO_BADFILE; - t_y++; - if(t_y == jh.high) - { - t_y = 0; - t_x += slicesW[t_s++]; - } - } - offset[slices] = offset[slices-1]; - slice = 1; // next slice - pixno = offset[0]; - pixelsInSlice = slicesW[0]; -#endif - -#ifdef LIBRAW_LIBRARY_BUILD - LibRaw_byte_buffer *buf=NULL; - if(data_size) - buf = ifp->make_byte_buffer(data_size); - LibRaw_bit_buffer bits; -#endif - for (jrow=0; jrow < jh.high; jrow++) { -#ifdef LIBRAW_LIBRARY_BUILD - if (buf) - rp = ljpeg_row_new (jrow, &jh,bits,buf); - else -#endif - rp = ljpeg_row (jrow, &jh); - - if (load_flags & 1) - row = jrow & 1 ? height-1-jrow/2 : jrow/2; - for (jcol=0; jcol < jwide; jcol++) { - val = *rp++; - if (jh.bits <= 12) - val = curve[val & 0xfff]; -#ifndef LIBRAW_LIBRARY_BUILD - // slow dcraw way to calculate row/col - if (cr2_slice[0]) { - jidx = jrow*jwide + jcol; - i = jidx / (cr2_slice[1]*jh.high); - if ((j = i >= cr2_slice[0])) - i = cr2_slice[0]; - jidx -= i * (cr2_slice[1]*jh.high); - row = jidx / cr2_slice[1+j]; - col = jidx % cr2_slice[1+j] + i*cr2_slice[1]; - } -#else - // new fast one, but for data_size defined only (i.e. new CR2 format, not 1D/1Ds) - if(buf) - { - if(!(load_flags & 1)) - row = pixno/raw_width; - col = pixno % raw_width; - pixno++; - if (0 == --pixelsInSlice) - { - unsigned o = offset[slice++]; - pixno = o & 0x0fffffff; - pixelsInSlice = slicesW[o>>28]; - } - } -#endif -#ifndef LIBRAW_LIBRARY_BUILD - - if (raw_width == 3984 && (col -= 2) < 0) - col += (row--,raw_width); - - if ((unsigned) (row-top_margin) < height) { - c = FC(row-top_margin,col-left_margin); - if ((unsigned) (col-left_margin) < width) { - BAYER(row-top_margin,col-left_margin) = val; - if (min > val) min = val; - } else if (col > 1 && (unsigned) (col-left_margin+2) > width+3) - cblack[c] += (cblack[4+c]++,val); - } -#else - if (raw_width == 3984) - { - if ( (col -= 2) < 0) - col += (row--,raw_width); - if(row >= 0 && row < raw_height && col >= 0 && col < raw_width) - RBAYER(row,col) = val; - } - else - RBAYER(row,col) = val; - - if ((unsigned) (row-top_margin) < height) - { - // within image height - if ((unsigned) (col-left_margin) < width) - { - // within image area, save min - if(save_min) - if (min > val) min = val; - } - else if (col > 1 && (unsigned) (col-left_margin+2) > width+3) - { - c = FC(row-top_margin,col-left_margin); - cblack[c] += (cblack[4+c]++,val); - } - } -#endif - -#ifndef LIBRAW_LIBRARY_BUILD - if (++col >= raw_width) - col = (row++,0); -#else - if(!buf) // 1D or 1Ds case - if (++col >= raw_width) - col = (row++,0); -#endif - } - } - ljpeg_end (&jh); - FORC4 if (cblack[4+c]) cblack[c] /= cblack[4+c]; - if (!strcasecmp(make,"KODAK")) - black = min; -#ifdef LIBRAW_LIBRARY_BUILD - if(buf) - delete buf; - free(offset); -#endif -} - -void CLASS canon_sraw_load_raw() -{ - struct jhead jh; - short *rp=0, (*ip)[4]; - int jwide, slice, scol, ecol, row, col, jrow=0, jcol=0, pix[3], c; - int v[3]={0,0,0}, ver, hue; - char *cp; - - if (!ljpeg_start (&jh, 0)) return; - jwide = (jh.wide >>= 1) * jh.clrs; - -#ifdef LIBRAW_LIBRARY_BUILD - if(!data_size) - throw LIBRAW_EXCEPTION_IO_BADFILE; - LibRaw_byte_buffer *buf = ifp->make_byte_buffer(data_size); - LibRaw_bit_buffer bits; -#endif - - - for (ecol=slice=0; slice <= cr2_slice[0]; slice++) { - scol = ecol; - ecol += cr2_slice[1] * 2 / jh.clrs; - if (!cr2_slice[0] || ecol > raw_width-1) ecol = raw_width & -2; - for (row=0; row < height; row += (jh.clrs >> 1) - 1) { - ip = (short (*)[4]) image + row*width; - for (col=scol; col < ecol; col+=2, jcol+=jh.clrs) { - if ((jcol %= jwide) == 0) -#ifdef LIBRAW_LIBRARY_BUILD - rp = (short*) ljpeg_row_new (jrow++, &jh,bits,buf); -#else - rp = (short *) ljpeg_row (jrow++, &jh); -#endif - if (col >= width) continue; - FORC (jh.clrs-2) - ip[col + (c >> 1)*width + (c & 1)][0] = rp[jcol+c]; - ip[col][1] = rp[jcol+jh.clrs-2] - 16384; - ip[col][2] = rp[jcol+jh.clrs-1] - 16384; - } - } - } - for (cp=model2; *cp && !isdigit(*cp); cp++); - sscanf (cp, "%d.%d.%d", v, v+1, v+2); - ver = (v[0]*1000 + v[1])*1000 + v[2]; - hue = (jh.sraw+1) << 2; - if (unique_id >= 0x80000281 || (unique_id == 0x80000218 && ver > 1000006)) - hue = jh.sraw << 1; - ip = (short (*)[4]) image; - rp = ip[0]; - for (row=0; row < height; row++, ip+=width) { - if (row & (jh.sraw >> 1)) - for (col=0; col < width; col+=2) - for (c=1; c < 3; c++) - if (row == height-1) - ip[col][c] = ip[col-width][c]; - else ip[col][c] = (ip[col-width][c] + ip[col+width][c] + 1) >> 1; - for (col=1; col < width; col+=2) - for (c=1; c < 3; c++) - if (col == width-1) - ip[col][c] = ip[col-1][c]; - else ip[col][c] = (ip[col-1][c] + ip[col+1][c] + 1) >> 1; - } - for ( ; rp < ip[0]; rp+=4) { -#if 1 - if (unique_id < 0x80000218) { - rp[0] -= 512; - goto next; - } else if (unique_id == 0x80000285) { -next: pix[0] = rp[0] + rp[2]; - pix[2] = rp[0] + rp[1]; - pix[1] = rp[0] + ((-778*rp[1] - (rp[2] << 11)) >> 12); - } else { - rp[1] = (rp[1] << 2) + hue; - rp[2] = (rp[2] << 2) + hue; - pix[0] = rp[0] + (( 50*rp[1] + 22929*rp[2]) >> 14); - pix[1] = rp[0] + ((-5640*rp[1] - 11751*rp[2]) >> 14); - pix[2] = rp[0] + ((29040*rp[1] - 101*rp[2]) >> 14); - } -#else - if (unique_id < 0x80000218) { - pix[0] = rp[0] + rp[2] - 512; - pix[2] = rp[0] + rp[1] - 512; - pix[1] = rp[0] + ((-778*rp[1] - (rp[2] << 11)) >> 12) - 512; - } else { - rp[1] = (rp[1] << 2) + hue; - rp[2] = (rp[2] << 2) + hue; - pix[0] = rp[0] + (( 50*rp[1] + 22929*rp[2]) >> 14); - pix[1] = rp[0] + ((-5640*rp[1] - 11751*rp[2]) >> 14); - pix[2] = rp[0] + ((29040*rp[1] - 101*rp[2]) >> 14); - } -#endif - FORC3 - rp[c] = CLIP(pix[c] * sraw_mul[c] >> 10); - } -#ifdef LIBRAW_LIBRARY_BUILD - delete buf; -#endif - ljpeg_end (&jh); - maximum = 0x3fff; -} - -void CLASS adobe_copy_pixel (int row, int col, ushort **rp) -{ - unsigned r, c; - -#ifndef LIBRAW_LIBRARY_BUILD - r = row -= top_margin; - c = col -= left_margin; - if (is_raw == 2 && shot_select) (*rp)++; - if (filters) { - if (fuji_width) { - r = row + fuji_width - 1 - (col >> 1); - c = row + ((col+1) >> 1); - } - if (r < height && c < width) - BAYER(r,c) = **rp < 0x1000 ? curve[**rp] : **rp; - *rp += is_raw; - } else { - if (r < height && c < width) - FORC(tiff_samples) - image[row*width+col][c] = (*rp)[c] < 0x1000 ? curve[(*rp)[c]]:(*rp)[c]; - *rp += tiff_samples; - } -#else - if (is_raw == 2 && shot_select) (*rp)++; - if (filters) { - if(row < raw_height && col < raw_width) - RBAYER(row,col) = **rp < 0x1000 ? curve[**rp] : **rp; - *rp += is_raw; - } else { - if (row < raw_height && col < raw_width) - FORC(tiff_samples) - color_image[row*raw_width+col][c] = (*rp)[c]<0x1000 ? curve[(*rp)[c]]:(*rp)[c]; - *rp += tiff_samples; - } - -#endif - if (is_raw == 2 && shot_select) (*rp)--; - -} - -void CLASS adobe_dng_load_raw_lj() -{ - unsigned save, trow=0, tcol=0, jwide, jrow, jcol, row, col; - struct jhead jh; - ushort *rp; - while (trow < raw_height) { - save = ftell(ifp); - if (tile_length < INT_MAX) - fseek (ifp, get4(), SEEK_SET); - if (!ljpeg_start (&jh, 0)) break; - jwide = jh.wide; - if (filters) jwide *= jh.clrs; - jwide /= is_raw; -#ifdef LIBRAW_LIBRARY_BUILD - if(!data_size) - throw LIBRAW_EXCEPTION_IO_BADFILE; - LibRaw_byte_buffer *buf = ifp->make_byte_buffer(data_size); - LibRaw_bit_buffer bits; -#endif - for (row=col=jrow=0; jrow < jh.high; jrow++) { -#ifdef LIBRAW_LIBRARY_BUILD - rp = ljpeg_row_new (jrow, &jh,bits,buf); -#else - rp = ljpeg_row (jrow, &jh); -#endif - for (jcol=0; jcol < jwide; jcol++) { - adobe_copy_pixel (trow+row, tcol+col, &rp); - if (++col >= tile_width || col >= raw_width) - row += 1 + (col = 0); - } - } - fseek (ifp, save+4, SEEK_SET); - if ((tcol += tile_width) >= raw_width) - trow += tile_length + (tcol = 0); - ljpeg_end (&jh); -#ifdef LIBRAW_LIBRARY_BUILD - delete buf; -#endif - } -} - -void CLASS adobe_dng_load_raw_nc() -{ - ushort *pixel, *rp; - int row, col; - - pixel = (ushort *) calloc (raw_width * tiff_samples, sizeof *pixel); - merror (pixel, "adobe_dng_load_raw_nc()"); - - -#ifdef LIBRAW_LIBRARY_BUILD - int dsz= raw_height*raw_width * tiff_samples * tiff_bps/8; - LibRaw_byte_buffer *buf = NULL; - if (tiff_bps != 16) - { - buf = ifp->make_byte_buffer(dsz); - } - LibRaw_bit_buffer bits; -#endif - - for (row=0; row < raw_height; row++) { - if (tiff_bps == 16) - read_shorts (pixel, raw_width * tiff_samples); - else { -#ifdef LIBRAW_LIBRARY_BUILD - bits.reset(); - for (col=0; col < raw_width * tiff_samples; col++) - pixel[col] = bits._getbits(buf,tiff_bps,zero_after_ff); - -#else - getbits(-1); - for (col=0; col < raw_width * tiff_samples; col++) - pixel[col] = getbits(tiff_bps); -#endif - } - for (rp=pixel, col=0; col < raw_width; col++) - adobe_copy_pixel (row, col, &rp); - } - free (pixel); -#ifdef LIBRAW_LIBRARY_BUILD - if(buf) - delete buf; -#endif -} - -void CLASS pentax_load_raw() -{ - ushort bit[2][15], huff[4097]; - int dep, row, col, diff, c, i; - ushort vpred[2][2] = {{0,0},{0,0}}, hpred[2]; - - fseek (ifp, meta_offset, SEEK_SET); - dep = (get2() + 12) & 15; - fseek (ifp, 12, SEEK_CUR); - FORC(dep) bit[0][c] = get2(); - FORC(dep) bit[1][c] = fgetc(ifp); - FORC(dep) - for (i=bit[0][c]; i <= ((bit[0][c]+(4096 >> bit[1][c])-1) & 4095); ) - huff[++i] = bit[1][c] << 8 | c; - huff[0] = 12; - fseek (ifp, data_offset, SEEK_SET); -#ifdef LIBRAW_LIBRARY_BUILD - if(!data_size) - throw LIBRAW_EXCEPTION_IO_BADFILE; - LibRaw_byte_buffer *buf = ifp->make_byte_buffer(data_size); - LibRaw_bit_buffer bits; - bits.reset(); -#else - getbits(-1); -#endif - for (row=0; row < raw_height; row++) - { - for (col=0; col < raw_width; col++) { -#ifdef LIBRAW_LIBRARY_BUILD - diff = ljpeg_diff_pef(bits,buf,huff); -#else - diff = ljpeg_diff (huff); -#endif - if (col < 2) hpred[col] = vpred[row & 1][col] += diff; - else hpred[col & 1] += diff; - - unsigned val = hpred[col & 1]; - -#ifndef LIBRAW_LIBRARY_BUILD - if ((unsigned) (row-top_margin) < height && - (unsigned)(col-left_margin) < width) - BAYER(row-top_margin,col-left_margin) = val; -#else - RBAYER(row,col) = val; -#endif - if (val >> tiff_bps) derror(); - } - } -#ifdef LIBRAW_LIBRARY_BUILD - delete buf; -#endif -} - -void CLASS nikon_compressed_load_raw() -{ - static const uchar nikon_tree[][32] = { - { 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0, /* 12-bit lossy */ - 5,4,3,6,2,7,1,0,8,9,11,10,12 }, - { 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0, /* 12-bit lossy after split */ - 0x39,0x5a,0x38,0x27,0x16,5,4,3,2,1,0,11,12,12 }, - { 0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0, /* 12-bit lossless */ - 5,4,6,3,7,2,8,1,9,0,10,11,12 }, - { 0,1,4,3,1,1,1,1,1,2,0,0,0,0,0,0, /* 14-bit lossy */ - 5,6,4,7,8,3,9,2,1,0,10,11,12,13,14 }, - { 0,1,5,1,1,1,1,1,1,1,2,0,0,0,0,0, /* 14-bit lossy after split */ - 8,0x5c,0x4b,0x3a,0x29,7,6,5,4,3,2,1,0,13,14 }, - { 0,1,4,2,2,3,1,2,0,0,0,0,0,0,0,0, /* 14-bit lossless */ - 7,6,8,5,9,4,10,3,11,12,2,0,1,13,14 } }; - ushort *huff, ver0, ver1, vpred[2][2], hpred[2], csize; - int i, min, max, step=0, tree=0, split=0, row, col, len, shl, diff; - - fseek (ifp, meta_offset, SEEK_SET); - ver0 = fgetc(ifp); - ver1 = fgetc(ifp); - if (ver0 == 0x49 || ver1 == 0x58) - fseek (ifp, 2110, SEEK_CUR); - if (ver0 == 0x46) tree = 2; - if (tiff_bps == 14) tree += 3; - read_shorts (vpred[0], 4); - max = 1 << tiff_bps & 0x7fff; - if ((csize = get2()) > 1) - step = max / (csize-1); - if (ver0 == 0x44 && ver1 == 0x20 && step > 0) { - for (i=0; i < csize; i++) - curve[i*step] = get2(); - for (i=0; i < max; i++) - curve[i] = ( curve[i-i%step]*(step-i%step) + - curve[i-i%step+step]*(i%step) ) / step; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.curve_state = LIBRAW_COLORSTATE_LOADED; -#endif - fseek (ifp, meta_offset+562, SEEK_SET); - split = get2(); - } else if (ver0 != 0x46 && csize <= 0x4001) - { - read_shorts (curve, max=csize); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.curve_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - while (curve[max-2] == curve[max-1]) max--; - huff = make_decoder (nikon_tree[tree]); - fseek (ifp, data_offset, SEEK_SET); -#ifdef LIBRAW_LIBRARY_BUILD - if(!data_size) - throw LIBRAW_EXCEPTION_IO_BADFILE; - LibRaw_byte_buffer *buf = ifp->make_byte_buffer(data_size); - LibRaw_bit_buffer bits; - bits.reset(); -#else - getbits(-1); -#endif - for (min=row=0; row < height; row++) { - if (split && row == split) { - free (huff); - huff = make_decoder (nikon_tree[tree+1]); - max += (min = 16) << 1; - } - for (col=0; col < raw_width; col++) { -#ifdef LIBRAW_LIBRARY_BUILD - i = bits._gethuff(buf,*huff,huff+1,zero_after_ff); -#else - i = gethuff(huff); -#endif - len = i & 15; - shl = i >> 4; -#ifdef LIBRAW_LIBRARY_BUILD - diff = ((bits._getbits(buf,len-shl,zero_after_ff) << 1) + 1) << shl >> 1; -#else - diff = ((getbits(len-shl) << 1) + 1) << shl >> 1; -#endif - if ((diff & (1 << (len-1))) == 0) - diff -= (1 << len) - !shl; - if (col < 2) hpred[col] = vpred[row & 1][col] += diff; - else hpred[col & 1] += diff; - if ((ushort)(hpred[col & 1] + min) >= max) derror(); -#ifndef LIBRAW_LIBRARY_BUILD - if ((unsigned) (col-left_margin) < width) - BAYER(row,col-left_margin) = curve[LIM((short)hpred[col & 1],0,0x3fff)]; -#else - ushort xval = hpred[col & 1]; - xval = curve[LIM((short)xval,0,0x3fff)]; - RBAYER(row,col) = xval; -#endif - - } - } -#ifdef LIBRAW_LIBRARY_BUILD - delete buf; -#endif - free (huff); -} - -/* - Figure out if a NEF file is compressed. These fancy heuristics - are only needed for the D100, thanks to a bug in some cameras - that tags all images as "compressed". - */ -int CLASS nikon_is_compressed() -{ - uchar test[256]; - int i; - - fseek (ifp, data_offset, SEEK_SET); - fread (test, 1, 256, ifp); - for (i=15; i < 256; i+=16) - if (test[i]) return 1; - return 0; -} - -/* - Returns 1 for a Coolpix 995, 0 for anything else. - */ -int CLASS nikon_e995() -{ - int i, histo[256]; - const uchar often[] = { 0x00, 0x55, 0xaa, 0xff }; - - memset (histo, 0, sizeof histo); - fseek (ifp, -2000, SEEK_END); - for (i=0; i < 2000; i++) - histo[fgetc(ifp)]++; - for (i=0; i < 4; i++) - if (histo[often[i]] < 200) - return 0; - return 1; -} - -/* - Returns 1 for a Coolpix 2100, 0 for anything else. - */ -int CLASS nikon_e2100() -{ - uchar t[12]; - int i; - - fseek (ifp, 0, SEEK_SET); - for (i=0; i < 1024; i++) { - fread (t, 1, 12, ifp); - if (((t[2] & t[4] & t[7] & t[9]) >> 4 - & t[1] & t[6] & t[8] & t[11] & 3) != 3) - return 0; - } - return 1; -} - -void CLASS nikon_3700() -{ - int bits, i; - uchar dp[24]; - static const struct { - int bits; - char t_make[12], t_model[15]; - } table[] = { - { 0x00, "PENTAX", "Optio 33WR" }, - { 0x03, "NIKON", "E3200" }, - { 0x32, "NIKON", "E3700" }, - { 0x33, "OLYMPUS", "C740UZ" } }; - - fseek (ifp, 3072, SEEK_SET); - fread (dp, 1, 24, ifp); - bits = (dp[8] & 3) << 4 | (dp[20] & 3); - for (i=0; i < sizeof table / sizeof *table; i++) - if (bits == table[i].bits) { - strcpy (make, table[i].t_make ); - strcpy (model, table[i].t_model); - } -} - -/* - Separates a Minolta DiMAGE Z2 from a Nikon E4300. - */ -int CLASS minolta_z2() -{ - int i, nz; - char tail[424]; - - fseek (ifp, -sizeof tail, SEEK_END); - fread (tail, 1, sizeof tail, ifp); - for (nz=i=0; i < sizeof tail; i++) - if (tail[i]) nz++; - return nz > 20; -} - -/* - The Fuji Super CCD is just a Bayer grid rotated 45 degrees. - */ -void CLASS fuji_load_raw() -{ -#ifndef LIBRAW_LIBRARY_BUILD - ushort *pixel; - int wide, row, col, r, c; - - fseek (ifp, (top_margin*raw_width + left_margin) * 2, SEEK_CUR); - wide = fuji_width << !fuji_layout; - pixel = (ushort *) calloc (wide, sizeof *pixel); - merror (pixel, "fuji_load_raw()"); - for (row=0; row < raw_height; row++) { - read_shorts (pixel, wide); - fseek (ifp, 2*(raw_width - wide), SEEK_CUR); - for (col=0; col < wide; col++) { - if (fuji_layout) { - r = fuji_width - 1 - col + (row >> 1); - c = col + ((row+1) >> 1); - } else { - r = fuji_width - 1 + row - (col >> 1); - c = row + ((col+1) >> 1); - } - BAYER(r,c) = pixel[col]; - } - } - free (pixel); -#else - read_shorts(raw_image,raw_width*raw_height); -#endif -} -void CLASS ppm_thumb() -{ - char *thumb; - thumb_length = thumb_width*thumb_height*3; - thumb = (char *) malloc (thumb_length); - merror (thumb, "ppm_thumb()"); - fprintf (ofp, "P6\n%d %d\n255\n", thumb_width, thumb_height); - fread (thumb, 1, thumb_length, ifp); - fwrite (thumb, 1, thumb_length, ofp); - free (thumb); -} - -void CLASS layer_thumb() -{ - int i, c; - char *thumb, map[][4] = { "012","102" }; - - colors = thumb_misc >> 5 & 7; - thumb_length = thumb_width*thumb_height; - thumb = (char *) calloc (colors, thumb_length); - merror (thumb, "layer_thumb()"); - fprintf (ofp, "P%d\n%d %d\n255\n", - 5 + (colors >> 1), thumb_width, thumb_height); - fread (thumb, thumb_length, colors, ifp); - for (i=0; i < thumb_length; i++) - FORCC putc (thumb[i+thumb_length*(map[thumb_misc >> 8][c]-'0')], ofp); - free (thumb); -} - -void CLASS rollei_thumb() -{ - unsigned i; - ushort *thumb; - - thumb_length = thumb_width * thumb_height; - thumb = (ushort *) calloc (thumb_length, 2); - merror (thumb, "rollei_thumb()"); - fprintf (ofp, "P6\n%d %d\n255\n", thumb_width, thumb_height); - read_shorts (thumb, thumb_length); - for (i=0; i < thumb_length; i++) { - putc (thumb[i] << 3, ofp); - putc (thumb[i] >> 5 << 2, ofp); - putc (thumb[i] >> 11 << 3, ofp); - } - free (thumb); -} - -void CLASS rollei_load_raw() -{ - uchar pixel[10]; - unsigned iten=0, isix, i, buffer=0, row, col, todo[16]; - - isix = raw_width * raw_height * 5 / 8; - while (fread (pixel, 1, 10, ifp) == 10) { - for (i=0; i < 10; i+=2) { - todo[i] = iten++; - todo[i+1] = pixel[i] << 8 | pixel[i+1]; - buffer = pixel[i] >> 2 | buffer << 6; - } - for ( ; i < 16; i+=2) { - todo[i] = isix++; - todo[i+1] = buffer >> (14-i)*5; - } - for (i=0; i < 16; i+=2) { -#ifndef LIBRAW_LIBRARY_BUILD - row = todo[i] / raw_width - top_margin; - col = todo[i] % raw_width - left_margin; - if (row < height && col < width) - BAYER(row,col) = (todo[i+1] & 0x3ff); -#else - RBAYER(todo[i] / raw_width,todo[i] % raw_width) = (todo[i+1] & 0x3ff); -#endif - } - } - maximum = 0x3ff; -} - -int CLASS bayer (unsigned row, unsigned col) -{ - return (row < height && col < width) ? BAYER(row,col) : 0; -} - -void CLASS phase_one_flat_field (int is_float, int nc) -{ - ushort head[8]; - unsigned wide, y, x, c, rend, cend, row, col; - float *mrow, num, mult[4]; - - read_shorts (head, 8); - wide = head[2] / head[4]; - mrow = (float *) calloc (nc*wide, sizeof *mrow); - merror (mrow, "phase_one_flat_field()"); - for (y=0; y < head[3] / head[5]; y++) { - for (x=0; x < wide; x++) - for (c=0; c < nc; c+=2) { - num = is_float ? getreal(11) : get2()/32768.0; - if (y==0) mrow[c*wide+x] = num; - else mrow[(c+1)*wide+x] = (num - mrow[c*wide+x]) / head[5]; - } - if (y==0) continue; - rend = head[1]-top_margin + y*head[5]; - for (row = rend-head[5]; row < height && row < rend; row++) { - for (x=1; x < wide; x++) { - for (c=0; c < nc; c+=2) { - mult[c] = mrow[c*wide+x-1]; - mult[c+1] = (mrow[c*wide+x] - mult[c]) / head[4]; - } - cend = head[0]-left_margin + x*head[4]; - for (col = cend-head[4]; col < width && col < cend; col++) { - c = nc > 2 ? FC(row,col) : 0; - if (!(c & 1)) { - c = BAYER(row,col) * mult[c]; - BAYER(row,col) = LIM(c,0,65535); - } - for (c=0; c < nc; c+=2) - mult[c] += mult[c+1]; - } - } - for (x=0; x < wide; x++) - for (c=0; c < nc; c+=2) - mrow[c*wide+x] += mrow[(c+1)*wide+x]; - } - } - free (mrow); -} - -void CLASS phase_one_correct() -{ - unsigned entries, tag, data, save, col, row, type; - int len, i, j, k, cip, val[4], dev[4], sum, max; - int head[9], diff, mindiff=INT_MAX, off_412=0; - static const signed char dir[12][2] = - { {-1,-1}, {-1,1}, {1,-1}, {1,1}, {-2,0}, {0,-2}, {0,2}, {2,0}, - {-2,-2}, {-2,2}, {2,-2}, {2,2} }; - float poly[8], num, cfrac, frac, mult[2], *yval[2]; - ushort *xval[2]; - - if (half_size || !meta_length) return; -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("Phase One correction...\n")); -#endif - fseek (ifp, meta_offset, SEEK_SET); - order = get2(); - fseek (ifp, 6, SEEK_CUR); - fseek (ifp, meta_offset+get4(), SEEK_SET); - entries = get4(); get4(); - while (entries--) { - tag = get4(); - len = get4(); - data = get4(); - save = ftell(ifp); - fseek (ifp, meta_offset+data, SEEK_SET); - if (tag == 0x419) { /* Polynomial curve */ - for (get4(), i=0; i < 8; i++) - poly[i] = getreal(11); - poly[3] += (ph1.tag_210 - poly[7]) * poly[6] + 1; - for (i=0; i < 0x10000; i++) { - num = (poly[5]*i + poly[3])*i + poly[1]; - curve[i] = LIM(num,0,65535); - } goto apply; /* apply to right half */ - } else if (tag == 0x41a) { /* Polynomial curve */ - for (i=0; i < 4; i++) - poly[i] = getreal(11); - for (i=0; i < 0x10000; i++) { - for (num=0, j=4; j--; ) - num = num * i + poly[j]; - curve[i] = LIM(num+i,0,65535); - } apply: /* apply to whole image */ - for (row=0; row < height; row++) - for (col = (tag & 1)*ph1.split_col; col < width; col++) - BAYER(row,col) = curve[BAYER(row,col)]; - } else if (tag == 0x400) { /* Sensor defects */ - while ((len -= 8) >= 0) { - col = get2() - left_margin; - row = get2() - top_margin; - type = get2(); get2(); - if (col >= width) continue; - if (type == 131) /* Bad column */ - for (row=0; row < height; row++) - if (FC(row,col) == 1) { - for (sum=i=0; i < 4; i++) - sum += val[i] = bayer (row+dir[i][0], col+dir[i][1]); - for (max=i=0; i < 4; i++) { - dev[i] = abs((val[i] << 2) - sum); - if (dev[max] < dev[i]) max = i; - } - BAYER(row,col) = (sum - val[max])/3.0 + 0.5; - } else { - for (sum=0, i=8; i < 12; i++) - sum += bayer (row+dir[i][0], col+dir[i][1]); - BAYER(row,col) = 0.5 + sum * 0.0732233 + - (bayer(row,col-2) + bayer(row,col+2)) * 0.3535534; - } - else if (type == 129) { /* Bad pixel */ - if (row >= height) continue; - j = (FC(row,col) != 1) * 4; - for (sum=0, i=j; i < j+8; i++) - sum += bayer (row+dir[i][0], col+dir[i][1]); - BAYER(row,col) = (sum + 4) >> 3; - } - } - } else if (tag == 0x401) { /* All-color flat fields */ - phase_one_flat_field (1, 2); - } else if (tag == 0x416 || tag == 0x410) { - phase_one_flat_field (0, 2); - } else if (tag == 0x40b) { /* Red+blue flat field */ - phase_one_flat_field (0, 4); - } else if (tag == 0x412) { - fseek (ifp, 36, SEEK_CUR); - diff = abs (get2() - ph1.tag_21a); - if (mindiff > diff) { - mindiff = diff; - off_412 = ftell(ifp) - 38; - } - } - fseek (ifp, save, SEEK_SET); - } - if (off_412) { - fseek (ifp, off_412, SEEK_SET); - for (i=0; i < 9; i++) head[i] = get4() & 0x7fff; - yval[0] = (float *) calloc (head[1]*head[3] + head[2]*head[4], 6); - merror (yval[0], "phase_one_correct()"); - yval[1] = (float *) (yval[0] + head[1]*head[3]); - xval[0] = (ushort *) (yval[1] + head[2]*head[4]); - xval[1] = (ushort *) (xval[0] + head[1]*head[3]); - get2(); - for (i=0; i < 2; i++) - for (j=0; j < head[i+1]*head[i+3]; j++) - yval[i][j] = getreal(11); - for (i=0; i < 2; i++) - for (j=0; j < head[i+1]*head[i+3]; j++) - xval[i][j] = get2(); - for (row=0; row < height; row++) - for (col=0; col < width; col++) { - cfrac = (float) col * head[3] / raw_width; - cfrac -= cip = cfrac; - num = BAYER(row,col) * 0.5; - for (i=cip; i < cip+2; i++) { - for (k=j=0; j < head[1]; j++) - if (num < xval[0][k = head[1]*i+j]) break; - frac = (j == 0 || j == head[1]) ? 0 : - (xval[0][k] - num) / (xval[0][k] - xval[0][k-1]); - mult[i-cip] = yval[0][k-1] * frac + yval[0][k] * (1-frac); - } - i = ((mult[0] * (1-cfrac) + mult[1] * cfrac) - * (row + top_margin) + num) * 2; - BAYER(row,col) = LIM(i,0,65535); - } - free (yval[0]); - } -} - -void CLASS phase_one_load_raw() -{ - int row, col, a, b; - ushort *pixel, akey, bkey, mask; - - fseek (ifp, ph1.key_off, SEEK_SET); - akey = get2(); - bkey = get2(); - mask = ph1.format == 1 ? 0x5555:0x1354; -#ifndef LIBRAW_LIBRARY_BUILD - fseek (ifp, data_offset + top_margin*raw_width*2, SEEK_SET); - pixel = (ushort *) calloc (raw_width, sizeof *pixel); - merror (pixel, "phase_one_load_raw()"); - for (row=0; row < height; row++) { - read_shorts (pixel, raw_width); - if (ph1.format) - for (col=0; col < raw_width; col+=2) { - a = pixel[col+0] ^ akey; - b = pixel[col+1] ^ bkey; - pixel[col+0] = (a & mask) | (b & ~mask); - pixel[col+1] = (b & mask) | (a & ~mask); - } - for (col=0; col < width; col++) - BAYER(row,col) = pixel[col+left_margin]; - } - free (pixel); - phase_one_correct(); -#else - fseek (ifp, data_offset, SEEK_SET); - pixel = (ushort *) calloc (raw_width, sizeof *pixel); - merror (pixel, "phase_one_load_raw()"); - for (row=0; row < raw_height; row++) { - read_shorts (pixel, raw_width); - if (ph1.format) - for (col=0; col < raw_width; col+=2) { - a = pixel[col+0] ^ akey; - b = pixel[col+1] ^ bkey; - pixel[col+0] = (a & mask) | (b & ~mask); - pixel[col+1] = (b & mask) | (a & ~mask); - } - memmove(&raw_image[row*raw_width],pixel,raw_width*sizeof(pixel[0])); - } - free (pixel); - // use correct on postprocessing! - imgdata.rawdata.use_ph1_correct=1; -#endif -} - -unsigned CLASS ph1_bithuff (int nbits, ushort *huff) -{ -#ifndef LIBRAW_NOTHREADS -#define bitbuf tls->ph1_bits.bitbuf -#define vbits tls->ph1_bits.vbits -#else - static UINT64 bitbuf=0; - static int vbits=0; -#endif - unsigned c; - - if (nbits == -1) - return bitbuf = vbits = 0; - if (nbits == 0) return 0; - if (vbits < nbits) { - bitbuf = bitbuf << 32 | get4(); - vbits += 32; - } - c = bitbuf << (64-vbits) >> (64-nbits); - if (huff) { - vbits -= huff[c] >> 8; - return (uchar) huff[c]; - } - vbits -= nbits; - return c; -#ifndef LIBRAW_NOTHREADS -#undef bitbuf -#undef vbits -#endif -} -#define ph1_bits(n) ph1_bithuff(n,0) -#define ph1_huff(h) ph1_bithuff(*h,h+1) - -void CLASS phase_one_load_raw_c() -{ - static const int length[] = { 8,7,6,9,11,10,5,12,14,13 }; - int *offset, len[2], pred[2], row, col, i, j; - ushort *pixel; - short (*t_black)[2]; - - pixel = (ushort *) calloc (raw_width + raw_height*4, 2); - merror (pixel, "phase_one_load_raw_c()"); - offset = (int *) (pixel + raw_width); - fseek (ifp, strip_offset, SEEK_SET); - for (row=0; row < raw_height; row++) - offset[row] = get4(); - t_black = (short (*)[2]) offset + raw_height; - fseek (ifp, ph1.black_off, SEEK_SET); - if (ph1.black_off) - { - read_shorts ((ushort *) t_black[0], raw_height*2); -#ifdef LIBRAW_LIBRARY_BUILD - imgdata.rawdata.ph1_black = (short (*)[2])calloc(raw_height*2,sizeof(short)); - merror (imgdata.rawdata.ph1_black, "phase_one_load_raw_c()"); - memmove(imgdata.rawdata.ph1_black,(short *) t_black[0],raw_height*2*sizeof(short)); -#endif - } - for (i=0; i < 256; i++) - curve[i] = i*i / 3.969 + 0.5; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.curve_state = LIBRAW_COLORSTATE_CALCULATED; -#endif - for (row=0; row < raw_height; row++) { - fseek (ifp, data_offset + offset[row], SEEK_SET); - ph1_bits(-1); - pred[0] = pred[1] = 0; - for (col=0; col < raw_width; col++) { - if (col >= (raw_width & -8)) - len[0] = len[1] = 14; - else if ((col & 7) == 0) - for (i=0; i < 2; i++) { - for (j=0; j < 5 && !ph1_bits(1); j++); - if (j--) len[i] = length[j*2 + ph1_bits(1)]; - } - if ((i = len[col & 1]) == 14) - pixel[col] = pred[col & 1] = ph1_bits(16); - else - pixel[col] = pred[col & 1] += ph1_bits(i) + 1 - (1 << (i - 1)); - if (pred[col & 1] >> 16) derror(); - if (ph1.format == 5 && pixel[col] < 256) - pixel[col] = curve[pixel[col]]; - } -#ifndef LIBRAW_LIBRARY_BUILD - if ((unsigned) (row-top_margin) < height) - for (col=0; col < width; col++) { - i = (pixel[col+left_margin] << 2) - - ph1.t_black + t_black[row][col >= ph1.split_col]; - if (i > 0) BAYER(row-top_margin,col) = i; - } -#else - for (col=0; col < raw_width; col++) - { - i = (pixel[col] << 2); - RBAYER(row,col) = i; - } -#endif - } - free (pixel); -#ifndef LIBRAW_LIBRARY_BUILD - phase_one_correct(); - maximum = 0xfffc - ph1.t_black; -#else - maximum = 0xfffc; - black = ph1.t_black; -#endif -} - -void CLASS hasselblad_load_raw() -{ - struct jhead jh; - int row, col, pred[2], len[2], diff, c; - - if (!ljpeg_start (&jh, 0)) return; - order = 0x4949; - ph1_bits(-1); -#ifndef LIBRAW_LIBRARY_BUILD - for (row=-top_margin; row < height; row++) { - pred[0] = pred[1] = 0x8000 + load_flags; - for (col=-left_margin; col < raw_width-left_margin; col+=2) { - FORC(2) len[c] = ph1_huff(jh.huff[0]); - FORC(2) { - diff = ph1_bits(len[c]); - if ((diff & (1 << (len[c]-1))) == 0) - diff -= (1 << len[c]) - 1; - if (diff == 65535) diff = -32768; - pred[c] += diff; - if (row >= 0 && (unsigned)(col+c) < width) - BAYER(row,col+c) = pred[c]; - } - } - } -#else - for (row=0; row < raw_height; row++) { - pred[0] = pred[1] = 0x8000 + load_flags; - for (col=0; col < raw_width; col+=2) { - FORC(2) len[c] = ph1_huff(jh.huff[0]); - FORC(2) { - diff = ph1_bits(len[c]); - if ((diff & (1 << (len[c]-1))) == 0) - diff -= (1 << len[c]) - 1; - if (diff == 65535) diff = -32768; - pred[c] += diff; - RBAYER(row,col+c) = pred[c]; - } - } - } - -#endif - ljpeg_end (&jh); - maximum = 0xffff; -} - -void CLASS leaf_hdr_load_raw() -{ - ushort *pixel; - unsigned tile=0, r, c, row, col; - - pixel = (ushort *) calloc (raw_width, sizeof *pixel); - merror (pixel, "leaf_hdr_load_raw()"); - FORC(tiff_samples) - for (r=0; r < raw_height; r++) { - if (r % tile_length == 0) { - fseek (ifp, data_offset + 4*tile++, SEEK_SET); - fseek (ifp, get4() + 2*left_margin, SEEK_SET); - } - if (filters && c != shot_select) continue; - read_shorts (pixel, raw_width); -#ifndef LIBRAW_LIBRARY_BUILD - if ((row = r - top_margin) >= height) continue; - for (col=0; col < width; col++) - if (filters) BAYER(row,col) = pixel[col]; - else image[row*width+col][c] = pixel[col]; -#else - if(filters) - memmove(&raw_image[r*raw_width],pixel,raw_width*sizeof(pixel[0])); - else - for (col=0; col < raw_width; col++) - color_image[r*raw_width+col][c] = pixel[col]; -#endif - } - free (pixel); - if (!filters) { - maximum = 0xffff; - raw_color = 1; - } -} - -void CLASS sinar_4shot_load_raw() -{ - ushort *pixel; - unsigned shot, row, col, r, c; - - if ((shot = shot_select) || half_size) { - if (shot) shot--; - if (shot > 3) shot = 3; - fseek (ifp, data_offset + shot*4, SEEK_SET); - fseek (ifp, get4(), SEEK_SET); - unpacked_load_raw(); - return; - } - free (image); - image = (ushort (*)[4]) - calloc ((iheight=height)*(iwidth=width), sizeof *image); - merror (image, "sinar_4shot_load_raw()"); - pixel = (ushort *) calloc (raw_width, sizeof *pixel); - merror (pixel, "sinar_4shot_load_raw()"); - for (shot=0; shot < 4; shot++) { - fseek (ifp, data_offset + shot*4, SEEK_SET); - fseek (ifp, get4(), SEEK_SET); -#ifndef LIBRAW_LIBRARY_BUILD - for (row=0; row < raw_height; row++) { - read_shorts (pixel, raw_width); - if ((r = row-top_margin - (shot >> 1 & 1)) >= height) continue; - for (col=0; col < raw_width; col++) { - if ((c = col-left_margin - (shot & 1)) >= width) continue; - image[r*width+c][FC(row,col)] = pixel[col]; - } - } -#else - for (row=0; row < raw_height; row++) { - read_shorts (pixel, raw_width); - if ((r = row - (shot >> 1 & 1)) >= raw_height) continue; - for (col=0; col < raw_width; col++) { - if ((c = col- (shot & 1)) >= raw_width) continue; - color_image[r*width+c][FC(row,col)] = pixel[col]; - } - } -#endif - } - free (pixel); - shrink = filters = 0; -} - -void CLASS imacon_full_load_raw() -{ - int row, col; - -#ifndef LIBRAW_LIBRARY_BUILD - for (row=0; row < height; row++) - for (col=0; col < width; col++) - { - read_shorts (image[row*width+col], 3); - } -#else - for (row=0; row < height; row++) - for (col=0; col < width; col++) - { - read_shorts (color_image[(row+top_margin)*raw_width+col+left_margin], 3); - } -#endif -} - -void CLASS packed_load_raw() -{ - int vbits=0, bwide, pwide, rbits, bite, half, irow, row, col, val, i; - int zero=0; - UINT64 bitbuf=0; - - if (raw_width * 8 >= width * tiff_bps) /* Is raw_width in bytes? */ - pwide = (bwide = raw_width) * 8 / tiff_bps; - else bwide = (pwide = raw_width) * tiff_bps / 8; - rbits = bwide * 8 - pwide * tiff_bps; - if (load_flags & 1) bwide = bwide * 16 / 15; - fseek (ifp, top_margin*bwide, SEEK_CUR); - bite = 8 + (load_flags & 24); - half = (height+1) >> 1; - for (irow=0; irow < height; irow++) - { - row = irow; - if (load_flags & 2 && - (row = irow % half * 2 + irow / half) == 1 && - load_flags & 4) { - if (vbits=0, tiff_compress) - fseek (ifp, data_offset - (-half*bwide & -2048), SEEK_SET); - else { - fseek (ifp, 0, SEEK_END); - fseek (ifp, ftell(ifp) >> 3 << 2, SEEK_SET); - } - } - for (col=0; col < pwide; col++) { - for (vbits -= tiff_bps; vbits < 0; vbits += bite) { - bitbuf <<= bite; - for (i=0; i < bite; i+=8) - bitbuf |= (unsigned) (fgetc(ifp) << i); - } - val = bitbuf << (64-tiff_bps-vbits) >> (64-tiff_bps); - i = (col ^ (load_flags >> 6)) - left_margin; -#ifdef LIBRAW_LIBRARY_BUILD - RBAYER(row+top_margin,i+left_margin) = val; - if (((unsigned)i>=width) && (load_flags & 32) ) { - black += val; - zero += !val; - } -#else - if ((unsigned) i < width) - BAYER(row,i+left_margin) = val; - else if (load_flags & 32) { - black += val; - zero += !val; - } -#endif - if (load_flags & 1 && (col % 10) == 9 && - fgetc(ifp) && col < width+left_margin) derror(); - } - vbits -= rbits; - } - if (load_flags & 32 && pwide > width) - black /= (pwide - width) * height; - if (zero*4 > (pwide - width) * height) - black = 0; -} - -void CLASS unpacked_load_raw() -{ - ushort *pixel; - int row, col, bits=0; - - while (1 << ++bits < maximum); -#ifndef LIBRAW_LIBRARY_BUILD - fseek (ifp, (top_margin*raw_width + left_margin) * 2, SEEK_CUR); - pixel = (ushort *) calloc (width, sizeof *pixel); - merror (pixel, "unpacked_load_raw()"); - for (row=0; row < height; row++) { - read_shorts (pixel, width); - fseek (ifp, 2*(raw_width - width), SEEK_CUR); - for (col=0; col < width; col++) - if ((BAYER2(row,col) = pixel[col] >> load_flags) >> bits) derror(); - } - free (pixel); -#else - // fseek (ifp, (top_margin*raw_width + left_margin) * 2, SEEK_CUR); - pixel = (ushort *) calloc (raw_width, sizeof *pixel); - merror (pixel, "unpacked_load_raw()"); - for (row=0; row < raw_height; row++) { - read_shorts (pixel, raw_width); - for (col=0; col < raw_width; col++) - { - RBAYER(row,col) = pixel[col]>>load_flags; - if( ((unsigned)(row-top_margin) < height) - && ((unsigned)(col-left_margin)>bits) - derror(); - } - } - free (pixel); -#endif -} - -void CLASS nokia_load_raw() -{ - uchar *data, *dp; - ushort *pixel, *pix; - int rev, dwide, row, c; - - rev = 3 * (order == 0x4949); - dwide = raw_width * 5 / 4; - data = (uchar *) malloc (dwide + raw_width*2); - merror (data, "nokia_load_raw()"); - pixel = (ushort *) (data + dwide); - for (row=0; row < raw_height; row++) { - if (fread (data+dwide, 1, dwide, ifp) < dwide) derror(); - FORC(dwide) data[c] = data[dwide+(c ^ rev)]; - for (dp=data, pix=pixel; pix < pixel+raw_width; dp+=5, pix+=4) - FORC4 pix[c] = (dp[c] << 2) | (dp[4] >> (c << 1) & 3); - if (row < top_margin) - FORC(width) black += pixel[c]; -#ifndef LIBRAW_LIBRARY_BUILD - else - FORC(width) BAYER(row-top_margin,c) = pixel[c]; -#else - memmove(&raw_image[row*raw_width],pixel,width*sizeof(pixel[0])); -#endif - } - free (data); - if (top_margin) black /= top_margin * width; - maximum = 0x3ff; -} - -unsigned CLASS pana_bits (int nbits) -{ -#ifndef LIBRAW_NOTHREADS -#define buf tls->pana_bits.buf -#define vbits tls->pana_bits.vbits -#else - static uchar buf[0x4000]; - static int vbits; -#endif - int byte; - - if (!nbits) return vbits=0; - if (!vbits) { - fread (buf+load_flags, 1, 0x4000-load_flags, ifp); - fread (buf, 1, load_flags, ifp); - } - vbits = (vbits - nbits) & 0x1ffff; - byte = vbits >> 3 ^ 0x3ff0; - return (buf[byte] | buf[byte+1] << 8) >> (vbits & 7) & ~(-1 << nbits); -#ifndef LIBRAW_NOTHREADS -#undef buf -#undef vbits -#endif -} - -void CLASS panasonic_load_raw() -{ - int row, col, i, j, sh=0, pred[2], nonz[2]; - - pana_bits(0); - for (row=0; row < height; row++) - for (col=0; col < raw_width; col++) { - if ((i = col % 14) == 0) - pred[0] = pred[1] = nonz[0] = nonz[1] = 0; - if (i % 3 == 2) sh = 4 >> (3 - pana_bits(2)); - if (nonz[i & 1]) { - if ((j = pana_bits(8))) { - if ((pred[i & 1] -= 0x80 << sh) < 0 || sh == 4) - pred[i & 1] &= ~(-1 << sh); - pred[i & 1] += j << sh; - } - } else if ((nonz[i & 1] = pana_bits(8)) || i > 11) - pred[i & 1] = nonz[i & 1] << 4 | pana_bits(4); -#ifndef LIBRAW_LIBRARY_BUILD - if (col < width) - if ((BAYER(row,col) = pred[col & 1]) > 4098) derror(); -#else - RBAYER(row,col) = pred[col & 1]; - if (col < width) - if (RBAYER(row,col) > 4098) derror(); -#endif - } -} - - -void CLASS olympus_load_raw() -{ - ushort huff[4096]; - int row, col, nbits, sign, low, high, i, c, w, n, nw; - int acarry[2][3], *carry, pred, diff; - - huff[n=0] = 0xc0c; - for (i=12; i--; ) - FORC(2048 >> i) huff[++n] = (i+1) << 8 | i; - fseek (ifp, 7, SEEK_CUR); -#ifdef LIBRAW_LIBRARY_BUILD - if(!data_size) - throw LIBRAW_EXCEPTION_IO_BADFILE; - LibRaw_byte_buffer *buf = ifp->make_byte_buffer(data_size); - LibRaw_bit_buffer bits; - bits.reset(); -#else - getbits(-1); -#endif - for (row=0; row < height; row++) { - memset (acarry, 0, sizeof acarry); - for (col=0; col < raw_width; col++) { - carry = acarry[col & 1]; - i = 2 * (carry[2] < 3); - for (nbits=2+i; (ushort) carry[0] >> (nbits+i); nbits++); -#ifdef LIBRAW_LIBRARY_BUILD - low = (sign = bits._getbits(buf,3,zero_after_ff)) & 3; - sign = sign << 29 >> 31; - if ((high = bits._gethuff(buf,12,huff,zero_after_ff)) == 12) - high = bits._getbits(buf,16-nbits,zero_after_ff) >> 1; - carry[0] = (high << nbits) | bits._getbits(buf,nbits,zero_after_ff); -#else - low = (sign = getbits(3)) & 3; - sign = sign << 29 >> 31; - if ((high = getbithuff(12,huff)) == 12) - high = getbits(16-nbits) >> 1; - carry[0] = (high << nbits) | getbits(nbits); -#endif - diff = (carry[0] ^ sign) + carry[1]; - carry[1] = (diff*3 + carry[1]) >> 5; - carry[2] = carry[0] > 16 ? 0 : carry[2]+1; - if (col >= width) continue; - if (row < 2 && col < 2) pred = 0; - else if (row < 2) pred = RBAYER(row,col-2); - else if (col < 2) pred = RBAYER(row-2,col); - else { - w = RBAYER(row,col-2); - n = RBAYER(row-2,col); - nw = RBAYER(row-2,col-2); - if ((w < nw && nw < n) || (n < nw && nw < w)) { - if (ABS(w-nw) > 32 || ABS(n-nw) > 32) - pred = w + n - nw; - else pred = (w + n) >> 1; - } else pred = ABS(w-nw) > ABS(n-nw) ? w : n; - } - if ((RBAYER(row,col) = pred + ((diff << 2) | low)) >> 12) derror(); - } - } -#ifdef LIBRAW_LIBRARY_BUILD - delete buf; -#endif -} - - -void CLASS minolta_rd175_load_raw() -{ - uchar pixel[768]; - unsigned irow, box, row, col; - - for (irow=0; irow < 1481; irow++) { - if (fread (pixel, 1, 768, ifp) < 768) derror(); - box = irow / 82; - row = irow % 82 * 12 + ((box < 12) ? box | 1 : (box-12)*2); - switch (irow) { - case 1477: case 1479: continue; - case 1476: row = 984; break; - case 1480: row = 985; break; - case 1478: row = 985; box = 1; - } - if ((box < 12) && (box & 1)) { - for (col=0; col < 1533; col++, row ^= 1) - if (col != 1) RRBAYER(row,col) = (col+1) & 2 ? - pixel[col/2-1] + pixel[col/2+1] : pixel[col/2] << 1; - RRBAYER(row,1) = pixel[1] << 1; - RRBAYER(row,1533) = pixel[765] << 1; - } else - for (col=row & 1; col < 1534; col+=2) - RRBAYER(row,col) = pixel[col/2] << 1; - } - maximum = 0xff << 1; -} - -void CLASS quicktake_100_load_raw() -{ - uchar pixel[484][644]; - static const short gstep[16] = - { -89,-60,-44,-32,-22,-15,-8,-2,2,8,15,22,32,44,60,89 }; - static const short rstep[6][4] = - { { -3,-1,1,3 }, { -5,-1,1,5 }, { -8,-2,2,8 }, - { -13,-3,3,13 }, { -19,-4,4,19 }, { -28,-6,6,28 } }; - static const short t_curve[256] = - { 0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27, - 28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53, - 54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,74,75,76,77,78, - 79,80,81,82,83,84,86,88,90,92,94,97,99,101,103,105,107,110,112,114,116, - 118,120,123,125,127,129,131,134,136,138,140,142,144,147,149,151,153,155, - 158,160,162,164,166,168,171,173,175,177,179,181,184,186,188,190,192,195, - 197,199,201,203,205,208,210,212,214,216,218,221,223,226,230,235,239,244, - 248,252,257,261,265,270,274,278,283,287,291,296,300,305,309,313,318,322, - 326,331,335,339,344,348,352,357,361,365,370,374,379,383,387,392,396,400, - 405,409,413,418,422,426,431,435,440,444,448,453,457,461,466,470,474,479, - 483,487,492,496,500,508,519,531,542,553,564,575,587,598,609,620,631,643, - 654,665,676,687,698,710,721,732,743,754,766,777,788,799,810,822,833,844, - 855,866,878,889,900,911,922,933,945,956,967,978,989,1001,1012,1023 }; - int rb, row, col, sharp, val=0; - - getbits(-1); - memset (pixel, 0x80, sizeof pixel); - for (row=2; row < height+2; row++) { - for (col=2+(row & 1); col < width+2; col+=2) { - val = ((pixel[row-1][col-1] + 2*pixel[row-1][col+1] + - pixel[row][col-2]) >> 2) + gstep[getbits(4)]; - pixel[row][col] = val = LIM(val,0,255); - if (col < 4) - pixel[row][col-2] = pixel[row+1][~row & 1] = val; - if (row == 2) - pixel[row-1][col+1] = pixel[row-1][col+3] = val; - } - pixel[row][col] = val; - } - for (rb=0; rb < 2; rb++) - for (row=2+rb; row < height+2; row+=2) - for (col=3-(row & 1); col < width+2; col+=2) { - if (row < 4 || col < 4) sharp = 2; - else { - val = ABS(pixel[row-2][col] - pixel[row][col-2]) - + ABS(pixel[row-2][col] - pixel[row-2][col-2]) - + ABS(pixel[row][col-2] - pixel[row-2][col-2]); - sharp = val < 4 ? 0 : val < 8 ? 1 : val < 16 ? 2 : - val < 32 ? 3 : val < 48 ? 4 : 5; - } - val = ((pixel[row-2][col] + pixel[row][col-2]) >> 1) - + rstep[sharp][getbits(2)]; - pixel[row][col] = val = LIM(val,0,255); - if (row < 4) pixel[row-2][col+2] = val; - if (col < 4) pixel[row+2][col-2] = val; - } - for (row=2; row < height+2; row++) - for (col=3-(row & 1); col < width+2; col+=2) { - val = ((pixel[row][col-1] + (pixel[row][col] << 2) + - pixel[row][col+1]) >> 1) - 0x100; - pixel[row][col] = LIM(val,0,255); - } - for (row=0; row < height; row++) - for (col=0; col < width; col++) - RBAYER(row,col) = t_curve[pixel[row+2][col+2]]; - maximum = 0x3ff; -} - -#define radc_token(tree) ((signed char) getbithuff(8,huff[tree])) - -#define FORYX for (y=1; y < 3; y++) for (x=col+1; x >= col; x--) - -#define PREDICTOR (c ? (buf[c][y-1][x] + buf[c][y][x+1]) / 2 \ -: (buf[c][y-1][x+1] + 2*buf[c][y-1][x] + buf[c][y][x+1]) / 4) - -void CLASS kodak_radc_load_raw() -{ - static const char src[] = { - 1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8, - 1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8, - 2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8, - 2,0, 2,1, 2,3, 3,2, 4,4, 5,6, 6,7, 7,5, 7,8, - 2,1, 2,4, 3,0, 3,2, 3,3, 4,7, 5,5, 6,6, 6,8, - 2,3, 3,1, 3,2, 3,4, 3,5, 3,6, 4,7, 5,0, 5,8, - 2,3, 2,6, 3,0, 3,1, 4,4, 4,5, 4,7, 5,2, 5,8, - 2,4, 2,7, 3,3, 3,6, 4,1, 4,2, 4,5, 5,0, 5,8, - 2,6, 3,1, 3,3, 3,5, 3,7, 3,8, 4,0, 5,2, 5,4, - 2,0, 2,1, 3,2, 3,3, 4,4, 4,5, 5,6, 5,7, 4,8, - 1,0, 2,2, 2,-2, - 1,-3, 1,3, - 2,-17, 2,-5, 2,5, 2,17, - 2,-7, 2,2, 2,9, 2,18, - 2,-18, 2,-9, 2,-2, 2,7, - 2,-28, 2,28, 3,-49, 3,-9, 3,9, 4,49, 5,-79, 5,79, - 2,-1, 2,13, 2,26, 3,39, 4,-16, 5,55, 6,-37, 6,76, - 2,-26, 2,-13, 2,1, 3,-39, 4,16, 5,-55, 6,-76, 6,37 - }; - ushort huff[19][256]; - int row, col, tree, nreps, rep, step, i, c, s, r, x, y, val; - short last[3] = { 16,16,16 }, mul[3], buf[3][3][386]; - static const ushort pt[] = - { 0,0, 1280,1344, 2320,3616, 3328,8000, 4095,16383, 65535,16383 }; - - for (i=2; i < 12; i+=2) - for (c=pt[i-2]; c <= pt[i]; c++) - curve[c] = (float) - (c-pt[i-2]) / (pt[i]-pt[i-2]) * (pt[i+1]-pt[i-1]) + pt[i-1] + 0.5; - for (s=i=0; i < sizeof src; i+=2) - FORC(256 >> src[i]) - huff[0][s++] = src[i] << 8 | (uchar) src[i+1]; - s = kodak_cbpp == 243 ? 2 : 3; - FORC(256) huff[18][c] = (8-s) << 8 | c >> s << s | 1 << (s-1); - getbits(-1); - for (i=0; i < sizeof(buf)/sizeof(short); i++) - buf[0][0][i] = 2048; - for (row=0; row < height; row+=4) { - FORC3 mul[c] = getbits(6); - FORC3 { - val = ((0x1000000/last[c] + 0x7ff) >> 12) * mul[c]; - s = val > 65564 ? 10:12; - x = ~(-1 << (s-1)); - val <<= 12-s; - for (i=0; i < sizeof(buf[0])/sizeof(short); i++) - buf[c][0][i] = (buf[c][0][i] * val + x) >> s; - last[c] = mul[c]; - for (r=0; r <= !c; r++) { - buf[c][1][width/2] = buf[c][2][width/2] = mul[c] << 7; - for (tree=1, col=width/2; col > 0; ) { - if ((tree = radc_token(tree))) { - col -= 2; - if (tree == 8) - FORYX buf[c][y][x] = (uchar) radc_token(18) * mul[c]; - else - FORYX buf[c][y][x] = radc_token(tree+10) * 16 + PREDICTOR; - } else - do { - nreps = (col > 2) ? radc_token(9) + 1 : 1; - for (rep=0; rep < 8 && rep < nreps && col > 0; rep++) { - col -= 2; - FORYX buf[c][y][x] = PREDICTOR; - if (rep & 1) { - step = radc_token(10) << 4; - FORYX buf[c][y][x] += step; - } - } - } while (nreps == 9); - } - for (y=0; y < 2; y++) - for (x=0; x < width/2; x++) { - val = (buf[c][y+1][x] << 4) / mul[c]; - if (val < 0) val = 0; - if (c) CBAYER(row+y*2+c-1,x*2+2-c) = val; - else CBAYER(row+r*2+y,x*2+y) = val; - } - memcpy (buf[c][0]+!c, buf[c][2], sizeof buf[c][0]-2*!c); - } - } - for (y=row; y < row+4; y++) - for (x=0; x < width; x++) - if ((x+y) & 1) { - r = x ? x-1 : x+1; - s = x+1 < width ? x+1 : x-1; - val = (CBAYER(y,x)-2048)*2 + (CBAYER(y,r)+CBAYER(y,s))/2; - if (val < 0) val = 0; - CBAYER(y,x) = val; - } - } -#ifndef LIBRAW_LIBRARY_BUILD - for (i=0; i < iheight*iwidth*4; i++) - image[0][i] = curve[image[0][i]]; -#else - for (i=0; i < height*width*4; i++) - color_image[0][i] = curve[color_image[0][i]]; -#endif - maximum = 0x3fff; -} - -#undef FORYX -#undef PREDICTOR - -#ifdef NO_JPEG -void CLASS kodak_jpeg_load_raw() {} -#else - -METHODDEF(boolean) -fill_input_buffer (j_decompress_ptr cinfo) -{ -#ifndef LIBRAW_NOTHREADS -#define jpeg_buffer tls->jpeg_buffer -#else - static uchar jpeg_buffer[4096]; -#endif - size_t nbytes; - - nbytes = fread (jpeg_buffer, 1, 4096, ifp); - swab (jpeg_buffer, jpeg_buffer, nbytes); - cinfo->src->next_input_byte = jpeg_buffer; - cinfo->src->bytes_in_buffer = nbytes; - return TRUE; -#ifndef LIBRAW_NOTHREADS -#undef jpeg_buffer -#endif -} - -void CLASS kodak_jpeg_load_raw() -{ - struct jpeg_decompress_struct cinfo; - struct jpeg_error_mgr jerr; - JSAMPARRAY buf; - JSAMPLE (*pixel)[3]; - int row, col; - - cinfo.err = jpeg_std_error (&jerr); - jpeg_create_decompress (&cinfo); - jpeg_stdio_src (&cinfo, ifp); - cinfo.src->fill_input_buffer = fill_input_buffer; - jpeg_read_header (&cinfo, TRUE); - jpeg_start_decompress (&cinfo); - if ((cinfo.output_width != width ) || - (cinfo.output_height*2 != height ) || - (cinfo.output_components != 3 )) { -#ifdef DCRAW_VERBOSE - fprintf (stderr,_("%s: incorrect JPEG dimensions\n"), ifname); -#endif - jpeg_destroy_decompress (&cinfo); -#ifdef LIBRAW_LIBRARY_BUILD - throw LIBRAW_EXCEPTION_DECODE_JPEG; -#else - longjmp (failure, 3); -#endif - } - buf = (*cinfo.mem->alloc_sarray) - ((j_common_ptr) &cinfo, JPOOL_IMAGE, width*3, 1); - - while (cinfo.output_scanline < cinfo.output_height) { - row = cinfo.output_scanline * 2; - jpeg_read_scanlines (&cinfo, buf, 1); - pixel = (JSAMPLE (*)[3]) buf[0]; - for (col=0; col < width; col+=2) { - RBAYER(row+0,col+0) = pixel[col+0][1] << 1; - RBAYER(row+1,col+1) = pixel[col+1][1] << 1; - RBAYER(row+0,col+1) = pixel[col][0] + pixel[col+1][0]; - RBAYER(row+1,col+0) = pixel[col][2] + pixel[col+1][2]; - } - } - jpeg_finish_decompress (&cinfo); - jpeg_destroy_decompress (&cinfo); - maximum = 0xff << 1; -} -#endif - -void CLASS kodak_dc120_load_raw() -{ - static const int mul[4] = { 162, 192, 187, 92 }; - static const int add[4] = { 0, 636, 424, 212 }; - uchar pixel[848]; - int row, shift, col; - - for (row=0; row < height; row++) { - if (fread (pixel, 1, 848, ifp) < 848) derror(); - shift = row * mul[row & 3] + add[row & 3]; - for (col=0; col < width; col++) - RBAYER(row,col) = (ushort) pixel[(col + shift) % 848]; - } - maximum = 0xff; -} - -void CLASS eight_bit_load_raw() -{ - uchar *pixel; - unsigned row, col, val, lblack=0; - - pixel = (uchar *) calloc (raw_width, sizeof *pixel); - merror (pixel, "eight_bit_load_raw()"); -#ifndef LIBRAW_LIBRARY_BUILD - fseek (ifp, top_margin*raw_width, SEEK_CUR); - for (row=0; row < height; row++) { - if (fread (pixel, 1, raw_width, ifp) < raw_width) derror(); - for (col=0; col < raw_width; col++) { - val = curve[pixel[col]]; - if ((unsigned) (col-left_margin) < width) - BAYER(row,col-left_margin) = val; - else lblack += val; - } - } -#else - for (row=0; row < raw_height; row++) { - if (fread (pixel, 1, raw_width, ifp) < raw_width) derror(); - for (col=0; col < raw_width; col++) { - val = curve[pixel[col]]; - RBAYER(row,col) = val; - if((unsigned) (row-top_margin)< height) - if ((unsigned) (col-left_margin) >= width) - lblack+=val; - } - } -#endif - - free (pixel); - if (raw_width > width+1) - black = lblack / ((raw_width - width) * height); - if (!strncmp(model,"DC2",3)) - black = 0; - maximum = curve[0xff]; -} - -void CLASS kodak_yrgb_load_raw() -{ - uchar *pixel; - int row, col, y, cb, cr, rgb[3], c; - - pixel = (uchar *) calloc (raw_width, 3*sizeof *pixel); - merror (pixel, "kodak_yrgb_load_raw()"); - for (row=0; row < height; row++) { - if (~row & 1) - if (fread (pixel, raw_width, 3, ifp) < 3) derror(); - for (col=0; col < raw_width; col++) { - y = pixel[width*2*(row & 1) + col]; - cb = pixel[width + (col & -2)] - 128; - cr = pixel[width + (col & -2)+1] - 128; - rgb[1] = y-((cb + cr + 2) >> 2); - rgb[2] = rgb[1] + cb; - rgb[0] = rgb[1] + cr; - FORC3{ -#ifndef LIBRAW_LIBRARY_BUILD - image[row*width+col][c] = curve[LIM(rgb[c],0,255)]; -#else - color_image[(row+top_margin)*raw_width+col+left_margin][c] = curve[LIM(rgb[c],0,255)]; -#endif - } - } - } - free (pixel); - maximum = curve[0xff]; -} - -void CLASS kodak_262_load_raw() -{ - static const uchar kodak_tree[2][26] = - { { 0,1,5,1,1,2,0,0,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9 }, - { 0,3,1,1,1,1,1,2,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9 } }; - ushort *huff[2]; - uchar *pixel; - int *strip, ns, c, row, col, chess, pi=0, pi1, pi2, pred, val; - - FORC(2) huff[c] = make_decoder (kodak_tree[c]); - ns = (raw_height+63) >> 5; - pixel = (uchar *) malloc (raw_width*32 + ns*4); - merror (pixel, "kodak_262_load_raw()"); - strip = (int *) (pixel + raw_width*32); - order = 0x4d4d; - FORC(ns) strip[c] = get4(); - for (row=0; row < raw_height; row++) { - if ((row & 31) == 0) { - fseek (ifp, strip[row >> 5], SEEK_SET); - getbits(-1); - pi = 0; - } - for (col=0; col < raw_width; col++) { - chess = (row + col) & 1; - pi1 = chess ? pi-2 : pi-raw_width-1; - pi2 = chess ? pi-2*raw_width : pi-raw_width+1; - if (col <= chess) pi1 = -1; - if (pi1 < 0) pi1 = pi2; - if (pi2 < 0) pi2 = pi1; - if (pi1 < 0 && col > 1) pi1 = pi2 = pi-2; - pred = (pi1 < 0) ? 0 : (pixel[pi1] + pixel[pi2]) >> 1; - pixel[pi] = val = pred + ljpeg_diff (huff[chess]); - if (val >> 8) derror(); - - val = curve[pixel[pi++]]; - -#ifdef LIBRAW_LIBRARY_BUILD - RBAYER(row,col) = val; - if ((unsigned) (col-left_margin) >= width) - black+=val; -#else - if ((unsigned) (col-left_margin) < width) - BAYER(row,col-left_margin) = val; - else black += val; -#endif - } - } - free (pixel); - FORC(2) free (huff[c]); - if (raw_width > width) - black /= (raw_width - width) * height; -} - -int CLASS kodak_65000_decode (short *out, int bsize) -{ - uchar c, blen[768]; - ushort raw[6]; - INT64 bitbuf=0; - int save, bits=0, i, j, len, diff; - - save = ftell(ifp); - bsize = (bsize + 3) & -4; - for (i=0; i < bsize; i+=2) { - c = fgetc(ifp); - if ((blen[i ] = c & 15) > 12 || - (blen[i+1] = c >> 4) > 12 ) { - fseek (ifp, save, SEEK_SET); - for (i=0; i < bsize; i+=8) { - read_shorts (raw, 6); - out[i ] = raw[0] >> 12 << 8 | raw[2] >> 12 << 4 | raw[4] >> 12; - out[i+1] = raw[1] >> 12 << 8 | raw[3] >> 12 << 4 | raw[5] >> 12; - for (j=0; j < 6; j++) - out[i+2+j] = raw[j] & 0xfff; - } - return 1; - } - } - if ((bsize & 7) == 4) { - bitbuf = fgetc(ifp) << 8; - bitbuf += fgetc(ifp); - bits = 16; - } - for (i=0; i < bsize; i++) { - len = blen[i]; - if (bits < len) { - for (j=0; j < 32; j+=8) - bitbuf += (INT64) fgetc(ifp) << (bits+(j^8)); - bits += 32; - } - diff = bitbuf & (0xffff >> (16-len)); - bitbuf >>= len; - bits -= len; - if ((diff & (1 << (len-1))) == 0) - diff -= (1 << len) - 1; - out[i] = diff; - } - return 0; -} - -void CLASS kodak_65000_load_raw() -{ - short buf[256]; - int row, col, len, pred[2], ret, i; - - for (row=0; row < height; row++) - for (col=0; col < width; col+=256) { - pred[0] = pred[1] = 0; - len = MIN (256, width-col); - ret = kodak_65000_decode (buf, len); - for (i=0; i < len; i++) -#ifndef LIBRAW_LIBRARY_BUILD - if ((BAYER(row,col+i) = curve[ret ? buf[i] : - (pred[i & 1] += buf[i])]) >> 12) derror(); -#else - { - ushort val = ret ? buf[i] : (pred[i & 1] += buf[i]); - val = curve[val]; - RBAYER(row,col+i) = val; - if(curve[val]>>12) derror(); - } -#endif - } -} - -void CLASS kodak_ycbcr_load_raw() -{ - short buf[384], *bp; - int row, col, len, c, i, j, k, y[2][2], cb, cr, rgb[3]; - ushort *ip; - - for (row=0; row < height; row+=2) - for (col=0; col < width; col+=128) { - len = MIN (128, width-col); - kodak_65000_decode (buf, len*3); - y[0][1] = y[1][1] = cb = cr = 0; - for (bp=buf, i=0; i < len; i+=2, bp+=2) { - cb += bp[4]; - cr += bp[5]; - rgb[1] = -((cb + cr + 2) >> 2); - rgb[2] = rgb[1] + cb; - rgb[0] = rgb[1] + cr; - for (j=0; j < 2; j++) - for (k=0; k < 2; k++) { - if ((y[j][k] = y[j][k^1] + *bp++) >> 10) derror(); -#ifndef LIBRAW_LIBRARY_BUILD - ip = image[(row+j)*width + col+i+k]; - FORC3 ip[c] = curve[LIM(y[j][k]+rgb[c], 0, 0xfff)]; -#else - ip = color_image[(row+top_margin+j)*raw_width + col+i+k+left_margin]; - FORC3 ip[c] = curve[LIM(y[j][k]+rgb[c], 0, 0xfff)]; -#endif - } - } - } -} - -void CLASS kodak_rgb_load_raw() -{ - short buf[768], *bp; - int row, col, len, c, i, rgb[3]; -#ifndef LIBRAW_LIBRARY_BUILD - ushort *ip=image[0]; -#else - ushort *ip; -#endif - - for (row=0; row < height; row++) - for (col=0; col < width; col+=256) { - len = MIN (256, width-col); - kodak_65000_decode (buf, len*3); - memset (rgb, 0, sizeof rgb); -#ifdef LIBRAW_LIBRARY_BUILD - ip = &color_image[(row+top_margin)*raw_width+left_margin][0]; -#endif - for (bp=buf, i=0; i < len; i++, ip+=4) - FORC3{ - if ((ip[c] = rgb[c] += *bp++) >> 12) derror(); - } - } -} - -void CLASS kodak_ycbcr_load_thumb() -{ - short buf[384], *bp; - int row, col, len, c, i, j, k, y[2][2], cb, cr, rgb[3]; - ushort *ip; - - for (row=0; row < height; row+=2) - for (col=0; col < width; col+=128) { - len = MIN (128, width-col); - kodak_65000_decode (buf, len*3); - y[0][1] = y[1][1] = cb = cr = 0; - for (bp=buf, i=0; i < len; i+=2, bp+=2) { - cb += bp[4]; - cr += bp[5]; - rgb[1] = -((cb + cr + 2) >> 2); - rgb[2] = rgb[1] + cb; - rgb[0] = rgb[1] + cr; - for (j=0; j < 2; j++) - for (k=0; k < 2; k++) { - if ((y[j][k] = y[j][k^1] + *bp++) >> 10) derror(); - ip = image[(row+j)*width + col+i+k]; - FORC3 ip[c] = curve[LIM(y[j][k]+rgb[c], 0, 0xfff)]; - } - } - } -} - -void CLASS kodak_rgb_load_thumb() -{ - short buf[768], *bp; - int row, col, len, c, i, rgb[3]; - ushort *ip=image[0]; - - for (row=0; row < height; row++) - for (col=0; col < width; col+=256) { - len = MIN (256, width-col); - kodak_65000_decode (buf, len*3); - memset (rgb, 0, sizeof rgb); - for (bp=buf, i=0; i < len; i++, ip+=4) - FORC3 if ((ip[c] = rgb[c] += *bp++) >> 12) derror(); - } -} - -void CLASS kodak_thumb_load_raw() -{ - int row, col; - colors = thumb_misc >> 5; - for (row=0; row < height; row++) - for (col=0; col < width; col++) - read_shorts (image[row*width+col], colors); - maximum = (1 << (thumb_misc & 31)) - 1; -} - -void CLASS sony_decrypt (unsigned *data, int len, int start, int key) -{ -#ifndef LIBRAW_NOTHREADS -#define pad tls->sony_decrypt.pad -#define p tls->sony_decrypt.p -#else - static unsigned pad[128], p; -#endif - - if (start) { - for (p=0; p < 4; p++) - pad[p] = key = key * 48828125 + 1; - pad[3] = pad[3] << 1 | (pad[0]^pad[2]) >> 31; - for (p=4; p < 127; p++) - pad[p] = (pad[p-4]^pad[p-2]) << 1 | (pad[p-3]^pad[p-1]) >> 31; - for (p=0; p < 127; p++) - pad[p] = htonl(pad[p]); - } - while (len--) - *data++ ^= pad[p++ & 127] = pad[(p+1) & 127] ^ pad[(p+65) & 127]; -#ifndef LIBRAW_NOTHREADS -#undef pad -#undef p -#endif -} - -void CLASS sony_load_raw() -{ - uchar head[40]; - ushort *pixel; - unsigned i, key, row, col; - - fseek (ifp, 200896, SEEK_SET); - fseek (ifp, (unsigned) fgetc(ifp)*4 - 1, SEEK_CUR); - order = 0x4d4d; - key = get4(); - fseek (ifp, 164600, SEEK_SET); - fread (head, 1, 40, ifp); - sony_decrypt ((unsigned int *) head, 10, 1, key); - for (i=26; i-- > 22; ) - key = key << 8 | head[i]; - fseek (ifp, data_offset, SEEK_SET); - pixel = (ushort *) calloc (raw_width, sizeof *pixel); - merror (pixel, "sony_load_raw()"); - for (row=0; row < height; row++) { - if (fread (pixel, 2, raw_width, ifp) < raw_width) derror(); - sony_decrypt ((unsigned int *) pixel, raw_width/2, !row, key); - for (col=9; col < left_margin; col++) - black += ntohs(pixel[col]); -#ifndef LIBRAW_LIBRARY_BUILD - for (col=0; col < width; col++) - if ((BAYER(row,col) = ntohs(pixel[col+left_margin])) >> 14) - derror(); -#else - for (col=0; col < raw_width; col++) - { - RBAYER(row,col) = ntohs(pixel[col]); - if(col >= left_margin && col < width+left_margin - && (RBAYER(row,col)>>14)) - derror(); - } -#endif - } - free (pixel); - if (left_margin > 9) - black /= (left_margin-9) * height; - maximum = 0x3ff0; -} - -void CLASS sony_arw_load_raw() -{ - ushort huff[32768]; - static const ushort tab[18] = - { 0xf11,0xf10,0xe0f,0xd0e,0xc0d,0xb0c,0xa0b,0x90a,0x809, - 0x708,0x607,0x506,0x405,0x304,0x303,0x300,0x202,0x201 }; - int i, c, n, col, row, len, diff, sum=0; - - for (n=i=0; i < 18; i++) - FORC(32768 >> (tab[i] >> 8)) huff[n++] = tab[i]; -#ifdef LIBRAW_LIBRARY_BUILD - LibRaw_byte_buffer *buf=NULL; - if(data_size) - buf = ifp->make_byte_buffer(data_size); - else - getbits(-1); - - LibRaw_bit_buffer bits; - bits.reset(); -#else - getbits(-1); -#endif - for (col = raw_width; col--; ) - for (row=0; row < raw_height+1; row+=2) { - if (row == raw_height) row = 1; -#ifdef LIBRAW_LIBRARY_BUILD - if(data_size) - { - len = bits._gethuff(buf,15,huff,zero_after_ff); - diff = bits._getbits(buf,len,zero_after_ff); - } - else - { - len = getbithuff(15,huff); - diff = getbits(len); - } -#else - len = getbithuff(15,huff); - diff = getbits(len); -#endif - if ((diff & (1 << (len-1))) == 0) - diff -= (1 << len) - 1; - if ((sum += diff) >> 12) derror(); -#ifndef LIBRAW_LIBRARY_BUILD - if (row < height) - { - BAYER(row,col) = sum; - } -#else - RBAYER(row,col) = sum; -#endif - } -#ifdef LIBRAW_LIBRARY_BUILD - if(buf) delete buf; -#endif -} - -void CLASS sony_arw2_load_raw() -{ - uchar *data, *dp; - ushort pix[16]; - int row, col, val, max, min, imax, imin, sh, bit, i; - - data = (uchar *) malloc (raw_width+4); - merror (data, "sony_arw2_load_raw()"); - for (row=0; row < height; row++) { - fread (data, 1, raw_width, ifp); - for (dp=data, col=0; col < raw_width-30; dp+=16) { - max = 0x7ff & (val = sget4(dp)); - min = 0x7ff & val >> 11; - imax = 0x0f & val >> 22; - imin = 0x0f & val >> 26; - for (sh=0; sh < 4 && 0x80 << sh <= max-min; sh++); - for (bit=30, i=0; i < 16; i++) - if (i == imax) pix[i] = max; - else if (i == imin) pix[i] = min; - else { - pix[i] = ((sget2(dp+(bit >> 3)) >> (bit & 7) & 0x7f) << sh) + min; - if (pix[i] > 0x7ff) pix[i] = 0x7ff; - bit += 7; - } - for (i=0; i < 16; i++, col+=2) -#ifdef LIBRAW_LIBRARY_BUILD - RBAYER(row,col) = curve[pix[i] << 1] >> 2; -#else - if (col < width) BAYER(row,col) = curve[pix[i] << 1] >> 2; -#endif - col -= col & 1 ? 1:31; - } - } - free (data); -} - -#define HOLE(row) ((holes >> (((row) - raw_height) & 7)) & 1) - -/* Kudos to Rich Taylor for figuring out SMaL's compression algorithm. */ -void CLASS smal_decode_segment (unsigned seg[2][2], int holes) -{ - uchar hist[3][13] = { - { 7, 7, 0, 0, 63, 55, 47, 39, 31, 23, 15, 7, 0 }, - { 7, 7, 0, 0, 63, 55, 47, 39, 31, 23, 15, 7, 0 }, - { 3, 3, 0, 0, 63, 47, 31, 15, 0 } }; - int low, high=0xff, carry=0, nbits=8; - int s, count, bin, next, i, sym[3]; - uchar diff, pred[]={0,0}; - ushort data=0, range=0; - unsigned pix, row, col; - - fseek (ifp, seg[0][1]+1, SEEK_SET); - getbits(-1); - for (pix=seg[0][0]; pix < seg[1][0]; pix++) { - for (s=0; s < 3; s++) { - data = data << nbits | getbits(nbits); - if (carry < 0) - carry = (nbits += carry+1) < 1 ? nbits-1 : 0; - while (--nbits >= 0) - if ((data >> nbits & 0xff) == 0xff) break; - if (nbits > 0) - data = ((data & ((1 << (nbits-1)) - 1)) << 1) | - ((data + (((data & (1 << (nbits-1)))) << 1)) & (-1 << nbits)); - if (nbits >= 0) { - data += getbits(1); - carry = nbits - 8; - } - count = ((((data-range+1) & 0xffff) << 2) - 1) / (high >> 4); - for (bin=0; hist[s][bin+5] > count; bin++); - low = hist[s][bin+5] * (high >> 4) >> 2; - if (bin) high = hist[s][bin+4] * (high >> 4) >> 2; - high -= low; - for (nbits=0; high << nbits < 128; nbits++); - range = (range+low) << nbits; - high <<= nbits; - next = hist[s][1]; - if (++hist[s][2] > hist[s][3]) { - next = (next+1) & hist[s][0]; - hist[s][3] = (hist[s][next+4] - hist[s][next+5]) >> 2; - hist[s][2] = 1; - } - if (hist[s][hist[s][1]+4] - hist[s][hist[s][1]+5] > 1) { - if (bin < hist[s][1]) - for (i=bin; i < hist[s][1]; i++) hist[s][i+5]--; - else if (next <= bin) - for (i=hist[s][1]; i < bin; i++) hist[s][i+5]++; - } - hist[s][1] = next; - sym[s] = bin; - } - diff = sym[2] << 5 | sym[1] << 2 | (sym[0] & 3); - if (sym[0] & 4) - diff = diff ? -diff : 0x80; - if (ftell(ifp) + 12 >= seg[1][1]) - diff = 0; - pred[pix & 1] += diff; -#ifndef LIBRAW_LIBRARY_BUILD - row = pix / raw_width - top_margin; - col = pix % raw_width - left_margin; - if (row < height && col < width) - BAYER(row,col) = pred[pix & 1]; -#else - row = pix / raw_width - top_margin; - RBAYER(pix / raw_width, pix % raw_width) = pred[pix & 1]; -#endif - if (!(pix & 1) && HOLE(row)) pix += 2; - } - maximum = 0xff; -} - -void CLASS smal_v6_load_raw() -{ - unsigned seg[2][2]; - - fseek (ifp, 16, SEEK_SET); - seg[0][0] = 0; - seg[0][1] = get2(); - seg[1][0] = raw_width * raw_height; - seg[1][1] = INT_MAX; - smal_decode_segment (seg, 0); -} - -int CLASS median4 (int *p) -{ - int min, max, sum, i; - - min = max = sum = p[0]; - for (i=1; i < 4; i++) { - sum += p[i]; - if (min > p[i]) min = p[i]; - if (max < p[i]) max = p[i]; - } - return (sum - min - max) >> 1; -} - -void CLASS fill_holes (int holes) -{ - int row, col, val[4]; - - for (row=2; row < height-2; row++) { - if (!HOLE(row)) continue; - for (col=1; col < width-1; col+=4) { - val[0] = BAYER(row-1,col-1); - val[1] = BAYER(row-1,col+1); - val[2] = BAYER(row+1,col-1); - val[3] = BAYER(row+1,col+1); - BAYER(row,col) = median4(val); - } - for (col=2; col < width-2; col+=4) - if (HOLE(row-2) || HOLE(row+2)) - BAYER(row,col) = (BAYER(row,col-2) + BAYER(row,col+2)) >> 1; - else { - val[0] = BAYER(row,col-2); - val[1] = BAYER(row,col+2); - val[2] = BAYER(row-2,col); - val[3] = BAYER(row+2,col); - BAYER(row,col) = median4(val); - } - } -} - -void CLASS smal_v9_load_raw() -{ - unsigned seg[256][2], offset, nseg, holes, i; - - fseek (ifp, 67, SEEK_SET); - offset = get4(); - nseg = fgetc(ifp); - fseek (ifp, offset, SEEK_SET); - for (i=0; i < nseg*2; i++) - seg[0][i] = get4() + data_offset*(i & 1); - fseek (ifp, 78, SEEK_SET); - holes = fgetc(ifp); - fseek (ifp, 88, SEEK_SET); - seg[nseg][0] = raw_height * raw_width; - seg[nseg][1] = get4() + data_offset; - for (i=0; i < nseg; i++) - smal_decode_segment (seg+i, holes); - if (holes) fill_holes (holes); -} - -void CLASS redcine_load_raw() -{ -#ifndef NO_JASPER - int c, row, col; - jas_stream_t *in; - jas_image_t *jimg; - jas_matrix_t *jmat; - jas_seqent_t *data; - ushort *img, *pix; - - jas_init(); -#ifndef LIBRAW_LIBRARY_BUILD - in = jas_stream_fopen (ifname, "rb"); -#else - in = (jas_stream_t*)ifp->make_jas_stream(); - if(!in) - throw LIBRAW_EXCEPTION_DECODE_JPEG2000; -#endif - jas_stream_seek (in, data_offset+20, SEEK_SET); - jimg = jas_image_decode (in, -1, 0); -#ifndef LIBRAW_LIBRARY_BUILD - if (!jimg) longjmp (failure, 3); -#else - if(!jimg) - { - jas_stream_close (in); - throw LIBRAW_EXCEPTION_DECODE_JPEG2000; - } -#endif - jmat = jas_matrix_create (height/2, width/2); - merror (jmat, "redcine_load_raw()"); - img = (ushort *) calloc ((height+2)*(width+2), 2); - merror (img, "redcine_load_raw()"); - FORC4 { - jas_image_readcmpt (jimg, c, 0, 0, width/2, height/2, jmat); - data = jas_matrix_getref (jmat, 0, 0); - for (row = c >> 1; row < height; row+=2) - for (col = c & 1; col < width; col+=2) - img[(row+1)*(width+2)+col+1] = data[(row/2)*(width/2)+col/2]; - } - for (col=1; col <= width; col++) { - img[col] = img[2*(width+2)+col]; - img[(height+1)*(width+2)+col] = img[(height-1)*(width+2)+col]; - } - for (row=0; row < height+2; row++) { - img[row*(width+2)] = img[row*(width+2)+2]; - img[(row+1)*(width+2)-1] = img[(row+1)*(width+2)-3]; - } - for (row=1; row <= height; row++) { - pix = img + row*(width+2) + (col = 1 + (FC(row,1) & 1)); - for ( ; col <= width; col+=2, pix+=2) { - c = (((pix[0] - 0x800) << 3) + - pix[-(width+2)] + pix[width+2] + pix[-1] + pix[1]) >> 2; - pix[0] = LIM(c,0,4095); - } - } - for (row=0; row < height; row++) - for (col=0; col < width; col++) - RBAYER(row,col) = curve[img[(row+1)*(width+2)+col+1]]; - free (img); - jas_matrix_destroy (jmat); - jas_image_destroy (jimg); - jas_stream_close (in); -#endif -} - - -void CLASS gamma_curve (double pwr, double ts, int mode, int imax) -{ - int i; - double g[6], bnd[2]={0,0}, r; - - g[0] = pwr; - g[1] = ts; - g[2] = g[3] = g[4] = 0; - bnd[g[1] >= 1] = 1; - if (g[1] && (g[1]-1)*(g[0]-1) <= 0) { - for (i=0; i < 48; i++) { - g[2] = (bnd[0] + bnd[1])/2; - if (g[0]) bnd[(pow(g[2]/g[1],-g[0]) - 1)/g[0] - 1/g[2] > -1] = g[2]; - else bnd[g[2]/exp(1-1/g[2]) < g[1]] = g[2]; - } - g[3] = g[2] / g[1]; - if (g[0]) g[4] = g[2] * (1/g[0] - 1); - } - if (g[0]) g[5] = 1 / (g[1]*SQR(g[3])/2 - g[4]*(1 - g[3]) + - (1 - pow(g[3],1+g[0]))*(1 + g[4])/(1 + g[0])) - 1; - else g[5] = 1 / (g[1]*SQR(g[3])/2 + 1 - - g[2] - g[3] - g[2]*g[3]*(log(g[3]) - 1)) - 1; - if (!mode--) { - memcpy (gamm, g, sizeof gamm); - return; - } - for (i=0; i < 0x10000; i++) { - curve[i] = 0xffff; - if ((r = (double) i / imax) < 1) - curve[i] = 0x10000 * ( mode - ? (r < g[3] ? r*g[1] : (g[0] ? pow( r,g[0])*(1+g[4])-g[4] : log(r)*g[2]+1)) - : (r < g[2] ? r/g[1] : (g[0] ? pow((r+g[4])/(1+g[4]),1/g[0]) : exp((r-1)/g[2])))); - } -} - -void CLASS pseudoinverse (double (*in)[3], double (*out)[3], int size) -{ - double work[3][6], num; - int i, j, k; - - for (i=0; i < 3; i++) { - for (j=0; j < 6; j++) - work[i][j] = j == i+3; - for (j=0; j < 3; j++) - for (k=0; k < size; k++) - work[i][j] += in[k][i] * in[k][j]; - } - for (i=0; i < 3; i++) { - num = work[i][i]; - for (j=0; j < 6; j++) - work[i][j] /= num; - for (k=0; k < 3; k++) { - if (k==i) continue; - num = work[k][i]; - for (j=0; j < 6; j++) - work[k][j] -= work[i][j] * num; - } - } - for (i=0; i < size; i++) - for (j=0; j < 3; j++) - for (out[i][j]=k=0; k < 3; k++) - out[i][j] += work[j][k+3] * in[i][k]; -} - -void CLASS cam_xyz_coeff (double cam_xyz[4][3]) -{ - double cam_rgb[4][3], inverse[4][3], num; - int i, j, k; - - for (i=0; i < colors; i++) /* Multiply out XYZ colorspace */ - for (j=0; j < 3; j++) - for (cam_rgb[i][j] = k=0; k < 3; k++) - cam_rgb[i][j] += cam_xyz[i][k] * xyz_rgb[k][j]; - - for (i=0; i < colors; i++) { /* Normalize cam_rgb so that */ - for (num=j=0; j < 3; j++) /* cam_rgb * (1,1,1) is (1,1,1,1) */ - num += cam_rgb[i][j]; - for (j=0; j < 3; j++) - cam_rgb[i][j] /= num; - pre_mul[i] = 1 / num; - } - pseudoinverse (cam_rgb, inverse, colors); - for (raw_color = i=0; i < 3; i++) - for (j=0; j < colors; j++) - rgb_cam[i][j] = inverse[j][i]; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.pre_mul_state = LIBRAW_COLORSTATE_CONST; - color_flags.rgb_cam_state = LIBRAW_COLORSTATE_CONST; -#endif -} - -#ifdef COLORCHECK -void CLASS colorcheck() -{ -#define NSQ 24 -// Coordinates of the GretagMacbeth ColorChecker squares -// width, height, 1st_column, 1st_row - int cut[NSQ][4]; // you must set these -// ColorChecker Chart under 6500-kelvin illumination - static const double gmb_xyY[NSQ][3] = { - { 0.400, 0.350, 10.1 }, // Dark Skin - { 0.377, 0.345, 35.8 }, // Light Skin - { 0.247, 0.251, 19.3 }, // Blue Sky - { 0.337, 0.422, 13.3 }, // Foliage - { 0.265, 0.240, 24.3 }, // Blue Flower - { 0.261, 0.343, 43.1 }, // Bluish Green - { 0.506, 0.407, 30.1 }, // Orange - { 0.211, 0.175, 12.0 }, // Purplish Blue - { 0.453, 0.306, 19.8 }, // Moderate Red - { 0.285, 0.202, 6.6 }, // Purple - { 0.380, 0.489, 44.3 }, // Yellow Green - { 0.473, 0.438, 43.1 }, // Orange Yellow - { 0.187, 0.129, 6.1 }, // Blue - { 0.305, 0.478, 23.4 }, // Green - { 0.539, 0.313, 12.0 }, // Red - { 0.448, 0.470, 59.1 }, // Yellow - { 0.364, 0.233, 19.8 }, // Magenta - { 0.196, 0.252, 19.8 }, // Cyan - { 0.310, 0.316, 90.0 }, // White - { 0.310, 0.316, 59.1 }, // Neutral 8 - { 0.310, 0.316, 36.2 }, // Neutral 6.5 - { 0.310, 0.316, 19.8 }, // Neutral 5 - { 0.310, 0.316, 9.0 }, // Neutral 3.5 - { 0.310, 0.316, 3.1 } }; // Black - double gmb_cam[NSQ][4], gmb_xyz[NSQ][3]; - double inverse[NSQ][3], cam_xyz[4][3], num; - int c, i, j, k, sq, row, col, count[4]; - - memset (gmb_cam, 0, sizeof gmb_cam); - for (sq=0; sq < NSQ; sq++) { - FORCC count[c] = 0; - for (row=cut[sq][3]; row < cut[sq][3]+cut[sq][1]; row++) - for (col=cut[sq][2]; col < cut[sq][2]+cut[sq][0]; col++) { - c = FC(row,col); - if (c >= colors) c -= 2; - gmb_cam[sq][c] += BAYER(row,col); - count[c]++; - } - FORCC gmb_cam[sq][c] = gmb_cam[sq][c]/count[c] - black; - gmb_xyz[sq][0] = gmb_xyY[sq][2] * gmb_xyY[sq][0] / gmb_xyY[sq][1]; - gmb_xyz[sq][1] = gmb_xyY[sq][2]; - gmb_xyz[sq][2] = gmb_xyY[sq][2] * - (1 - gmb_xyY[sq][0] - gmb_xyY[sq][1]) / gmb_xyY[sq][1]; - } - pseudoinverse (gmb_xyz, inverse, NSQ); - for (i=0; i < colors; i++) - for (j=0; j < 3; j++) - for (cam_xyz[i][j] = k=0; k < NSQ; k++) - cam_xyz[i][j] += gmb_cam[k][i] * inverse[k][j]; - cam_xyz_coeff (cam_xyz); -#ifdef DCRAW_VERBOSE - if (verbose) { - printf (" { \"%s %s\", %d,\n\t{", make, model, black); - num = 10000 / (cam_xyz[1][0] + cam_xyz[1][1] + cam_xyz[1][2]); - FORCC for (j=0; j < 3; j++) - printf ("%c%d", (c | j) ? ',':' ', (int) (cam_xyz[c][j] * num + 0.5)); - puts (" } },"); - } -#endif -#undef NSQ -} -#endif - -void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) -{ - int i; - for (i=0; i < sc; i++) - temp[i] = 2*base[st*i] + base[st*(sc-i)] + base[st*(i+sc)]; - for (; i+sc < size; i++) - temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(i+sc)]; - for (; i < size; i++) - temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(2*size-2-(i+sc))]; -} - -#if !defined(LIBRAW_USE_OPENMP) -void CLASS wavelet_denoise() -{ - float *fimg=0, *temp, thold, mul[2], avg, diff; - int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; - ushort *window[4]; - static const float noise[] = - { 0.8002,0.2735,0.1202,0.0585,0.0291,0.0152,0.0080,0.0044 }; - -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("Wavelet denoising...\n")); -#endif - - while (maximum << scale < 0x10000) scale++; - maximum <<= --scale; - black <<= scale; - FORC4 cblack[c] <<= scale; - if ((size = iheight*iwidth) < 0x15550000) - fimg = (float *) malloc ((size*3 + iheight + iwidth) * sizeof *fimg); - merror (fimg, "wavelet_denoise()"); - temp = fimg + size*3; - if ((nc = colors) == 3 && filters) nc++; - FORC(nc) { /* denoise R,G1,B,G3 individually */ - for (i=0; i < size; i++) - fimg[i] = 256 * sqrt((double)(image[i][c] << scale)); - for (hpass=lev=0; lev < 5; lev++) { - lpass = size*((lev & 1)+1); - for (row=0; row < iheight; row++) { - hat_transform (temp, fimg+hpass+row*iwidth, 1, iwidth, 1 << lev); - for (col=0; col < iwidth; col++) - fimg[lpass + row*iwidth + col] = temp[col] * 0.25; - } - for (col=0; col < iwidth; col++) { - hat_transform (temp, fimg+lpass+col, iwidth, iheight, 1 << lev); - for (row=0; row < iheight; row++) - fimg[lpass + row*iwidth + col] = temp[row] * 0.25; - } - thold = threshold * noise[lev]; - for (i=0; i < size; i++) { - fimg[hpass+i] -= fimg[lpass+i]; - if (fimg[hpass+i] < -thold) fimg[hpass+i] += thold; - else if (fimg[hpass+i] > thold) fimg[hpass+i] -= thold; - else fimg[hpass+i] = 0; - if (hpass) fimg[i] += fimg[hpass+i]; - } - hpass = lpass; - } - for (i=0; i < size; i++) - image[i][c] = CLIP(SQR(fimg[i]+fimg[lpass+i])/0x10000); - } - if (filters && colors == 3) { /* pull G1 and G3 closer together */ - for (row=0; row < 2; row++) { - mul[row] = 0.125 * pre_mul[FC(row+1,0) | 1] / pre_mul[FC(row,0) | 1]; - blk[row] = cblack[FC(row,0) | 1]; - } - for (i=0; i < 4; i++) - window[i] = (ushort *) fimg + width*i; - for (wlast=-1, row=1; row < height-1; row++) { - while (wlast < row+1) { - for (wlast++, i=0; i < 4; i++) - window[(i+3) & 3] = window[i]; - for (col = FC(wlast,1) & 1; col < width; col+=2) - window[2][col] = BAYER(wlast,col); - } - thold = threshold/512; - for (col = (FC(row,0) & 1)+1; col < width-1; col+=2) { - avg = ( window[0][col-1] + window[0][col+1] + - window[2][col-1] + window[2][col+1] - blk[~row & 1]*4 ) - * mul[row & 1] + (window[1][col] + blk[row & 1]) * 0.5; - avg = avg < 0 ? 0 : sqrt(avg); - diff = sqrt((double)(BAYER(row,col))) - avg; - if (diff < -thold) diff += thold; - else if (diff > thold) diff -= thold; - else diff = 0; - BAYER(row,col) = CLIP(SQR(avg+diff) + 0.5); - } - } - } - free (fimg); -} -#else /* LIBRAW_USE_OPENMP */ -void CLASS wavelet_denoise() -{ - float *fimg=0, *temp, thold, mul[2], avg, diff; - int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; - ushort *window[4]; - static const float noise[] = - { 0.8002,0.2735,0.1202,0.0585,0.0291,0.0152,0.0080,0.0044 }; - -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("Wavelet denoising...\n")); -#endif - - while (maximum << scale < 0x10000) scale++; - maximum <<= --scale; - black <<= scale; - FORC4 cblack[c] <<= scale; - if ((size = iheight*iwidth) < 0x15550000) - fimg = (float *) malloc ((size*3 + iheight + iwidth) * sizeof *fimg); - merror (fimg, "wavelet_denoise()"); - temp = fimg + size*3; - if ((nc = colors) == 3 && filters) nc++; -#ifdef LIBRAW_LIBRARY_BUILD -#pragma omp parallel default(shared) private(i,col,row,thold,lev,lpass,hpass,temp,c) firstprivate(scale,size) -#endif - { - temp = (float*)malloc( (iheight + iwidth) * sizeof *fimg); - FORC(nc) { /* denoise R,G1,B,G3 individually */ -#ifdef LIBRAW_LIBRARY_BUILD -#pragma omp for -#endif - for (i=0; i < size; i++) - fimg[i] = 256 * sqrt((double)(image[i][c] << scale)); - for (hpass=lev=0; lev < 5; lev++) { - lpass = size*((lev & 1)+1); -#ifdef LIBRAW_LIBRARY_BUILD -#pragma omp for -#endif - for (row=0; row < iheight; row++) { - hat_transform (temp, fimg+hpass+row*iwidth, 1, iwidth, 1 << lev); - for (col=0; col < iwidth; col++) - fimg[lpass + row*iwidth + col] = temp[col] * 0.25; - } -#ifdef LIBRAW_LIBRARY_BUILD -#pragma omp for -#endif - for (col=0; col < iwidth; col++) { - hat_transform (temp, fimg+lpass+col, iwidth, iheight, 1 << lev); - for (row=0; row < iheight; row++) - fimg[lpass + row*iwidth + col] = temp[row] * 0.25; - } - thold = threshold * noise[lev]; -#ifdef LIBRAW_LIBRARY_BUILD -#pragma omp for -#endif - for (i=0; i < size; i++) { - fimg[hpass+i] -= fimg[lpass+i]; - if (fimg[hpass+i] < -thold) fimg[hpass+i] += thold; - else if (fimg[hpass+i] > thold) fimg[hpass+i] -= thold; - else fimg[hpass+i] = 0; - if (hpass) fimg[i] += fimg[hpass+i]; - } - hpass = lpass; - } -#ifdef LIBRAW_LIBRARY_BUILD -#pragma omp for -#endif - for (i=0; i < size; i++) - image[i][c] = CLIP(SQR(fimg[i]+fimg[lpass+i])/0x10000); - } - free(temp); - } /* end omp parallel */ -/* the following loops are hard to parallize, no idea yes, - * problem is wlast which is carrying dependency - * second part should be easyer, but did not yet get it right. - */ - if (filters && colors == 3) { /* pull G1 and G3 closer together */ - for (row=0; row < 2; row++){ - mul[row] = 0.125 * pre_mul[FC(row+1,0) | 1] / pre_mul[FC(row,0) | 1]; - blk[row] = cblack[FC(row,0) | 1]; - } - for (i=0; i < 4; i++) - window[i] = (ushort *) fimg + width*i; - for (wlast=-1, row=1; row < height-1; row++) { - while (wlast < row+1) { - for (wlast++, i=0; i < 4; i++) - window[(i+3) & 3] = window[i]; - for (col = FC(wlast,1) & 1; col < width; col+=2) - window[2][col] = BAYER(wlast,col); - } - thold = threshold/512; - for (col = (FC(row,0) & 1)+1; col < width-1; col+=2) { - avg = ( window[0][col-1] + window[0][col+1] + - window[2][col-1] + window[2][col+1] - blk[~row & 1]*4 ) - * mul[row & 1] + (window[1][col] + blk[row & 1]) * 0.5; - avg = avg < 0 ? 0 : sqrt(avg); - diff = sqrt((double)BAYER(row,col)) - avg; - if (diff < -thold) diff += thold; - else if (diff > thold) diff -= thold; - else diff = 0; - BAYER(row,col) = CLIP(SQR(avg+diff) + 0.5); - } - } - } - free (fimg); -} - -#endif - - - -// green equilibration -void CLASS green_matching() -{ - int i,j; - double m1,m2,c1,c2; - int o1_1,o1_2,o1_3,o1_4; - int o2_1,o2_2,o2_3,o2_4; - ushort (*img)[4]; - const int margin = 3; - int oj = 2, oi = 2; - float f; - const float thr = 0.01f; - if(half_size || shrink) return; - if(FC(oj, oi) != 3) oj++; - if(FC(oj, oi) != 3) oi++; - if(FC(oj, oi) != 3) oj--; - - img = (ushort (*)[4]) calloc (height*width, sizeof *image); - merror (img, "green_matching()"); - memcpy(img,image,height*width*sizeof *image); - - for(j=oj;j0xffff?0xffff:f; - } - } - free(img); -} - - -void CLASS scale_colors() -{ - unsigned bottom, right, size, row, col, ur, uc, x, y, c, sum[8]; - int val, dark, sat,i; - double dsum[8], dmin, dmax; - float scale_mul[4], fr, fc; - ushort *img=0, *pix; - -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_SCALE_COLORS,0,2); -#endif - - FORC4 cblack[c] += black; - if (user_mul[0]) - memcpy (pre_mul, user_mul, sizeof pre_mul); - if (use_auto_wb || (use_camera_wb && cam_mul[0] == -1)) { - memset (dsum, 0, sizeof dsum); - bottom = MIN (greybox[1]+greybox[3], height); - right = MIN (greybox[0]+greybox[2], width); - for (row=greybox[1]; row < bottom; row += 8) - for (col=greybox[0]; col < right; col += 8) { - memset (sum, 0, sizeof sum); - for (y=row; y < row+8 && y < bottom; y++) - for (x=col; x < col+8 && x < right; x++) - FORC4 { - if (filters) { - c = FC(y,x); - val = BAYER(y,x); - } else - val = image[y*width+x][c]; - if (val > maximum-25) goto skip_block; - if ((val -= cblack[c]) < 0) val = 0; - sum[c] += val; - sum[c+4]++; - if (filters) break; - } - FORC(8) dsum[c] += sum[c]; -skip_block: ; - } - FORC4 if (dsum[c]) pre_mul[c] = dsum[c+4] / dsum[c]; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.pre_mul_state = LIBRAW_COLORSTATE_CALCULATED; -#endif - } - if (use_camera_wb && cam_mul[0] != -1) { - memset (sum, 0, sizeof sum); - for (row=0; row < 8; row++) - for (col=0; col < 8; col++) { - c = FC(row,col); - if ((val = white[row][col] - cblack[c]) > 0) - sum[c] += val; - sum[c+4]++; - } - if (sum[0] && sum[1] && sum[2] && sum[3]) - { - FORC4 pre_mul[c] = (float) sum[c+4] / sum[c]; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.pre_mul_state = LIBRAW_COLORSTATE_CALCULATED; -#endif - } - else if (cam_mul[0] && cam_mul[2]) - { - memcpy (pre_mul, cam_mul, sizeof pre_mul); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.pre_mul_state =color_flags.pre_mul_state; -#endif - } - else - { -#ifdef LIBRAW_LIBRARY_BUILD - imgdata.process_warnings |= LIBRAW_WARN_BAD_CAMERA_WB; -#endif -#ifdef DCRAW_VERBOSE - fprintf (stderr,_("%s: Cannot use camera white balance.\n"), ifname); -#endif - } - } - if (pre_mul[3] == 0) pre_mul[3] = colors < 4 ? pre_mul[1] : 1; - dark = black; - sat = maximum; - if (threshold) wavelet_denoise(); - maximum -= black; - for (dmin=DBL_MAX, dmax=c=0; c < 4; c++) { - if (dmin > pre_mul[c]) - dmin = pre_mul[c]; - if (dmax < pre_mul[c]) - dmax = pre_mul[c]; - } - if (!highlight) dmax = dmin; - FORC4 scale_mul[c] = (pre_mul[c] /= dmax) * 65535.0 / maximum; -#ifdef DCRAW_VERBOSE - if (verbose) { - fprintf (stderr, - _("Scaling with darkness %d, saturation %d, and\nmultipliers"), dark, sat); - FORC4 fprintf (stderr, " %f", pre_mul[c]); - fputc ('\n', stderr); - } -#endif - - size = iheight*iwidth; -#if defined(LIBRAW_USE_OPENMP) -#pragma omp parallel for private(val) default(shared) -#endif - for (i=0; i < size*4; i++) { - val = image[0][i]; - if (!val) continue; - val -= cblack[i & 3]; - val *= scale_mul[i & 3]; - image[0][i] = CLIP(val); - } - if ((aber[0] != 1 || aber[2] != 1) && colors == 3) { -#ifdef DCRAW_VERBOSE - if (verbose) - fprintf (stderr,_("Correcting chromatic aberration...\n")); -#endif - for (c=0; c < 4; c+=2) { - if (aber[c] == 1) continue; - img = (ushort *) malloc (size * sizeof *img); - merror (img, "scale_colors()"); - for (i=0; i < size; i++) - img[i] = image[i][c]; - for (row=0; row < iheight; row++) { - ur = fr = (row - iheight*0.5) * aber[c] + iheight*0.5; - if (ur > iheight-2) continue; - fr -= ur; - for (col=0; col < iwidth; col++) { - uc = fc = (col - iwidth*0.5) * aber[c] + iwidth*0.5; - if (uc > iwidth-2) continue; - fc -= uc; - pix = img + ur*iwidth + uc; - image[row*iwidth+col][c] = - (pix[ 0]*(1-fc) + pix[ 1]*fc) * (1-fr) + - (pix[iwidth]*(1-fc) + pix[iwidth+1]*fc) * fr; - } - } - free(img); - } - } -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_SCALE_COLORS,1,2); -#endif -} - -void CLASS pre_interpolate() -{ - ushort (*img)[4]; - int row, col, c; - -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_PRE_INTERPOLATE,0,2); -#endif - if (shrink) { - if (half_size) { - height = iheight; - width = iwidth; - } else { - img = (ushort (*)[4]) calloc (height*width, sizeof *img); - merror (img, "pre_interpolate()"); - for (row=0; row < height; row++) - for (col=0; col < width; col++) { - c = fc(row,col); - img[row*width+col][c] = image[(row >> 1)*iwidth+(col >> 1)][c]; - } - free (image); - image = img; - shrink = 0; - } - } - if (filters && colors == 3) { - if (four_color_rgb && colors++) - mix_green = !half_size; - else { - for (row = FC(1,0) >> 1; row < height; row+=2) - for (col = FC(row,1) & 1; col < width; col+=2) - image[row*width+col][1] = image[row*width+col][3]; - filters &= ~((filters & 0x55555555) << 1); - } - } - if (half_size) filters = 0; -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_PRE_INTERPOLATE,1,2); -#endif -} - -void CLASS border_interpolate (int border) -{ - unsigned row, col, y, x, f, c, sum[8]; - - for (row=0; row < height; row++) - for (col=0; col < width; col++) { - if (col==border && row >= border && row < height-border) - col = width-border; - memset (sum, 0, sizeof sum); - for (y=row-1; y != row+2; y++) - for (x=col-1; x != col+2; x++) - if (y < height && x < width) { - f = fc(y,x); - sum[f] += image[y*width+x][f]; - sum[f+4]++; - } - f = fc(row,col); - FORCC if (c != f && sum[c+4]) - image[row*width+col][c] = sum[c] / sum[c+4]; - } -} - -void CLASS lin_interpolate() -{ - int code[16][16][32], *ip, sum[4]; - int c, i, x, y, row, col, shift, color; - ushort *pix; - -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("Bilinear interpolation...\n")); -#endif - -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_INTERPOLATE,0,3); -#endif - border_interpolate(1); - for (row=0; row < 16; row++) - for (col=0; col < 16; col++) { - ip = code[row][col]; - memset (sum, 0, sizeof sum); - for (y=-1; y <= 1; y++) - for (x=-1; x <= 1; x++) { - shift = (y==0) + (x==0); - if (shift == 2) continue; - color = fc(row+y,col+x); - *ip++ = (width*y + x)*4 + color; - *ip++ = shift; - *ip++ = color; - sum[color] += 1 << shift; - } - FORCC - if (c != fc(row,col)) { - *ip++ = c; - *ip++ = 256 / sum[c]; - } - } -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_INTERPOLATE,1,3); -#endif - for (row=1; row < height-1; row++) - for (col=1; col < width-1; col++) { - pix = image[row*width+col]; - ip = code[row & 15][col & 15]; - memset (sum, 0, sizeof sum); - for (i=8; i--; ip+=3) - sum[ip[2]] += pix[ip[0]] << ip[1]; - for (i=colors; --i; ip+=2) - pix[ip[0]] = sum[ip[0]] * ip[1] >> 8; - } -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_INTERPOLATE,2,3); -#endif -} - -/* - This algorithm is officially called: - - "Interpolation using a Threshold-based variable number of gradients" - - described in http://scien.stanford.edu/pages/labsite/1999/psych221/projects/99/tingchen/algodep/vargra.html - - I've extended the basic idea to work with non-Bayer filter arrays. - Gradients are numbered clockwise from NW=0 to W=7. - */ -void CLASS vng_interpolate() -{ - static const signed char *cp, terms[] = { - -2,-2,+0,-1,0,0x01, -2,-2,+0,+0,1,0x01, -2,-1,-1,+0,0,0x01, - -2,-1,+0,-1,0,0x02, -2,-1,+0,+0,0,0x03, -2,-1,+0,+1,1,0x01, - -2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03, - -2,+1,-1,+0,0,0x04, -2,+1,+0,-1,1,0x04, -2,+1,+0,+0,0,0x06, - -2,+1,+0,+1,0,0x02, -2,+2,+0,+0,1,0x04, -2,+2,+0,+1,0,0x04, - -1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01, - -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40, - -1,-1,+1,-1,0,0x22, -1,-1,+1,+0,0,0x33, -1,-1,+1,+1,1,0x11, - -1,+0,-1,+2,0,0x08, -1,+0,+0,-1,0,0x44, -1,+0,+0,+1,0,0x11, - -1,+0,+1,-2,1,0x40, -1,+0,+1,-1,0,0x66, -1,+0,+1,+0,1,0x22, - -1,+0,+1,+1,0,0x33, -1,+0,+1,+2,1,0x10, -1,+1,+1,-1,1,0x44, - -1,+1,+1,+0,0,0x66, -1,+1,+1,+1,0,0x22, -1,+1,+1,+2,0,0x10, - -1,+2,+0,+1,0,0x04, -1,+2,+1,+0,1,0x04, -1,+2,+1,+1,0,0x04, - +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40, - +0,-1,+1,+0,0,0x11, +0,-1,+2,-2,0,0x40, +0,-1,+2,-1,0,0x20, - +0,-1,+2,+0,0,0x30, +0,-1,+2,+1,1,0x10, +0,+0,+0,+2,1,0x08, - +0,+0,+2,-2,1,0x40, +0,+0,+2,-1,0,0x60, +0,+0,+2,+0,1,0x20, - +0,+0,+2,+1,0,0x30, +0,+0,+2,+2,1,0x10, +0,+1,+1,+0,0,0x44, - +0,+1,+1,+2,0,0x10, +0,+1,+2,-1,1,0x40, +0,+1,+2,+0,0,0x60, - +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80, - +1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40, - +1,+0,+2,+1,0,0x10 - }, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 }; - ushort (*brow[5])[4], *pix; - int prow=7, pcol=1, *ip, *code[16][16], gval[8], gmin, gmax, sum[4]; - int row, col, x, y, x1, x2, y1, y2, t, weight, grads, color, diag; - int g, diff, thold, num, c; - lin_interpolate(); -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("VNG interpolation...\n")); -#endif - - if (filters == 1) prow = pcol = 15; - ip = (int *) calloc ((prow+1)*(pcol+1), 1280); - merror (ip, "vng_interpolate()"); - for (row=0; row <= prow; row++) /* Precalculate for VNG */ - for (col=0; col <= pcol; col++) { - code[row][col] = ip; - for (cp=terms, t=0; t < 64; t++) { - y1 = *cp++; x1 = *cp++; - y2 = *cp++; x2 = *cp++; - weight = *cp++; - grads = *cp++; - color = fc(row+y1,col+x1); - if (fc(row+y2,col+x2) != color) continue; - diag = (fc(row,col+1) == color && fc(row+1,col) == color) ? 2:1; - if (abs(y1-y2) == diag && abs(x1-x2) == diag) continue; - *ip++ = (y1*width + x1)*4 + color; - *ip++ = (y2*width + x2)*4 + color; - *ip++ = weight; - for (g=0; g < 8; g++) - if (grads & 1< gval[g]) gmin = gval[g]; - if (gmax < gval[g]) gmax = gval[g]; - } - if (gmax == 0) { - memcpy (brow[2][col], pix, sizeof *image); - continue; - } - thold = gmin + (gmax >> 1); - memset (sum, 0, sizeof sum); - color = fc(row,col); - for (num=g=0; g < 8; g++,ip+=2) { /* Average the neighbors */ - if (gval[g] <= thold) { - FORCC - if (c == color && ip[1]) - sum[c] += (pix[c] + pix[ip[1]]) >> 1; - else - sum[c] += pix[ip[0] + c]; - num++; - } - } - FORCC { /* Save to buffer */ - t = pix[color]; - if (c != color) - t += (sum[c] - sum[color]) / num; - brow[2][col][c] = CLIP(t); - } - } - if (row > 3) /* Write buffer to image */ - memcpy (image[(row-2)*width+2], brow[0]+2, (width-4)*sizeof *image); - for (g=0; g < 4; g++) - brow[(g-1) & 3] = brow[g]; - } - memcpy (image[(row-2)*width+2], brow[0]+2, (width-4)*sizeof *image); - memcpy (image[(row-1)*width+2], brow[1]+2, (width-4)*sizeof *image); - free (brow[4]); - free (code[0][0]); -} - -/* - Patterned Pixel Grouping Interpolation by Alain Desbiolles -*/ -void CLASS ppg_interpolate() -{ - int dir[5] = { 1, width, -1, -width, 1 }; - int row, col, diff[2], guess[2], c, d, i; - ushort (*pix)[4]; - - border_interpolate(3); -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("PPG interpolation...\n")); -#endif - -/* Fill in the green layer with gradients and pattern recognition: */ -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_INTERPOLATE,0,3); -#ifdef LIBRAW_USE_OPENMP -#pragma omp parallel for default(shared) private(guess, diff, row, col, d, c, i, pix) schedule(static) -#endif -#endif - for (row=3; row < height-3; row++) - for (col=3+(FC(row,3) & 1), c=FC(row,col); col < width-3; col+=2) { - pix = image + row*width+col; - for (i=0; (d=dir[i]) > 0; i++) { - guess[i] = (pix[-d][1] + pix[0][c] + pix[d][1]) * 2 - - pix[-2*d][c] - pix[2*d][c]; - diff[i] = ( ABS(pix[-2*d][c] - pix[ 0][c]) + - ABS(pix[ 2*d][c] - pix[ 0][c]) + - ABS(pix[ -d][1] - pix[ d][1]) ) * 3 + - ( ABS(pix[ 3*d][1] - pix[ d][1]) + - ABS(pix[-3*d][1] - pix[-d][1]) ) * 2; - } - d = dir[i = diff[0] > diff[1]]; - pix[0][1] = ULIM(guess[i] >> 2, pix[d][1], pix[-d][1]); - } -/* Calculate red and blue for each green pixel: */ -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_INTERPOLATE,1,3); -#ifdef LIBRAW_USE_OPENMP -#pragma omp parallel for default(shared) private(guess, diff, row, col, d, c, i, pix) schedule(static) -#endif -#endif - for (row=1; row < height-1; row++) - for (col=1+(FC(row,2) & 1), c=FC(row,col+1); col < width-1; col+=2) { - pix = image + row*width+col; - for (i=0; (d=dir[i]) > 0; c=2-c, i++) - pix[0][c] = CLIP((pix[-d][c] + pix[d][c] + 2*pix[0][1] - - pix[-d][1] - pix[d][1]) >> 1); - } -/* Calculate blue for red pixels and vice versa: */ -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_INTERPOLATE,2,3); -#ifdef LIBRAW_USE_OPENMP -#pragma omp parallel for default(shared) private(guess, diff, row, col, d, c, i, pix) schedule(static) -#endif -#endif - for (row=1; row < height-1; row++) - for (col=1+(FC(row,1) & 1), c=2-FC(row,col); col < width-1; col+=2) { - pix = image + row*width+col; - for (i=0; (d=dir[i]+dir[i+1]) > 0; i++) { - diff[i] = ABS(pix[-d][c] - pix[d][c]) + - ABS(pix[-d][1] - pix[0][1]) + - ABS(pix[ d][1] - pix[0][1]); - guess[i] = pix[-d][c] + pix[d][c] + 2*pix[0][1] - - pix[-d][1] - pix[d][1]; - } - if (diff[0] != diff[1]) - pix[0][c] = CLIP(guess[diff[0] > diff[1]] >> 1); - else - pix[0][c] = CLIP((guess[0]+guess[1]) >> 2); - } -} - -/* - Adaptive Homogeneity-Directed interpolation is based on - the work of Keigo Hirakawa, Thomas Parks, and Paul Lee. - */ -#define TS 256 /* Tile Size */ -static float dcraw_cbrt[0x10000] = {-1.0f}; - -static inline float calc_64cbrt(float f) -{ - unsigned u; - static float lower = dcraw_cbrt[0]; - static float upper = dcraw_cbrt[0xffff]; - - if (f <= 0) { - return lower; - } - - u = (unsigned) f; - if (u >= 0xffff) { - return upper; - } - return dcraw_cbrt[u]; -} -void CLASS ahd_interpolate_green_h_and_v(int top, int left, ushort (*out_rgb)[TS][TS][3]) -{ - int row, col; - int c, val; - ushort (*pix)[4]; - const int rowlimit = MIN(top+TS, height-2); - const int collimit = MIN(left+TS, width-2); - - for (row = top; row < rowlimit; row++) { - col = left + (FC(row,left) & 1); - for (c = FC(row,col); col < collimit; col+=2) { - pix = image + row*width+col; - val = ((pix[-1][1] + pix[0][c] + pix[1][1]) * 2 - - pix[-2][c] - pix[2][c]) >> 2; - out_rgb[0][row-top][col-left][1] = ULIM(val,pix[-1][1],pix[1][1]); - val = ((pix[-width][1] + pix[0][c] + pix[width][1]) * 2 - - pix[-2*width][c] - pix[2*width][c]) >> 2; - out_rgb[1][row-top][col-left][1] = ULIM(val,pix[-width][1],pix[width][1]); - } - } -} -void CLASS ahd_interpolate_r_and_b_in_rgb_and_convert_to_cielab(int top, int left, ushort (*inout_rgb)[TS][3], short (*out_lab)[TS][3], const float (&xyz_cam)[3][4]) -{ - unsigned row, col; - int c, val; - ushort (*pix)[4]; - ushort (*rix)[3]; - short (*lix)[3]; - float xyz[3]; - const unsigned num_pix_per_row = 4*width; - const unsigned rowlimit = MIN(top+TS-1, height-3); - const unsigned collimit = MIN(left+TS-1, width-3); - ushort *pix_above; - ushort *pix_below; - int t1, t2; - - for (row = top+1; row < rowlimit; row++) { - pix = image + row*width + left; - rix = &inout_rgb[row-top][0]; - lix = &out_lab[row-top][0]; - - for (col = left+1; col < collimit; col++) { - pix++; - pix_above = &pix[0][0] - num_pix_per_row; - pix_below = &pix[0][0] + num_pix_per_row; - rix++; - lix++; - - c = 2 - FC(row, col); - - if (c == 1) { - c = FC(row+1,col); - t1 = 2-c; - val = pix[0][1] + (( pix[-1][t1] + pix[1][t1] - - rix[-1][1] - rix[1][1] ) >> 1); - rix[0][t1] = CLIP(val); - val = pix[0][1] + (( pix_above[c] + pix_below[c] - - rix[-TS][1] - rix[TS][1] ) >> 1); - } else { - t1 = -4+c; /* -4+c: pixel of color c to the left */ - t2 = 4+c; /* 4+c: pixel of color c to the right */ - val = rix[0][1] + (( pix_above[t1] + pix_above[t2] - + pix_below[t1] + pix_below[t2] - - rix[-TS-1][1] - rix[-TS+1][1] - - rix[+TS-1][1] - rix[+TS+1][1] + 1) >> 2); - } - rix[0][c] = CLIP(val); - c = FC(row,col); - rix[0][c] = pix[0][c]; - xyz[0] = xyz[1] = xyz[2] = 0.5; - FORC3 { - /* - * Technically this ought to be FORCC, but the rest of - * ahd_interpolate() assumes 3 colors so let's help the compiler. - */ - xyz[0] += xyz_cam[0][c] * rix[0][c]; - xyz[1] += xyz_cam[1][c] * rix[0][c]; - xyz[2] += xyz_cam[2][c] * rix[0][c]; - } - FORC3 { - xyz[c] = calc_64cbrt(xyz[c]); - } - lix[0][0] = (116 * xyz[1] - 16); - lix[0][1] = 500 * (xyz[0] - xyz[1]); - lix[0][2] = 200 * (xyz[1] - xyz[2]); - } - } -} -void CLASS ahd_interpolate_r_and_b_and_convert_to_cielab(int top, int left, ushort (*inout_rgb)[TS][TS][3], short (*out_lab)[TS][TS][3], const float (&xyz_cam)[3][4]) -{ - int direction; - for (direction = 0; direction < 2; direction++) { - ahd_interpolate_r_and_b_in_rgb_and_convert_to_cielab(top, left, inout_rgb[direction], out_lab[direction], xyz_cam); - } -} -void CLASS ahd_interpolate_build_homogeneity_map(int top, int left, short (*lab)[TS][TS][3], char (*out_homogeneity_map)[TS][2]) -{ - int row, col; - int tr, tc; - int direction; - int i; - short (*lix)[3]; - short (*lixs[2])[3]; - short *adjacent_lix; - unsigned ldiff[2][4], abdiff[2][4], leps, abeps; - static const int dir[4] = { -1, 1, -TS, TS }; - const int rowlimit = MIN(top+TS-2, height-4); - const int collimit = MIN(left+TS-2, width-4); - int homogeneity; - char (*homogeneity_map_p)[2]; - - memset (out_homogeneity_map, 0, 2*TS*TS); - - for (row=top+2; row < rowlimit; row++) { - tr = row-top; - homogeneity_map_p = &out_homogeneity_map[tr][1]; - for (direction=0; direction < 2; direction++) { - lixs[direction] = &lab[direction][tr][1]; - } - - for (col=left+2; col < collimit; col++) { - tc = col-left; - homogeneity_map_p++; - - for (direction=0; direction < 2; direction++) { - lix = ++lixs[direction]; - for (i=0; i < 4; i++) { - adjacent_lix = lix[dir[i]]; - ldiff[direction][i] = ABS(lix[0][0]-adjacent_lix[0]); - abdiff[direction][i] = SQR(lix[0][1]-adjacent_lix[1]) - + SQR(lix[0][2]-adjacent_lix[2]); - } - } - leps = MIN(MAX(ldiff[0][0],ldiff[0][1]), - MAX(ldiff[1][2],ldiff[1][3])); - abeps = MIN(MAX(abdiff[0][0],abdiff[0][1]), - MAX(abdiff[1][2],abdiff[1][3])); - for (direction=0; direction < 2; direction++) { - homogeneity = 0; - for (i=0; i < 4; i++) { - if (ldiff[direction][i] <= leps && abdiff[direction][i] <= abeps) { - homogeneity++; - } - } - homogeneity_map_p[0][direction] = homogeneity; - } - } - } -} -void CLASS ahd_interpolate_combine_homogeneous_pixels(int top, int left, ushort (*rgb)[TS][TS][3], char (*homogeneity_map)[TS][2]) -{ - int row, col; - int tr, tc; - int i, j; - int direction; - int hm[2]; - int c; - const int rowlimit = MIN(top+TS-3, height-5); - const int collimit = MIN(left+TS-3, width-5); - - ushort (*pix)[4]; - ushort (*rix[2])[3]; - - for (row=top+3; row < rowlimit; row++) { - tr = row-top; - pix = &image[row*width+left+2]; - for (direction = 0; direction < 2; direction++) { - rix[direction] = &rgb[direction][tr][2]; - } - - for (col=left+3; col < collimit; col++) { - tc = col-left; - pix++; - for (direction = 0; direction < 2; direction++) { - rix[direction]++; - } - - for (direction=0; direction < 2; direction++) { - hm[direction] = 0; - for (i=tr-1; i <= tr+1; i++) { - for (j=tc-1; j <= tc+1; j++) { - hm[direction] += homogeneity_map[i][j][direction]; - } - } - } - if (hm[0] != hm[1]) { - memcpy(pix[0], rix[hm[1] > hm[0]][0], 3 * sizeof(ushort)); - } else { - FORC3 { - pix[0][c] = (rix[0][0][c] + rix[1][0][c]) >> 1; - } - } - } - } -} -void CLASS ahd_interpolate() -{ - int i, j, k, top, left; - float xyz_cam[3][4],r; - char *buffer; - ushort (*rgb)[TS][TS][3]; - short (*lab)[TS][TS][3]; - char (*homo)[TS][2]; - int terminate_flag = 0; - - if(dcraw_cbrt[0]<-0.1){ - for (i=0x10000-1; i >=0; i--) { - r = i / 65535.0; - dcraw_cbrt[i] = 64.0*(r > 0.008856 ? pow((double)r,1/3.0) : 7.787*r + 16/116.0); - } - } - -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("AHD interpolation...\n")); -#endif - - for (i=0; i < 3; i++) { - for (j=0; j < colors; j++) { - xyz_cam[i][j] = 0; - for (k=0; k < 3; k++) { - xyz_cam[i][j] += xyz_rgb[i][k] * rgb_cam[k][j] / d65_white[i]; - } - } - } - - border_interpolate(5); - -#ifdef LIBRAW_LIBRARY_BUILD -#ifdef LIBRAW_USE_OPENMP -#pragma omp parallel private(buffer,rgb,lab,homo,top,left,i,j,k) shared(xyz_cam,terminate_flag) -#endif -#endif - { - buffer = (char *) malloc (26*TS*TS); /* 1664 kB */ - merror (buffer, "ahd_interpolate()"); - rgb = (ushort(*)[TS][TS][3]) buffer; - lab = (short (*)[TS][TS][3])(buffer + 12*TS*TS); - homo = (char (*)[TS][2]) (buffer + 24*TS*TS); - -#ifdef LIBRAW_LIBRARY_BUILD -#ifdef LIBRAW_USE_OPENMP -#pragma omp for schedule(dynamic) -#endif -#endif - for (top=2; top < height-5; top += TS-6){ -#ifdef LIBRAW_LIBRARY_BUILD -#ifdef LIBRAW_USE_OPENMP - if(0== omp_get_thread_num()) -#endif - if(callbacks.progress_cb) { - int rr = (*callbacks.progress_cb)(callbacks.progresscb_data,LIBRAW_PROGRESS_INTERPOLATE,top-2,height-7); - if(rr) - terminate_flag = 1; - } -#endif - for (left=2; !terminate_flag && (left < width-5); left += TS-6) { - ahd_interpolate_green_h_and_v(top, left, rgb); - ahd_interpolate_r_and_b_and_convert_to_cielab(top, left, rgb, lab, xyz_cam); - ahd_interpolate_build_homogeneity_map(top, left, lab, homo); - ahd_interpolate_combine_homogeneous_pixels(top, left, rgb, homo); - } - } - free (buffer); - } -#ifdef LIBRAW_LIBRARY_BUILD - if(terminate_flag) - throw LIBRAW_EXCEPTION_CANCELLED_BY_CALLBACK; -#endif -} - - - -#undef TS - -void CLASS median_filter() -{ - ushort (*pix)[4]; - int pass, c, i, j, k, med[9]; - static const uchar opt[] = /* Optimal 9-element median search */ - { 1,2, 4,5, 7,8, 0,1, 3,4, 6,7, 1,2, 4,5, 7,8, - 0,3, 5,8, 4,7, 3,6, 1,4, 2,5, 4,7, 4,2, 6,4, 4,2 }; - - for (pass=1; pass <= med_passes; pass++) { -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_MEDIAN_FILTER,pass-1,med_passes); -#endif -#ifdef DCRAW_VERBOSE - if (verbose) - fprintf (stderr,_("Median filter pass %d...\n"), pass); -#endif - for (c=0; c < 3; c+=2) { - for (pix = image; pix < image+width*height; pix++) - pix[0][3] = pix[0][c]; - for (pix = image+width; pix < image+width*(height-1); pix++) { - if ((pix-image+1) % width < 2) continue; - for (k=0, i = -width; i <= width; i += width) - for (j = i-1; j <= i+1; j++) - med[k++] = pix[j][3] - pix[j][1]; - for (i=0; i < sizeof opt; i+=2) - if (med[opt[i]] > med[opt[i+1]]) - SWAP (med[opt[i]] , med[opt[i+1]]); - pix[0][c] = CLIP(med[4] + pix[0][1]); - } - } - } -} - -void CLASS blend_highlights() -{ - int clip=INT_MAX, row, col, c, i, j; - static const float trans[2][4][4] = - { { { 1,1,1 }, { 1.7320508,-1.7320508,0 }, { -1,-1,2 } }, - { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; - static const float itrans[2][4][4] = - { { { 1,0.8660254,-0.5 }, { 1,-0.8660254,-0.5 }, { 1,0,1 } }, - { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; - float cam[2][4], lab[2][4], sum[2], chratio; - - if ((unsigned) (colors-3) > 1) return; -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("Blending highlights...\n")); -#endif - FORCC if (clip > (i = 65535*pre_mul[c])) clip = i; -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_HIGHLIGHTS,0,2); -#endif - for (row=0; row < height; row++) - for (col=0; col < width; col++) { - FORCC if (image[row*width+col][c] > clip) break; - if (c == colors) continue; - FORCC { - cam[0][c] = image[row*width+col][c]; - cam[1][c] = MIN(cam[0][c],clip); - } - for (i=0; i < 2; i++) { - FORCC for (lab[i][c]=j=0; j < colors; j++) - lab[i][c] += trans[colors-3][c][j] * cam[i][j]; - for (sum[i]=0,c=1; c < colors; c++) - sum[i] += SQR(lab[i][c]); - } - chratio = sqrt(sum[1]/sum[0]); - for (c=1; c < colors; c++) - lab[0][c] *= chratio; - FORCC for (cam[0][c]=j=0; j < colors; j++) - cam[0][c] += itrans[colors-3][c][j] * lab[0][j]; - FORCC image[row*width+col][c] = cam[0][c] / colors; - } -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_HIGHLIGHTS,1,2); -#endif -} - -#define SCALE (4 >> shrink) -void CLASS recover_highlights() -{ - float *map, sum, wgt, grow; - int hsat[4], count, spread, change, val, i; - unsigned high, wide, mrow, mcol, row, col, kc, c, d, y, x; - ushort *pixel; - static const signed char dir[8][2] = - { {-1,-1}, {-1,0}, {-1,1}, {0,1}, {1,1}, {1,0}, {1,-1}, {0,-1} }; - -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("Rebuilding highlights...\n")); -#endif - - grow = pow (2.0, 4.0-highlight); - FORCC hsat[c] = 32000 * pre_mul[c]; - for (kc=0, c=1; c < colors; c++) - if (pre_mul[kc] < pre_mul[c]) kc = c; - high = height / SCALE; - wide = width / SCALE; - map = (float *) calloc (high*wide, sizeof *map); - merror (map, "recover_highlights()"); - FORCC if (c != kc) { -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_HIGHLIGHTS,c-1,colors-1); -#endif - memset (map, 0, high*wide*sizeof *map); - for (mrow=0; mrow < high; mrow++) - for (mcol=0; mcol < wide; mcol++) { - sum = wgt = count = 0; - for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) - for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { - pixel = image[row*width+col]; - if (pixel[c] / hsat[c] == 1 && pixel[kc] > 24000) { - sum += pixel[c]; - wgt += pixel[kc]; - count++; - } - } - if (count == SCALE*SCALE) - map[mrow*wide+mcol] = sum / wgt; - } - for (spread = 32/grow; spread--; ) { - for (mrow=0; mrow < high; mrow++) - for (mcol=0; mcol < wide; mcol++) { - if (map[mrow*wide+mcol]) continue; - sum = count = 0; - for (d=0; d < 8; d++) { - y = mrow + dir[d][0]; - x = mcol + dir[d][1]; - if (y < high && x < wide && map[y*wide+x] > 0) { - sum += (1 + (d & 1)) * map[y*wide+x]; - count += 1 + (d & 1); - } - } - if (count > 3) - map[mrow*wide+mcol] = - (sum+grow) / (count+grow); - } - for (change=i=0; i < high*wide; i++) - if (map[i] < 0) { - map[i] = -map[i]; - change = 1; - } - if (!change) break; - } - for (i=0; i < high*wide; i++) - if (map[i] == 0) map[i] = 1; - for (mrow=0; mrow < high; mrow++) - for (mcol=0; mcol < wide; mcol++) { - for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) - for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { - pixel = image[row*width+col]; - if (pixel[c] / hsat[c] > 1) { - val = pixel[kc] * map[mrow*wide+mcol]; - if (pixel[c] < val) pixel[c] = CLIP(val); - } - } - } - } - free (map); -} -#undef SCALE - -void CLASS tiff_get (unsigned base, - unsigned *tag, unsigned *type, unsigned *len, unsigned *save) -{ - *tag = get2(); - *type = get2(); - *len = get4(); - *save = ftell(ifp) + 4; - if (*len * ("11124811248488"[*type < 14 ? *type:0]-'0') > 4) - fseek (ifp, get4()+base, SEEK_SET); -} - -void CLASS parse_thumb_note (int base, unsigned toff, unsigned tlen) -{ - unsigned entries, tag, type, len, save; - - entries = get2(); - while (entries--) { - tiff_get (base, &tag, &type, &len, &save); - if (tag == toff) thumb_offset = get4()+base; - if (tag == tlen) thumb_length = get4(); - fseek (ifp, save, SEEK_SET); - } -} - -void CLASS parse_makernote (int base, int uptag) -{ - static const uchar xlat[2][256] = { - { 0xc1,0xbf,0x6d,0x0d,0x59,0xc5,0x13,0x9d,0x83,0x61,0x6b,0x4f,0xc7,0x7f,0x3d,0x3d, - 0x53,0x59,0xe3,0xc7,0xe9,0x2f,0x95,0xa7,0x95,0x1f,0xdf,0x7f,0x2b,0x29,0xc7,0x0d, - 0xdf,0x07,0xef,0x71,0x89,0x3d,0x13,0x3d,0x3b,0x13,0xfb,0x0d,0x89,0xc1,0x65,0x1f, - 0xb3,0x0d,0x6b,0x29,0xe3,0xfb,0xef,0xa3,0x6b,0x47,0x7f,0x95,0x35,0xa7,0x47,0x4f, - 0xc7,0xf1,0x59,0x95,0x35,0x11,0x29,0x61,0xf1,0x3d,0xb3,0x2b,0x0d,0x43,0x89,0xc1, - 0x9d,0x9d,0x89,0x65,0xf1,0xe9,0xdf,0xbf,0x3d,0x7f,0x53,0x97,0xe5,0xe9,0x95,0x17, - 0x1d,0x3d,0x8b,0xfb,0xc7,0xe3,0x67,0xa7,0x07,0xf1,0x71,0xa7,0x53,0xb5,0x29,0x89, - 0xe5,0x2b,0xa7,0x17,0x29,0xe9,0x4f,0xc5,0x65,0x6d,0x6b,0xef,0x0d,0x89,0x49,0x2f, - 0xb3,0x43,0x53,0x65,0x1d,0x49,0xa3,0x13,0x89,0x59,0xef,0x6b,0xef,0x65,0x1d,0x0b, - 0x59,0x13,0xe3,0x4f,0x9d,0xb3,0x29,0x43,0x2b,0x07,0x1d,0x95,0x59,0x59,0x47,0xfb, - 0xe5,0xe9,0x61,0x47,0x2f,0x35,0x7f,0x17,0x7f,0xef,0x7f,0x95,0x95,0x71,0xd3,0xa3, - 0x0b,0x71,0xa3,0xad,0x0b,0x3b,0xb5,0xfb,0xa3,0xbf,0x4f,0x83,0x1d,0xad,0xe9,0x2f, - 0x71,0x65,0xa3,0xe5,0x07,0x35,0x3d,0x0d,0xb5,0xe9,0xe5,0x47,0x3b,0x9d,0xef,0x35, - 0xa3,0xbf,0xb3,0xdf,0x53,0xd3,0x97,0x53,0x49,0x71,0x07,0x35,0x61,0x71,0x2f,0x43, - 0x2f,0x11,0xdf,0x17,0x97,0xfb,0x95,0x3b,0x7f,0x6b,0xd3,0x25,0xbf,0xad,0xc7,0xc5, - 0xc5,0xb5,0x8b,0xef,0x2f,0xd3,0x07,0x6b,0x25,0x49,0x95,0x25,0x49,0x6d,0x71,0xc7 }, - { 0xa7,0xbc,0xc9,0xad,0x91,0xdf,0x85,0xe5,0xd4,0x78,0xd5,0x17,0x46,0x7c,0x29,0x4c, - 0x4d,0x03,0xe9,0x25,0x68,0x11,0x86,0xb3,0xbd,0xf7,0x6f,0x61,0x22,0xa2,0x26,0x34, - 0x2a,0xbe,0x1e,0x46,0x14,0x68,0x9d,0x44,0x18,0xc2,0x40,0xf4,0x7e,0x5f,0x1b,0xad, - 0x0b,0x94,0xb6,0x67,0xb4,0x0b,0xe1,0xea,0x95,0x9c,0x66,0xdc,0xe7,0x5d,0x6c,0x05, - 0xda,0xd5,0xdf,0x7a,0xef,0xf6,0xdb,0x1f,0x82,0x4c,0xc0,0x68,0x47,0xa1,0xbd,0xee, - 0x39,0x50,0x56,0x4a,0xdd,0xdf,0xa5,0xf8,0xc6,0xda,0xca,0x90,0xca,0x01,0x42,0x9d, - 0x8b,0x0c,0x73,0x43,0x75,0x05,0x94,0xde,0x24,0xb3,0x80,0x34,0xe5,0x2c,0xdc,0x9b, - 0x3f,0xca,0x33,0x45,0xd0,0xdb,0x5f,0xf5,0x52,0xc3,0x21,0xda,0xe2,0x22,0x72,0x6b, - 0x3e,0xd0,0x5b,0xa8,0x87,0x8c,0x06,0x5d,0x0f,0xdd,0x09,0x19,0x93,0xd0,0xb9,0xfc, - 0x8b,0x0f,0x84,0x60,0x33,0x1c,0x9b,0x45,0xf1,0xf0,0xa3,0x94,0x3a,0x12,0x77,0x33, - 0x4d,0x44,0x78,0x28,0x3c,0x9e,0xfd,0x65,0x57,0x16,0x94,0x6b,0xfb,0x59,0xd0,0xc8, - 0x22,0x36,0xdb,0xd2,0x63,0x98,0x43,0xa1,0x04,0x87,0x86,0xf7,0xa6,0x26,0xbb,0xd6, - 0x59,0x4d,0xbf,0x6a,0x2e,0xaa,0x2b,0xef,0xe6,0x78,0xb6,0x4e,0xe0,0x2f,0xdc,0x7c, - 0xbe,0x57,0x19,0x32,0x7e,0x2a,0xd0,0xb8,0xba,0x29,0x00,0x3c,0x52,0x7d,0xa8,0x49, - 0x3b,0x2d,0xeb,0x25,0x49,0xfa,0xa3,0xaa,0x39,0xa7,0xc5,0xa7,0x50,0x11,0x36,0xfb, - 0xc6,0x67,0x4a,0xf5,0xa5,0x12,0x65,0x7e,0xb0,0xdf,0xaf,0x4e,0xb3,0x61,0x7f,0x2f } }; - unsigned offset=0, entries, tag, type, len, save, c; - unsigned ver97=0, serial=0, i, wbi=0, wb[4]={0,0,0,0}; - uchar buf97[324], ci, cj, ck; - short morder, sorder=order; - char buf[10]; -/* - The MakerNote might have its own TIFF header (possibly with - its own byte-order!), or it might just be a table. - */ - if (!strcmp(make,"Nokia")) return; - fread (buf, 1, 10, ifp); - if (!strncmp (buf,"KDK" ,3) || /* these aren't TIFF tables */ - !strncmp (buf,"VER" ,3) || - !strncmp (buf,"IIII",4) || - !strncmp (buf,"MMMM",4)) return; - if (!strncmp (buf,"KC" ,2) || /* Konica KD-400Z, KD-510Z */ - !strncmp (buf,"MLY" ,3)) { /* Minolta DiMAGE G series */ - order = 0x4d4d; - while ((i=ftell(ifp)) < data_offset && i < 16384) { - wb[0] = wb[2]; wb[2] = wb[1]; wb[1] = wb[3]; - wb[3] = get2(); - if (wb[1] == 256 && wb[3] == 256 && - wb[0] > 256 && wb[0] < 640 && wb[2] > 256 && wb[2] < 640) - FORC4 cam_mul[c] = wb[c]; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - goto quit; - } - if (!strcmp (buf,"Nikon")) { - base = ftell(ifp); - order = get2(); - if (get2() != 42) goto quit; - offset = get4(); - fseek (ifp, offset-8, SEEK_CUR); - } else if (!strcmp (buf,"OLYMPUS")) { - base = ftell(ifp)-10; - fseek (ifp, -2, SEEK_CUR); - order = get2(); get2(); - } else if (!strncmp (buf,"SONY",4) || - !strcmp (buf,"Panasonic")) { - goto nf; - } else if (!strncmp (buf,"FUJIFILM",8)) { - base = ftell(ifp)-10; -nf: order = 0x4949; - fseek (ifp, 2, SEEK_CUR); - } else if (!strcmp (buf,"OLYMP") || - !strcmp (buf,"LEICA") || - !strcmp (buf,"Ricoh") || - !strcmp (buf,"EPSON")) - fseek (ifp, -2, SEEK_CUR); - else if (!strcmp (buf,"AOC") || - !strcmp (buf,"QVC")) - fseek (ifp, -4, SEEK_CUR); - else { - fseek (ifp, -10, SEEK_CUR); - if (!strncmp(make,"SAMSUNG",7)) - base = ftell(ifp); - } - entries = get2(); - if (entries > 1000) return; - morder = order; - while (entries--) { - order = morder; - tiff_get (base, &tag, &type, &len, &save); - tag |= uptag << 16; - if (tag == 2 && strstr(make,"NIKON") && !iso_speed) - iso_speed = (get2(),get2()); - if (tag == 4 && len > 26 && len < 35) { - if ((i=(get4(),get2())) != 0x7fff && !iso_speed) - iso_speed = 50 * pow (2.0, i/32.0 - 4); - if ((i=(get2(),get2())) != 0x7fff && !aperture) - aperture = pow (2.0, i/64.0); - if ((i=get2()) != 0xffff && !shutter) - shutter = pow (2.0, (short) i/-32.0); - wbi = (get2(),get2()); - shot_order = (get2(),get2()); - } - if ((tag == 4 || tag == 0x114) && !strncmp(make,"KONICA",6)) { - fseek (ifp, tag == 4 ? 140:160, SEEK_CUR); - switch (get2()) { - case 72: flip = 0; break; - case 76: flip = 6; break; - case 82: flip = 5; break; - } - } - if (tag == 7 && type == 2 && len > 20) - fgets (model2, 64, ifp); - if (tag == 8 && type == 4) - shot_order = get4(); - if (tag == 9 && !strcmp(make,"Canon")) - fread (artist, 64, 1, ifp); - if (tag == 0xc && len == 4) { - cam_mul[0] = getreal(type); - cam_mul[2] = getreal(type); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if (tag == 0xd && type == 7 && get2() == 0xaaaa) { - for (c=i=2; (ushort) c != 0xbbbb && i < len; i++) - c = c << 8 | fgetc(ifp); - while ((i+=4) < len-5) - if (get4() == 257 && (i=len) && (c = (get4(),fgetc(ifp))) < 3) - flip = "065"[c]-'0'; - } - if (tag == 0x10 && type == 4) - unique_id = get4(); - if (tag == 0x11 && is_raw && !strncmp(make,"NIKON",5)) { - fseek (ifp, get4()+base, SEEK_SET); - parse_tiff_ifd (base); - } - if (tag == 0x14 && type == 7) { - if (len == 2560) { - fseek (ifp, 1248, SEEK_CUR); - goto get2_256; - } - fread (buf, 1, 10, ifp); - if (!strncmp(buf,"NRW ",4)) { - fseek (ifp, strcmp(buf+4,"0100") ? 46:1546, SEEK_CUR); - cam_mul[0] = get4() << 2; - cam_mul[1] = get4() + get4(); - cam_mul[2] = get4() << 2; - } - } - if (tag == 0x15 && type == 2 && is_raw) - fread (model, 64, 1, ifp); - if (strstr(make,"PENTAX")) { - if (tag == 0x1b) tag = 0x1018; - if (tag == 0x1c) tag = 0x1017; - } - if (tag == 0x1d) - while ((c = fgetc(ifp)) && c != EOF) - serial = serial*10 + (isdigit(c) ? c - '0' : c % 10); - if (tag == 0x81 && type == 4) { - data_offset = get4(); - fseek (ifp, data_offset + 41, SEEK_SET); - raw_height = get2() * 2; - raw_width = get2(); - filters = 0x61616161; - } - if (tag == 0x29 && type == 1) { - c = wbi < 18 ? "012347800000005896"[wbi]-'0' : 0; - fseek (ifp, 8 + c*32, SEEK_CUR); - FORC4 cam_mul[c ^ (c >> 1) ^ 1] = get4(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if ((tag == 0x81 && type == 7) || - (tag == 0x100 && type == 7) || - (tag == 0x280 && type == 1)) { - thumb_offset = ftell(ifp); - thumb_length = len; - } - if (tag == 0x88 && type == 4 && (thumb_offset = get4())) - thumb_offset += base; - if (tag == 0x89 && type == 4) - thumb_length = get4(); - if (tag == 0x8c || tag == 0x96) - meta_offset = ftell(ifp); - if (tag == 0x97) { - for (i=0; i < 4; i++) - ver97 = ver97 * 10 + fgetc(ifp)-'0'; - switch (ver97) { - case 100: - fseek (ifp, 68, SEEK_CUR); - FORC4 cam_mul[(c >> 1) | ((c & 1) << 1)] = get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - break; - case 102: - fseek (ifp, 6, SEEK_CUR); - goto get2_rggb; - case 103: - fseek (ifp, 16, SEEK_CUR); - FORC4 cam_mul[c] = get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if (ver97 >= 200) { - if (ver97 != 205) fseek (ifp, 280, SEEK_CUR); - fread (buf97, 324, 1, ifp); - } - } - if (tag == 0xa1 && type == 7) { - order = 0x4949; - fseek (ifp, 140, SEEK_CUR); - FORC3 cam_mul[c] = get4(); - } - if (tag == 0xa4 && type == 3) { - fseek (ifp, wbi*48, SEEK_CUR); - FORC3 cam_mul[c] = get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if (tag == 0xa7 && (unsigned) (ver97-200) < 17) { - ci = xlat[0][serial & 0xff]; - cj = xlat[1][fgetc(ifp)^fgetc(ifp)^fgetc(ifp)^fgetc(ifp)]; - ck = 0x60; - for (i=0; i < 324; i++) - buf97[i] ^= (cj += ci * ck++); - i = "66666>666;6A;:;55"[ver97-200] - '0'; - FORC4 cam_mul[c ^ (c >> 1) ^ (i & 1)] = - sget2 (buf97 + (i & -2) + c*2); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if (tag == 0x200 && len == 3) - shot_order = (get4(),get4()); - if (tag == 0x200 && len == 4) - FORC4 cblack[c ^ c >> 1] = get2(); - if (tag == 0x201 && len == 4) - goto get2_rggb; - if (tag == 0x220 && type == 7) - meta_offset = ftell(ifp); - if (tag == 0x401 && type == 4 && len == 4) - FORC4 cblack[c ^ c >> 1] = get4(); - if (tag == 0xe01) { /* Nikon Capture Note */ - order = 0x4949; - fseek (ifp, 22, SEEK_CUR); - for (offset=22; offset+22 < len; offset += 22+i) { - tag = get4(); - fseek (ifp, 14, SEEK_CUR); - i = get4()-4; - if (tag == 0x76a43207) flip = get2(); - else fseek (ifp, i, SEEK_CUR); - } - } - if (tag == 0xe80 && len == 256 && type == 7) { - fseek (ifp, 48, SEEK_CUR); - cam_mul[0] = get2() * 508 * 1.078 / 0x10000; - cam_mul[2] = get2() * 382 * 1.173 / 0x10000; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if (tag == 0xf00 && type == 7) { - if (len == 614) - fseek (ifp, 176, SEEK_CUR); - else if (len == 734 || len == 1502) - fseek (ifp, 148, SEEK_CUR); - else goto next; - goto get2_256; - } - if ((tag == 0x1011 && len == 9) || tag == 0x20400200) - { - for (i=0; i < 3; i++) - FORC3 cmatrix[i][c] = ((short) get2()) / 256.0; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cmatrix_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if ((tag == 0x1012 || tag == 0x20400600) && len == 4) - FORC4 cblack[c ^ c >> 1] = get2(); - if (tag == 0x1017 || tag == 0x20400100) - { - cam_mul[0] = get2() / 256.0; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if (tag == 0x1018 || tag == 0x20400100) - { - cam_mul[2] = get2() / 256.0; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if (tag == 0x2011 && len == 2) { -get2_256: - order = 0x4d4d; - cam_mul[0] = get2() / 256.0; - cam_mul[2] = get2() / 256.0; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if ((tag | 0x70) == 0x2070 && type == 4) - fseek (ifp, get4()+base, SEEK_SET); - if (tag == 0x2010 && type != 7) - load_raw = &CLASS olympus_load_raw; - if (tag == 0x2020) - parse_thumb_note (base, 257, 258); - if (tag == 0x2040) - parse_makernote (base, 0x2040); - if (tag == 0xb028) { - fseek (ifp, get4()+base, SEEK_SET); - parse_thumb_note (base, 136, 137); - } - if (tag == 0x4001 && len > 500) { - i = len == 582 ? 50 : len == 653 ? 68 : len == 5120 ? 142 : 126; - fseek (ifp, i, SEEK_CUR); -get2_rggb: - FORC4 cam_mul[c ^ (c >> 1)] = get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif -#if 1 - i = len == 1312 ? 112:22; - fseek (ifp, i, SEEK_CUR); -#else - fseek (ifp, 22, SEEK_CUR); -#endif - FORC4 sraw_mul[c ^ (c >> 1)] = get2(); - } - if (tag == 0xa021) - FORC4 cam_mul[c ^ (c >> 1)] = get4(); - if (tag == 0xa028) - FORC4 cam_mul[c ^ (c >> 1)] -= get4(); -next: - fseek (ifp, save, SEEK_SET); - } -quit: - order = sorder; -} - -/* - Since the TIFF DateTime string has no timezone information, - assume that the camera's clock was set to Universal Time. - */ -void CLASS get_timestamp (int reversed) -{ - struct tm t; - char str[20]; - int i; - - str[19] = 0; - if (reversed) - for (i=19; i--; ) str[i] = fgetc(ifp); - else - fread (str, 19, 1, ifp); - memset (&t, 0, sizeof t); - if (sscanf (str, "%d:%d:%d %d:%d:%d", &t.tm_year, &t.tm_mon, - &t.tm_mday, &t.tm_hour, &t.tm_min, &t.tm_sec) != 6) - return; - t.tm_year -= 1900; - t.tm_mon -= 1; - t.tm_isdst = -1; - if (mktime(&t) > 0) - timestamp = mktime(&t); -} - -void CLASS parse_exif (int base) -{ - unsigned kodak, entries, tag, type, len, save, c; - double expo; - - kodak = !strncmp(make,"EASTMAN",7) && tiff_nifds < 3; - entries = get2(); - while (entries--) { - tiff_get (base, &tag, &type, &len, &save); - switch (tag) { - case 33434: shutter = getreal(type); break; - case 33437: aperture = getreal(type); break; - case 34855: iso_speed = get2(); break; - case 36867: - case 36868: get_timestamp(0); break; - case 37377: if ((expo = -getreal(type)) < 128) - shutter = pow (2.0, expo); break; - case 37378: aperture = pow (2.0, getreal(type)/2); break; - case 37386: focal_len = getreal(type); break; - case 37500: parse_makernote (base, 0); break; - case 40962: if (kodak) raw_width = get4(); break; - case 40963: if (kodak) raw_height = get4(); break; - case 41730: - if (get4() == 0x20002) - for (exif_cfa=c=0; c < 8; c+=2) - exif_cfa |= fgetc(ifp) * 0x01010101 << c; - } - fseek (ifp, save, SEEK_SET); - } -} - -void CLASS parse_gps (int base) -{ - unsigned entries, tag, type, len, save, c; - - entries = get2(); - while (entries--) { - tiff_get (base, &tag, &type, &len, &save); - switch (tag) { - case 1: case 3: case 5: - gpsdata[29+tag/2] = getc(ifp); break; - case 2: case 4: case 7: - FORC(6) gpsdata[tag/3*6+c] = get4(); break; - case 6: - FORC(2) gpsdata[18+c] = get4(); break; - case 18: case 29: - fgets ((char *) (gpsdata+14+tag/3), MIN(len,12), ifp); - } - fseek (ifp, save, SEEK_SET); - } -} - -void CLASS romm_coeff (float romm_cam[3][3]) -{ - static const float rgb_romm[3][3] = /* ROMM == Kodak ProPhoto */ - { { 2.034193, -0.727420, -0.306766 }, - { -0.228811, 1.231729, -0.002922 }, - { -0.008565, -0.153273, 1.161839 } }; - int i, j, k; - - for (i=0; i < 3; i++) - for (j=0; j < 3; j++) - for (cmatrix[i][j] = k=0; k < 3; k++) - cmatrix[i][j] += rgb_romm[i][k] * romm_cam[k][j]; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cmatrix_state = LIBRAW_COLORSTATE_CALCULATED; -#endif -} - -void CLASS parse_mos (int offset) -{ - char data[40]; - int skip, from, i, c, neut[4], planes=0, frot=0; - static const char *mod[] = - { "","DCB2","Volare","Cantare","CMost","Valeo 6","Valeo 11","Valeo 22", - "Valeo 11p","Valeo 17","","Aptus 17","Aptus 22","Aptus 75","Aptus 65", - "Aptus 54S","Aptus 65S","Aptus 75S","AFi 5","AFi 6","AFi 7", - "AFi-II 7","","","AFi-II 6","","","AFi-II 10","AFi-II 5" - "","","","","","AFi-II 10R","AFi-II 8","","AFi-II 12"}; - - float romm_cam[3][3]; - - fseek (ifp, offset, SEEK_SET); - while (1) { - if (get4() != 0x504b5453) break; - get4(); - fread (data, 1, 40, ifp); - skip = get4(); - from = ftell(ifp); - if (!strcmp(data,"JPEG_preview_data")) { - thumb_offset = from; - thumb_length = skip; - } - if (!strcmp(data,"icc_camera_profile")) { - profile_offset = from; - profile_length = skip; - } - if (!strcmp(data,"ShootObj_back_type")) { - fscanf (ifp, "%d", &i); - if ((unsigned) i < sizeof mod / sizeof (*mod)) - strcpy (model, mod[i]); - } - if (!strcmp(data,"icc_camera_to_tone_matrix")) { - for (i=0; i < 9; i++) - romm_cam[0][i] = int_to_float(get4()); - romm_coeff (romm_cam); - } - if (!strcmp(data,"CaptProf_color_matrix")) { - for (i=0; i < 9; i++) - fscanf (ifp, "%f", &romm_cam[0][i]); - romm_coeff (romm_cam); - } - if (!strcmp(data,"CaptProf_number_of_planes")) - fscanf (ifp, "%d", &planes); - if (!strcmp(data,"CaptProf_raw_data_rotation")) - fscanf (ifp, "%d", &flip); - if (!strcmp(data,"CaptProf_mosaic_pattern")) - FORC4 { - fscanf (ifp, "%d", &i); - if (i == 1) frot = c ^ (c >> 1); - } - if (!strcmp(data,"ImgProf_rotation_angle")) { - fscanf (ifp, "%d", &i); - flip = i - flip; - } - if (!strcmp(data,"NeutObj_neutrals") && !cam_mul[0]) { - FORC4 fscanf (ifp, "%d", neut+c); - FORC3 cam_mul[c] = (float) neut[0] / neut[c+1]; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if (!strcmp(data,"Rows_data")) - load_flags = get4(); - parse_mos (from); - fseek (ifp, skip+from, SEEK_SET); - } - if (planes) - filters = (planes == 1) * 0x01010101 * - (uchar) "\x94\x61\x16\x49"[(flip/90 + frot) & 3]; -} - -void CLASS linear_table (unsigned len) -{ - int i; - if (len > 0x1000) len = 0x1000; - read_shorts (curve, len); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.curve_state = LIBRAW_COLORSTATE_LOADED; -#endif - for (i=len; i < 0x1000; i++) - curve[i] = curve[i-1]; - maximum = curve[0xfff]; -} - -void CLASS parse_kodak_ifd (int base) -{ - unsigned entries, tag, type, len, save; - int i, c, wbi=-2, wbtemp=6500; - float mul[3]={1,1,1}, num; - static const int wbtag[] = { 64037,64040,64039,64041,-1,-1,64042 }; - - entries = get2(); - if (entries > 1024) return; - while (entries--) { - tiff_get (base, &tag, &type, &len, &save); - if (tag == 1020) wbi = getint(type); - if (tag == 1021 && len == 72) { /* WB set in software */ - fseek (ifp, 40, SEEK_CUR); - FORC3 cam_mul[c] = 2048.0 / get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - wbi = -2; - } - if (tag == 2118) wbtemp = getint(type); - if (tag == 2130 + wbi) - FORC3 mul[c] = getreal(type); - if (tag == 2140 + wbi && wbi >= 0) - { - FORC3 { - for (num=i=0; i < 4; i++) - num += getreal(type) * pow (wbtemp/100.0, i); - cam_mul[c] = 2048 / (num * mul[c]); - } -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if (tag == 2317) linear_table (len); - if (tag == 6020) iso_speed = getint(type); - if (tag == 64013) wbi = fgetc(ifp); - if ((unsigned) wbi < 7 && tag == wbtag[wbi]) - FORC3 cam_mul[c] = get4(); - if (tag == 64019) width = getint(type); - if (tag == 64020) height = (getint(type)+1) & -2; - fseek (ifp, save, SEEK_SET); - } -} - -int CLASS parse_tiff_ifd (int base) -{ - unsigned entries, tag, type, len, plen=16, save; - int ifd, use_cm=0, cfa, i, j, c, ima_len=0; - int blrr=1, blrc=1, dblack[] = { 0,0,0,0 }; - char software[64], *cbuf, *cp; - uchar cfa_pat[16], cfa_pc[] = { 0,1,2,3 }, tab[256]; - double cc[4][4], cm[4][3], cam_xyz[4][3], num; - double ab[]={ 1,1,1,1 }, asn[] = { 0,0,0,0 }, xyz[] = { 1,1,1 }; - unsigned sony_curve[] = { 0,0,0,0,0,4095 }; - unsigned *buf, sony_offset=0, sony_length=0, sony_key=0; - struct jhead jh; -#ifndef LIBRAW_LIBRARY_BUILD - FILE *sfp; -#endif - - if (tiff_nifds >= sizeof tiff_ifd / sizeof tiff_ifd[0]) - return 1; - ifd = tiff_nifds++; - for (j=0; j < 4; j++) - for (i=0; i < 4; i++) - cc[j][i] = i == j; - entries = get2(); - if (entries > 512) return 1; - while (entries--) { - tiff_get (base, &tag, &type, &len, &save); - switch (tag) { - case 5: width = get2(); break; - case 6: height = get2(); break; - case 7: width += get2(); break; - case 9: filters = get2(); break; - case 17: case 18: - if (type == 3 && len == 1) - { - cam_mul[(tag-17)*2] = get2() / 256.0; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - break; - case 23: - if (type == 3) iso_speed = get2(); - break; - case 36: case 37: case 38: - cam_mul[tag-0x24] = get2(); - break; - case 39: - if (len < 50 || cam_mul[0]) break; - fseek (ifp, 12, SEEK_CUR); - FORC3 cam_mul[c] = get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - break; - case 46: - if (type != 7 || fgetc(ifp) != 0xff || fgetc(ifp) != 0xd8) break; - thumb_offset = ftell(ifp) - 2; - thumb_length = len; - break; - case 61440: /* Fuji HS10 table */ - parse_tiff_ifd (base); - break; - case 2: case 256: case 61441: /* ImageWidth */ - tiff_ifd[ifd].t_width = getint(type); - break; - case 3: case 257: case 61442: /* ImageHeight */ - tiff_ifd[ifd].t_height = getint(type); - break; - case 258: /* BitsPerSample */ - case 61443: - tiff_ifd[ifd].samples = len & 7; - tiff_ifd[ifd].bps = getint(type); - break; - case 61446: - raw_height = 0; - load_raw = &CLASS packed_load_raw; - load_flags = get4() && (filters=0x16161616) ? 24:80; - break; - case 259: /* Compression */ - tiff_ifd[ifd].comp = getint(type); - break; - case 262: /* PhotometricInterpretation */ - tiff_ifd[ifd].phint = get2(); - break; - case 270: /* ImageDescription */ - fread (desc, 512, 1, ifp); - break; - case 271: /* Make */ - fgets (make, 64, ifp); - break; - case 272: /* Model */ - fgets (model, 64, ifp); - break; - case 280: /* Panasonic RW2 offset */ - if (type != 4) break; - load_raw = &CLASS panasonic_load_raw; - load_flags = 0x2008; - case 273: /* StripOffset */ - case 513: /* JpegIFOffset */ - case 61447: - tiff_ifd[ifd].offset = get4()+base; - if (!tiff_ifd[ifd].bps && tiff_ifd[ifd].offset > 0) { - fseek (ifp, tiff_ifd[ifd].offset, SEEK_SET); - if (ljpeg_start (&jh, 1)) { - tiff_ifd[ifd].comp = 6; - tiff_ifd[ifd].t_width = jh.wide; - tiff_ifd[ifd].t_height = jh.high; - tiff_ifd[ifd].bps = jh.bits; - tiff_ifd[ifd].samples = jh.clrs; - if (!(jh.sraw || (jh.clrs & 1))) - tiff_ifd[ifd].t_width *= jh.clrs; - i = order; - parse_tiff (tiff_ifd[ifd].offset + 12); - order = i; - } - } - break; - case 274: /* Orientation */ - tiff_ifd[ifd].t_flip = "50132467"[get2() & 7]-'0'; - break; - case 277: /* SamplesPerPixel */ - tiff_ifd[ifd].samples = getint(type) & 7; - break; - case 279: /* StripByteCounts */ - case 514: - case 61448: - tiff_ifd[ifd].bytes = get4(); - break; - case 61454: - FORC3 cam_mul[(4-c) % 3] = getint(type); - break; - case 305: case 11: /* Software */ - fgets (software, 64, ifp); - if (!strncmp(software,"Adobe",5) || - !strncmp(software,"dcraw",5) || - !strncmp(software,"UFRaw",5) || - !strncmp(software,"Bibble",6) || - !strncmp(software,"Nikon Scan",10) || - !strcmp (software,"Digital Photo Professional")) - is_raw = 0; - break; - case 306: /* DateTime */ - get_timestamp(0); - break; - case 315: /* Artist */ - fread (artist, 64, 1, ifp); - break; - case 322: /* TileWidth */ - tile_width = getint(type); - break; - case 323: /* TileLength */ - tile_length = getint(type); - break; - case 324: /* TileOffsets */ - tiff_ifd[ifd].offset = len > 1 ? ftell(ifp) : get4(); - if (len == 4) { - load_raw = &CLASS sinar_4shot_load_raw; - is_raw = 5; - } - break; -#ifdef LIBRAW_LIBRARY_BUILD - case 325: /* TileByteCount */ - tiff_ifd[ifd].tile_maxbytes = 0; - for(int jj=0;jj tiff_ifd[ifd].tile_maxbytes) tiff_ifd[ifd].tile_maxbytes=s; - } - break; -#endif - case 330: /* SubIFDs */ - if (!strcmp(model,"DSLR-A100") && tiff_ifd[ifd].t_width == 3872) { - load_raw = &CLASS sony_arw_load_raw; - data_offset = get4()+base; - ifd++; break; - } - while (len--) { - i = ftell(ifp); - fseek (ifp, get4()+base, SEEK_SET); - if (parse_tiff_ifd (base)) break; - fseek (ifp, i+4, SEEK_SET); - } - break; - case 400: - strcpy (make, "Sarnoff"); - maximum = 0xfff; - break; - case 28688: - FORC4 sony_curve[c+1] = get2() >> 2 & 0xfff; - for (i=0; i < 5; i++) - for (j = sony_curve[i]+1; j <= sony_curve[i+1]; j++) - curve[j] = curve[j-1] + (1 << i); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.curve_state = LIBRAW_COLORSTATE_LOADED; -#endif - break; - case 29184: sony_offset = get4(); break; - case 29185: sony_length = get4(); break; - case 29217: sony_key = get4(); break; - case 29264: - parse_minolta (ftell(ifp)); - raw_width = 0; - break; - case 29443: - FORC4 cam_mul[c ^ (c < 2)] = get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - break; - case 29459: - FORC4 cam_mul[c] = get2(); - i = (cam_mul[1] == 1024 && cam_mul[2] == 1024) << 1; - SWAP (cam_mul[i],cam_mul[i+1]) -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - break; - case 33405: /* Model2 */ - fgets (model2, 64, ifp); - break; - case 33422: /* CFAPattern */ - case 64777: /* Kodak P-series */ - if ((plen=len) > 16) plen = 16; - fread (cfa_pat, 1, plen, ifp); - for (colors=cfa=i=0; i < plen; i++) { - colors += !(cfa & (1 << cfa_pat[i])); - cfa |= 1 << cfa_pat[i]; - } - if (cfa == 070) memcpy (cfa_pc,"\003\004\005",3); /* CMY */ - if (cfa == 072) memcpy (cfa_pc,"\005\003\004\001",4); /* GMCY */ - goto guess_cfa_pc; - case 33424: - case 65024: - fseek (ifp, get4()+base, SEEK_SET); - parse_kodak_ifd (base); - break; - case 33434: /* ExposureTime */ - shutter = getreal(type); - break; - case 33437: /* FNumber */ - aperture = getreal(type); - break; - case 34306: /* Leaf white balance */ - FORC4 cam_mul[c ^ 1] = 4096.0 / get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - break; - case 34307: /* Leaf CatchLight color matrix */ - fread (software, 1, 7, ifp); - if (strncmp(software,"MATRIX",6)) break; - colors = 4; - for (raw_color = i=0; i < 3; i++) { - FORC4 fscanf (ifp, "%f", &rgb_cam[i][c^1]); - if (!use_camera_wb) continue; - num = 0; - FORC4 num += rgb_cam[i][c]; - FORC4 rgb_cam[i][c] /= num; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.rgb_cam_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - break; - case 34310: /* Leaf metadata */ - parse_mos (ftell(ifp)); - case 34303: - strcpy (make, "Leaf"); - break; - case 34665: /* EXIF tag */ - fseek (ifp, get4()+base, SEEK_SET); - parse_exif (base); - break; - case 34853: /* GPSInfo tag */ - fseek (ifp, get4()+base, SEEK_SET); - parse_gps (base); - break; - case 34675: /* InterColorProfile */ - case 50831: /* AsShotICCProfile */ - profile_offset = ftell(ifp); - profile_length = len; - break; - case 37122: /* CompressedBitsPerPixel */ - kodak_cbpp = get4(); - break; - case 37386: /* FocalLength */ - focal_len = getreal(type); - break; - case 37393: /* ImageNumber */ - shot_order = getint(type); - break; - case 37400: /* old Kodak KDC tag */ - for (raw_color = i=0; i < 3; i++) { - getreal(type); - FORC3 rgb_cam[i][c] = getreal(type); - } -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.rgb_cam_state = LIBRAW_COLORSTATE_LOADED; -#endif - break; - case 46275: /* Imacon tags */ - strcpy (make, "Imacon"); - data_offset = ftell(ifp); - ima_len = len; - break; - case 46279: - if (!ima_len) break; - fseek (ifp, 38, SEEK_CUR); - case 46274: - fseek (ifp, 40, SEEK_CUR); - raw_width = get4(); - raw_height = get4(); - left_margin = get4() & 7; - width = raw_width - left_margin - (get4() & 7); - top_margin = get4() & 7; - height = raw_height - top_margin - (get4() & 7); - if (raw_width == 7262) { - height = 5444; - width = 7244; - left_margin = 7; - } - fseek (ifp, 52, SEEK_CUR); - FORC3 cam_mul[c] = getreal(11); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - fseek (ifp, 114, SEEK_CUR); - flip = (get2() >> 7) * 90; - if (width * height * 6 == ima_len) { -#if 1 - if (flip % 180 == 90) SWAP(width,height); - filters = flip = 0; -#else - if (flip % 180 == 90) SWAP(width,height); - raw_width = width; - raw_height = height; - left_margin = top_margin = filters = flip = 0; -#endif - } - sprintf (model, "Ixpress %d-Mp", height*width/1000000); - load_raw = &CLASS imacon_full_load_raw; - if (filters) { - if (left_margin & 1) filters = 0x61616161; - load_raw = &CLASS unpacked_load_raw; - } - maximum = 0xffff; - break; - case 50454: /* Sinar tag */ - case 50455: - if (!(cbuf = (char *) malloc(len))) break; - fread (cbuf, 1, len, ifp); - for (cp = cbuf-1; cp && cp < cbuf+len; cp = strchr(cp,'\n')) - if (!strncmp (++cp,"Neutral ",8)) - { - sscanf (cp+8, "%f %f %f", cam_mul, cam_mul+1, cam_mul+2); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - free (cbuf); - break; - case 50458: - if (!make[0]) strcpy (make, "Hasselblad"); - break; - case 50459: /* Hasselblad tag */ - i = order; - j = ftell(ifp); - c = tiff_nifds; - order = get2(); - fseek (ifp, j+(get2(),get4()), SEEK_SET); - parse_tiff_ifd (j); - maximum = 0xffff; - tiff_nifds = c; - order = i; - break; - case 50706: /* DNGVersion */ - FORC4 dng_version = (dng_version << 8) + fgetc(ifp); - if (!make[0]) strcpy (make, "DNG"); - is_raw = 1; - break; - case 50710: /* CFAPlaneColor */ - if (len > 4) len = 4; - colors = len; - fread (cfa_pc, 1, colors, ifp); -guess_cfa_pc: - FORCC tab[cfa_pc[c]] = c; - cdesc[c] = 0; - for (i=16; i--; ) - filters = filters << 2 | tab[cfa_pat[i % plen]]; - break; - case 50711: /* CFALayout */ - if (get2() == 2) { - fuji_width = 1; - filters = 0x49494949; - } - break; - case 291: - case 50712: /* LinearizationTable */ - linear_table (len); - break; - case 50713: /* BlackLevelRepeatDim */ - blrr = get2(); - blrc = get2(); - break; - case 61450: - blrr = blrc = 2; - case 50714: /* BlackLevel */ - black = getreal(type); - if (!filters || !~filters) break; - dblack[0] = black; - dblack[1] = (blrc == 2) ? getreal(type):dblack[0]; - dblack[2] = (blrr == 2) ? getreal(type):dblack[0]; - dblack[3] = (blrc == 2 && blrr == 2) ? getreal(type):dblack[1]; - if (colors == 3) - filters |= ((filters >> 2 & 0x22222222) | - (filters << 2 & 0x88888888)) & filters << 1; - FORC4 cblack[filters >> (c << 1) & 3] = dblack[c]; - black = 0; - break; - case 50715: /* BlackLevelDeltaH */ - case 50716: /* BlackLevelDeltaV */ - for (num=i=0; i < len; i++) - num += getreal(type); - black += num/len + 0.5; - break; - case 50717: /* WhiteLevel */ - maximum = getint(type); - break; - case 50718: /* DefaultScale */ - pixel_aspect = getreal(type); - pixel_aspect /= getreal(type); - break; - case 50721: /* ColorMatrix1 */ - case 50722: /* ColorMatrix2 */ - FORCC for (j=0; j < 3; j++) - cm[c][j] = getreal(type); - use_cm = 1; - break; - case 50723: /* CameraCalibration1 */ - case 50724: /* CameraCalibration2 */ - for (i=0; i < colors; i++) - FORCC cc[i][c] = getreal(type); - break; - case 50727: /* AnalogBalance */ - FORCC ab[c] = getreal(type); - break; - case 50728: /* AsShotNeutral */ - FORCC asn[c] = getreal(type); - break; - case 50729: /* AsShotWhiteXY */ - xyz[0] = getreal(type); - xyz[1] = getreal(type); - xyz[2] = 1 - xyz[0] - xyz[1]; - FORC3 xyz[c] /= d65_white[c]; - break; - case 50740: /* DNGPrivateData */ - if (dng_version) break; - parse_minolta (j = get4()+base); - fseek (ifp, j, SEEK_SET); - parse_tiff_ifd (base); - break; - case 50752: - read_shorts (cr2_slice, 3); - break; - case 50829: /* ActiveArea */ - top_margin = getint(type); - left_margin = getint(type); - height = getint(type) - top_margin; - width = getint(type) - left_margin; - break; -#if 0 - case 51009: /* OpcodeList2 */ - meta_offset = ftell(ifp); - break; -#endif - case 64772: /* Kodak P-series */ - if (len < 13) break; - fseek (ifp, 16, SEEK_CUR); - data_offset = get4(); - fseek (ifp, 28, SEEK_CUR); - data_offset += get4(); - load_raw = &CLASS packed_load_raw; - break; - case 65026: - if (type == 2) fgets (model2, 64, ifp); - } - fseek (ifp, save, SEEK_SET); - } - if (sony_length && (buf = (unsigned *) malloc(sony_length))) { - fseek (ifp, sony_offset, SEEK_SET); - fread (buf, sony_length, 1, ifp); - sony_decrypt (buf, sony_length/4, 1, sony_key); -#ifndef LIBRAW_LIBRARY_BUILD - sfp = ifp; - if ((ifp = tmpfile())) { - fwrite (buf, sony_length, 1, ifp); - fseek (ifp, 0, SEEK_SET); - parse_tiff_ifd (-sony_offset); - fclose (ifp); - } - ifp = sfp; -#else - if( !ifp->tempbuffer_open(buf,sony_length)) - { - parse_tiff_ifd(-sony_offset); - ifp->tempbuffer_close(); - } -#endif - free (buf); - } - for (i=0; i < colors; i++) - FORCC cc[i][c] *= ab[i]; - if (use_cm) { - FORCC for (i=0; i < 3; i++) - for (cam_xyz[c][i]=j=0; j < colors; j++) - cam_xyz[c][i] += cc[c][j] * cm[j][i] * xyz[i]; - cam_xyz_coeff (cam_xyz); - } - if (asn[0]) { - cam_mul[3] = 0; - FORCC cam_mul[c] = 1 / asn[c]; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if (!use_cm) - { - FORCC pre_mul[c] /= cc[c][c]; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.pre_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - - return 0; -} - -int CLASS parse_tiff (int base) -{ - int doff; - - fseek (ifp, base, SEEK_SET); - order = get2(); - if (order != 0x4949 && order != 0x4d4d) return 0; - get2(); - while ((doff = get4())) { - fseek (ifp, doff+base, SEEK_SET); - if (parse_tiff_ifd (base)) break; - } - return 1; -} - -void CLASS apply_tiff() -{ - int max_samp=0, raw=-1, thm=-1, i,max_bps=0; - struct jhead jh; - - thumb_misc = 16; - if (thumb_offset) { - fseek (ifp, thumb_offset, SEEK_SET); - if (ljpeg_start (&jh, 1)) { - thumb_misc = jh.bits; - thumb_width = jh.wide; - thumb_height = jh.high; - } - } - for (i=0; i < tiff_nifds; i++) { - if (max_samp < tiff_ifd[i].samples) - max_samp = tiff_ifd[i].samples; - if (max_samp > 3) max_samp = 3; - if (max_bps < tiff_ifd[i].bps) - max_bps = tiff_ifd[i].bps; - if ((tiff_ifd[i].comp != 6 || tiff_ifd[i].samples != 3) && - (tiff_ifd[i].t_width | tiff_ifd[i].t_height) < 0x10000 && - tiff_ifd[i].t_width*tiff_ifd[i].t_height > raw_width*raw_height) { - raw_width = tiff_ifd[i].t_width; - raw_height = tiff_ifd[i].t_height; - tiff_bps = tiff_ifd[i].bps; - tiff_compress = tiff_ifd[i].comp; - data_offset = tiff_ifd[i].offset; - tiff_flip = tiff_ifd[i].t_flip; - tiff_samples = tiff_ifd[i].samples; -#ifdef LIBRAW_LIBRARY_BUILD - data_size = tile_length < INT_MAX ? tiff_ifd[i].tile_maxbytes: tiff_ifd[i].bytes; -#endif - raw = i; - } - } -#if 0 - if (!tile_width ) tile_width = INT_MAX; - if (!tile_length) tile_length = INT_MAX; -#endif - for (i=tiff_nifds; i--; ) - if (tiff_ifd[i].t_flip) tiff_flip = tiff_ifd[i].t_flip; - if (raw >= 0 && !load_raw) - switch (tiff_compress) { -#if 1 - case 32767: - if (tiff_ifd[raw].bytes == raw_width*raw_height) { - tiff_bps = 12; - load_raw = &CLASS sony_arw2_load_raw; break; - } - if (tiff_ifd[raw].bytes*8 != raw_width*raw_height*tiff_bps) { - raw_height += 8; - load_raw = &CLASS sony_arw_load_raw; break; - } - load_flags = 79; - case 32769: - load_flags++; - case 32770: - case 32773: goto slr; - case 0: case 1: - if (tiff_ifd[raw].bytes*5 == raw_width*raw_height*8) { - load_flags = 81; - tiff_bps = 12; - } slr: - switch (tiff_bps) { - case 8: load_raw = &CLASS eight_bit_load_raw; break; - case 12: if (tiff_ifd[raw].phint == 2) - load_flags = 6; - load_raw = &CLASS packed_load_raw; break; - case 14: load_flags = 0; - case 16: load_raw = &CLASS unpacked_load_raw; break; - } - break; - case 6: case 7: case 99: - load_raw = &CLASS lossless_jpeg_load_raw; break; - case 262: - load_raw = &CLASS kodak_262_load_raw; break; - case 34713: - load_raw = &CLASS nikon_compressed_load_raw; break; -/* - case 34892: - load_raw = &CLASS lossy_dng_load_raw; break; -*/ - case 65535: - load_raw = &CLASS pentax_load_raw; break; - case 65000: - switch (tiff_ifd[raw].phint) { - case 2: load_raw = &CLASS kodak_rgb_load_raw; filters = 0; break; - case 6: load_raw = &CLASS kodak_ycbcr_load_raw; filters = 0; break; - case 32803: load_raw = &CLASS kodak_65000_load_raw; - } - case 32867: break; - default: is_raw = 0; -#else - case 0: case 1: - switch (tiff_bps) { - case 8: load_raw = &CLASS eight_bit_load_raw; break; - case 12: load_raw = &CLASS packed_load_raw; - if (tiff_ifd[raw].phint == 2) - load_flags = 6; - if (strncmp(make,"PENTAX",6)) break; - case 14: - case 16: load_raw = &CLASS unpacked_load_raw; break; - } - if (tiff_ifd[raw].bytes*5 == raw_width*raw_height*8) { - tiff_bps = 12; - load_raw = &CLASS packed_load_raw; - load_flags = 81; - } - break; - case 6: case 7: case 99: - load_raw = &CLASS lossless_jpeg_load_raw; break; - case 262: - load_raw = &CLASS kodak_262_load_raw; break; - case 32767: - if (tiff_ifd[raw].bytes == raw_width*raw_height) { - tiff_bps = 12; - load_raw = &CLASS sony_arw2_load_raw; break; - } - if (tiff_ifd[raw].bytes*8 != raw_width*raw_height*tiff_bps) { - raw_height += 8; - load_raw = &CLASS sony_arw_load_raw; break; - } - load_flags = 79; - case 32769: - load_flags++; - case 32770: - case 32773: - load_raw = &CLASS packed_load_raw; break; - case 34713: - load_raw = &CLASS nikon_compressed_load_raw; break; - case 65535: - load_raw = &CLASS pentax_load_raw; break; - case 65000: - switch (tiff_ifd[raw].phint) { - case 2: load_raw = &CLASS kodak_rgb_load_raw; filters = 0; break; - case 6: load_raw = &CLASS kodak_ycbcr_load_raw; filters = 0; break; - case 32803: load_raw = &CLASS kodak_65000_load_raw; - } - case 32867: break; - default: is_raw = 0; -#endif - } - if (!dng_version) - if ( (tiff_samples == 3 && tiff_ifd[raw].bytes && - tiff_bps != 14 && tiff_bps != 2048 && tiff_compress != 32770) - || (tiff_bps == 8 && !strstr(make,"KODAK") && !strstr(make,"Kodak") && - !strstr(model2,"DEBUG RAW"))) - is_raw = 0; - if(dng_version && max_bps > 16) - is_raw = 0; - for (i=0; i < tiff_nifds; i++) - if (i != raw && tiff_ifd[i].samples == max_samp && tiff_ifd[i].offset && tiff_ifd[i].bytes && - tiff_ifd[i].t_width * tiff_ifd[i].t_height / SQR(tiff_ifd[i].bps+1) > - thumb_width * thumb_height / SQR(thumb_misc+1) - && tiff_ifd[i].comp != 34892) { - thumb_width = tiff_ifd[i].t_width; - thumb_height = tiff_ifd[i].t_height; - thumb_offset = tiff_ifd[i].offset; - thumb_length = tiff_ifd[i].bytes; - thumb_misc = tiff_ifd[i].bps; - thm = i; - } - if (thm >= 0) { - thumb_misc |= tiff_ifd[thm].samples << 5; - switch (tiff_ifd[thm].comp) { - case 0: - write_thumb = &CLASS layer_thumb; - break; - case 1: - if (tiff_ifd[thm].bps <= 8) - write_thumb = &CLASS ppm_thumb; - else if (!strcmp(make,"Imacon")) - write_thumb = NULL; /* &CLASS ppm16_thumb; */ - else - thumb_load_raw = &CLASS kodak_thumb_load_raw; - break; - case 65000: - thumb_load_raw = tiff_ifd[thm].phint == 6 ? - &CLASS kodak_ycbcr_load_thumb : &CLASS kodak_rgb_load_thumb; - } - } -} - -void CLASS parse_minolta (int base) -{ - int save, tag, len, offset, high=0, wide=0, i, c; - short sorder=order; - - fseek (ifp, base, SEEK_SET); - if (fgetc(ifp) || fgetc(ifp)-'M' || fgetc(ifp)-'R') return; - order = fgetc(ifp) * 0x101; - offset = base + get4() + 8; - while ((save=ftell(ifp)) < offset) { - for (tag=i=0; i < 4; i++) - tag = tag << 8 | fgetc(ifp); - len = get4(); - switch (tag) { - case 0x505244: /* PRD */ - fseek (ifp, 8, SEEK_CUR); - high = get2(); - wide = get2(); - break; - case 0x574247: /* WBG */ - get4(); - i = strcmp(model,"DiMAGE A200") ? 0:3; - FORC4 cam_mul[c ^ (c >> 1) ^ i] = get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - break; - case 0x545457: /* TTW */ - parse_tiff (ftell(ifp)); - data_offset = offset; - } - fseek (ifp, save+len+8, SEEK_SET); - } - raw_height = high; - raw_width = wide; - order = sorder; -} - -/* - Many cameras have a "debug mode" that writes JPEG and raw - at the same time. The raw file has no header, so try to - to open the matching JPEG file and read its metadata. - */ -void CLASS parse_external_jpeg() -{ - const char *file, *ext; - char *jname, *jfile, *jext; -#ifndef LIBRAW_LIBRARY_BUILD - FILE *save=ifp; -#else - if(!ifp->fname()) - { - imgdata.process_warnings |= LIBRAW_WARN_NO_METADATA ; - return; - } -#endif - - ext = strrchr (ifname, '.'); - file = strrchr (ifname, '/'); - if (!file) file = strrchr (ifname, '\\'); -#ifndef LIBRAW_LIBRARY_BUILD - if (!file) file = ifname-1; -#else - if (!file) file = (char*)ifname-1; -#endif - file++; - if (!ext || strlen(ext) != 4 || ext-file != 8) return; - jname = (char *) malloc (strlen(ifname) + 1); - merror (jname, "parse_external_jpeg()"); - strcpy (jname, ifname); - jfile = file - ifname + jname; - jext = ext - ifname + jname; - if (strcasecmp (ext, ".jpg")) { - strcpy (jext, isupper(ext[1]) ? ".JPG":".jpg"); - if (isdigit(*file)) { - memcpy (jfile, file+4, 4); - memcpy (jfile+4, file, 4); - } - } else - while (isdigit(*--jext)) { - if (*jext != '9') { - (*jext)++; - break; - } - *jext = '0'; - } -#ifndef LIBRAW_LIBRARY_BUILD - if (strcmp (jname, ifname)) { - if ((ifp = fopen (jname, "rb"))) { -#ifdef DCRAW_VERBOSE - if (verbose) - fprintf (stderr,_("Reading metadata from %s ...\n"), jname); -#endif - parse_tiff (12); - thumb_offset = 0; - is_raw = 1; - fclose (ifp); - } - } -#else - if (strcmp (jname, ifname)) - { - if(!ifp->subfile_open(jname)) - { - parse_tiff (12); - thumb_offset = 0; - is_raw = 1; - ifp->subfile_close(); - } - else - imgdata.process_warnings |= LIBRAW_WARN_NO_METADATA ; - } -#endif - if (!timestamp) - { -#ifdef LIBRAW_LIBRARY_BUILD - imgdata.process_warnings |= LIBRAW_WARN_NO_METADATA ; -#endif -#ifdef DCRAW_VERBOSE - fprintf (stderr,_("Failed to read metadata from %s\n"), jname); -#endif - } - free (jname); -#ifndef LIBRAW_LIBRARY_BUILD - ifp = save; -#endif -} - -/* - CIFF block 0x1030 contains an 8x8 white sample. - Load this into white[][] for use in scale_colors(). - */ -void CLASS ciff_block_1030() -{ - static const ushort key[] = { 0x410, 0x45f3 }; - int i, bpp, row, col, vbits=0; - unsigned long bitbuf=0; - - if ((get2(),get4()) != 0x80008 || !get4()) return; - bpp = get2(); - if (bpp != 10 && bpp != 12) return; - for (i=row=0; row < 8; row++) - for (col=0; col < 8; col++) { - if (vbits < bpp) { - bitbuf = bitbuf << 16 | (get2() ^ key[i++ & 1]); - vbits += 16; - } - white[row][col] = - bitbuf << (LONG_BIT - vbits) >> (LONG_BIT - bpp); - vbits -= bpp; - } -} - -/* - Parse a CIFF file, better known as Canon CRW format. - */ -void CLASS parse_ciff (int offset, int length) -{ - int tboff, nrecs, c, type, len, save, wbi=-1; - ushort key[] = { 0x410, 0x45f3 }; - - fseek (ifp, offset+length-4, SEEK_SET); - tboff = get4() + offset; - fseek (ifp, tboff, SEEK_SET); - nrecs = get2(); - if (nrecs > 100) return; - while (nrecs--) { - type = get2(); - len = get4(); - save = ftell(ifp) + 4; - fseek (ifp, offset+get4(), SEEK_SET); - if ((((type >> 8) + 8) | 8) == 0x38) - parse_ciff (ftell(ifp), len); /* Parse a sub-table */ - - if (type == 0x0810) - fread (artist, 64, 1, ifp); - if (type == 0x080a) { - fread (make, 64, 1, ifp); - fseek (ifp, ((INT64)strlen(make)) - 63, SEEK_CUR); - fread (model, 64, 1, ifp); - } - if (type == 0x1810) { - fseek (ifp, 12, SEEK_CUR); - flip = get4(); - } - if (type == 0x1835) /* Get the decoder table */ - tiff_compress = get4(); - if (type == 0x2007) { - thumb_offset = ftell(ifp); - thumb_length = len; - } - if (type == 0x1818) { - shutter = pow (2.0f, -int_to_float((get4(),get4()))); - aperture = pow (2.0f, int_to_float(get4())/2); - } - if (type == 0x102a) { - iso_speed = pow (2.0, (get4(),get2())/32.0 - 4) * 50; - aperture = pow (2.0, (get2(),(short)get2())/64.0); - shutter = pow (2.0,-((short)get2())/32.0); - wbi = (get2(),get2()); - if (wbi > 17) wbi = 0; - fseek (ifp, 32, SEEK_CUR); - if (shutter > 1e6) shutter = get2()/10.0; - } - if (type == 0x102c) { - if (get2() > 512) { /* Pro90, G1 */ - fseek (ifp, 118, SEEK_CUR); - FORC4 cam_mul[c ^ 2] = get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } else { /* G2, S30, S40 */ - fseek (ifp, 98, SEEK_CUR); - FORC4 cam_mul[c ^ (c >> 1) ^ 1] = get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - } - if (type == 0x0032) { - if (len == 768) { /* EOS D30 */ - fseek (ifp, 72, SEEK_CUR); - FORC4 cam_mul[c ^ (c >> 1)] = 1024.0 / get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - if (!wbi) cam_mul[0] = -1; /* use my auto white balance */ - } else if (!cam_mul[0]) { - if (get2() == key[0]) /* Pro1, G6, S60, S70 */ - c = (strstr(model,"Pro1") ? - "012346000000000000":"01345:000000006008")[wbi]-'0'+ 2; - else { /* G3, G5, S45, S50 */ - c = "023457000000006000"[wbi]-'0'; - key[0] = key[1] = 0; - } - fseek (ifp, 78 + c*8, SEEK_CUR); - FORC4 cam_mul[c ^ (c >> 1) ^ 1] = get2() ^ key[c & 1]; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - if (!wbi) cam_mul[0] = -1; - } - } - if (type == 0x10a9) { /* D60, 10D, 300D, and clones */ - if (len > 66) wbi = "0134567028"[wbi]-'0'; - fseek (ifp, 2 + wbi*8, SEEK_CUR); - FORC4 cam_mul[c ^ (c >> 1)] = get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } - if (type == 0x1030 && (0x18040 >> wbi & 1)) - ciff_block_1030(); /* all that don't have 0x10a9 */ - if (type == 0x1031) { - raw_width = (get2(),get2()); - raw_height = get2(); - } - if (type == 0x5029) { - focal_len = len >> 16; - if ((len & 0xffff) == 2) focal_len /= 32; - } - if (type == 0x5813) flash_used = int_to_float(len); - if (type == 0x5814) canon_ev = int_to_float(len); - if (type == 0x5817) shot_order = len; - if (type == 0x5834) unique_id = len; - if (type == 0x580e) timestamp = len; - if (type == 0x180e) timestamp = get4(); -#ifdef LOCALTIME - if ((type | 0x4000) == 0x580e) - timestamp = mktime (gmtime (×tamp)); -#endif - fseek (ifp, save, SEEK_SET); - } -} - -void CLASS parse_rollei() -{ - char line[128], *val; - struct tm t; - - fseek (ifp, 0, SEEK_SET); - memset (&t, 0, sizeof t); - do { - fgets (line, 128, ifp); - if ((val = strchr(line,'='))) - *val++ = 0; - else - val = line + strlen(line); - if (!strcmp(line,"DAT")) - sscanf (val, "%d.%d.%d", &t.tm_mday, &t.tm_mon, &t.tm_year); - if (!strcmp(line,"TIM")) - sscanf (val, "%d:%d:%d", &t.tm_hour, &t.tm_min, &t.tm_sec); - if (!strcmp(line,"HDR")) - thumb_offset = atoi(val); - if (!strcmp(line,"X ")) - raw_width = atoi(val); - if (!strcmp(line,"Y ")) - raw_height = atoi(val); - if (!strcmp(line,"TX ")) - thumb_width = atoi(val); - if (!strcmp(line,"TY ")) - thumb_height = atoi(val); - } while (strncmp(line,"EOHD",4)); - data_offset = thumb_offset + thumb_width * thumb_height * 2; - t.tm_year -= 1900; - t.tm_mon -= 1; - if (mktime(&t) > 0) - timestamp = mktime(&t); - strcpy (make, "Rollei"); - strcpy (model,"d530flex"); - write_thumb = &CLASS rollei_thumb; -} - -void CLASS parse_sinar_ia() -{ - int entries, off; - char str[8], *cp; - - order = 0x4949; - fseek (ifp, 4, SEEK_SET); - entries = get4(); - fseek (ifp, get4(), SEEK_SET); - while (entries--) { - off = get4(); get4(); - fread (str, 8, 1, ifp); - if (!strcmp(str,"META")) meta_offset = off; - if (!strcmp(str,"THUMB")) thumb_offset = off; - if (!strcmp(str,"RAW0")) data_offset = off; - } - fseek (ifp, meta_offset+20, SEEK_SET); - fread (make, 64, 1, ifp); - make[63] = 0; - if ((cp = strchr(make,' '))) { - strcpy (model, cp+1); - *cp = 0; - } - raw_width = get2(); - raw_height = get2(); - load_raw = &CLASS unpacked_load_raw; - thumb_width = (get4(),get2()); - thumb_height = get2(); - write_thumb = &CLASS ppm_thumb; - maximum = 0x3fff; -} - -void CLASS parse_phase_one (int base) -{ - unsigned entries, tag, type, len, data, save, i, c; - float romm_cam[3][3]; - char *cp; - - memset (&ph1, 0, sizeof ph1); - fseek (ifp, base, SEEK_SET); - order = get4() & 0xffff; - if (get4() >> 8 != 0x526177) return; /* "Raw" */ - fseek (ifp, get4()+base, SEEK_SET); - entries = get4(); - get4(); - while (entries--) { - tag = get4(); - type = get4(); - len = get4(); - data = get4(); - save = ftell(ifp); - fseek (ifp, base+data, SEEK_SET); - switch (tag) { - case 0x100: flip = "0653"[data & 3]-'0'; break; - case 0x106: - for (i=0; i < 9; i++) - romm_cam[0][i] = getreal(11); - romm_coeff (romm_cam); - break; - case 0x107: - FORC3 cam_mul[c] = getreal(11); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - break; - case 0x108: raw_width = data; break; - case 0x109: raw_height = data; break; - case 0x10a: left_margin = data; break; - case 0x10b: top_margin = data; break; - case 0x10c: width = data; break; - case 0x10d: height = data; break; - case 0x10e: ph1.format = data; break; - case 0x10f: data_offset = data+base; break; - case 0x110: meta_offset = data+base; - meta_length = len; break; - case 0x112: ph1.key_off = save - 4; break; - case 0x210: ph1.tag_210 = int_to_float(data); break; - case 0x21a: ph1.tag_21a = data; break; - case 0x21c: strip_offset = data+base; break; - case 0x21d: ph1.t_black = data; break; - case 0x222: ph1.split_col = data - left_margin; break; - case 0x223: ph1.black_off = data+base; break; - case 0x301: - model[63] = 0; - fread (model, 1, 63, ifp); - if ((cp = strstr(model," camera"))) *cp = 0; - } - fseek (ifp, save, SEEK_SET); - } - load_raw = ph1.format < 3 ? - &CLASS phase_one_load_raw : &CLASS phase_one_load_raw_c; - maximum = 0xffff; - strcpy (make, "Phase One"); - if (model[0]) return; - switch (raw_height) { - case 2060: strcpy (model,"LightPhase"); break; - case 2682: strcpy (model,"H 10"); break; - case 4128: strcpy (model,"H 20"); break; - case 5488: strcpy (model,"H 25"); break; - } -} - -void CLASS parse_fuji (int offset) -{ - unsigned entries, tag, len, save, c; - - fseek (ifp, offset, SEEK_SET); - entries = get4(); - if (entries > 255) return; - while (entries--) { - tag = get2(); - len = get2(); - save = ftell(ifp); - if (tag == 0x100) { - raw_height = get2(); - raw_width = get2(); - } else if (tag == 0x121) { - height = get2(); - if ((width = get2()) == 4284) width += 3; - } else if (tag == 0x130) { - fuji_layout = fgetc(ifp) >> 7; - load_raw = fgetc(ifp) & 8 ? - &CLASS unpacked_load_raw : &CLASS fuji_load_raw; - } else if (tag == 0x2ff0) { - FORC4 cam_mul[c ^ 1] = get2(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } else if (tag == 0xc000) { - c = order; - order = 0x4949; - width = get4(); - height = get4(); - order = c; - } - fseek (ifp, save+len, SEEK_SET); - } - height <<= fuji_layout; - width >>= fuji_layout; -} - -int CLASS parse_jpeg (int offset) -{ - int len, save, hlen, mark; - - fseek (ifp, offset, SEEK_SET); - if (fgetc(ifp) != 0xff || fgetc(ifp) != 0xd8) return 0; - - while (fgetc(ifp) == 0xff && (mark = fgetc(ifp)) != 0xda) { - order = 0x4d4d; - len = get2() - 2; - save = ftell(ifp); - if (mark == 0xc0 || mark == 0xc3) { - fgetc(ifp); - raw_height = get2(); - raw_width = get2(); - } - order = get2(); - hlen = get4(); - if (get4() == 0x48454150) /* "HEAP" */ - parse_ciff (save+hlen, len-hlen); - if (parse_tiff (save+6)) apply_tiff(); - fseek (ifp, save+len, SEEK_SET); - } - return 1; -} - -void CLASS parse_riff() -{ - unsigned i, size, end; - char tag[4], date[64], month[64]; - static const char mon[12][4] = - { "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec" }; - struct tm t; - - order = 0x4949; - fread (tag, 4, 1, ifp); - size = get4(); - end = ftell(ifp) + size; - if (!memcmp(tag,"RIFF",4) || !memcmp(tag,"LIST",4)) { - int cnt=0; - get4(); - while (ftell(ifp)+7 < end) - { - parse_riff(); - if(cnt++>10000) break; // no more than 10k times - } - } else if (!memcmp(tag,"nctg",4)) { - while (ftell(ifp)+7 < end) { - i = get2(); - size = get2(); - if ((i+1) >> 1 == 10 && size == 20) - get_timestamp(0); - else fseek (ifp, size, SEEK_CUR); - } - } else if (!memcmp(tag,"IDIT",4) && size < 64) { - fread (date, 64, 1, ifp); - date[size] = 0; - memset (&t, 0, sizeof t); - if (sscanf (date, "%*s %s %d %d:%d:%d %d", month, &t.tm_mday, - &t.tm_hour, &t.tm_min, &t.tm_sec, &t.tm_year) == 6) { - for (i=0; i < 12 && strcasecmp(mon[i],month); i++); - t.tm_mon = i; - t.tm_year -= 1900; - if (mktime(&t) > 0) - timestamp = mktime(&t); - } - } else - fseek (ifp, size, SEEK_CUR); -} - -void CLASS parse_smal (int offset, int fsize) -{ - int ver; - - fseek (ifp, offset+2, SEEK_SET); - order = 0x4949; - ver = fgetc(ifp); - if (ver == 6) - fseek (ifp, 5, SEEK_CUR); - if (get4() != fsize) return; - if (ver > 6) data_offset = get4(); - raw_height = height = get2(); - raw_width = width = get2(); - strcpy (make, "SMaL"); - sprintf (model, "v%d %dx%d", ver, width, height); - if (ver == 6) load_raw = &CLASS smal_v6_load_raw; - if (ver == 9) load_raw = &CLASS smal_v9_load_raw; -} - -void CLASS parse_cine() -{ - unsigned off_head, off_setup, off_image, i; - - order = 0x4949; - fseek (ifp, 4, SEEK_SET); - is_raw = get2() == 2; - fseek (ifp, 14, SEEK_CUR); - is_raw *= get4(); - off_head = get4(); - off_setup = get4(); - off_image = get4(); - timestamp = get4(); - if ((i = get4())) timestamp = i; - fseek (ifp, off_head+4, SEEK_SET); - raw_width = get4(); - raw_height = get4(); - switch (get2(),get2()) { - case 8: load_raw = &CLASS eight_bit_load_raw; break; - case 16: load_raw = &CLASS unpacked_load_raw; - } - fseek (ifp, off_setup+792, SEEK_SET); - strcpy (make, "CINE"); - sprintf (model, "%d", get4()); - fseek (ifp, 12, SEEK_CUR); - switch ((i=get4()) & 0xffffff) { - case 3: filters = 0x94949494; break; - case 4: filters = 0x49494949; break; - default: is_raw = 0; - } - fseek (ifp, 72, SEEK_CUR); - switch ((get4()+3600) % 360) { - case 270: flip = 4; break; - case 180: flip = 1; break; - case 90: flip = 7; break; - case 0: flip = 2; - } - cam_mul[0] = getreal(11); - cam_mul[2] = getreal(11); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - maximum = ~(-1 << get4()); - fseek (ifp, 668, SEEK_CUR); - shutter = get4()/1000000000.0; - fseek (ifp, off_image, SEEK_SET); - if (shot_select < is_raw) - fseek (ifp, shot_select*8, SEEK_CUR); - data_offset = (INT64) get4() + 8; - data_offset += (INT64) get4() << 32; -} - -void CLASS parse_redcine() -{ - unsigned i, len, rdvo; - - order = 0x4d4d; - is_raw = 0; - fseek (ifp, 52, SEEK_SET); - width = get4(); - height = get4(); - fseek (ifp, 0, SEEK_END); - fseek (ifp, -(i = ftello(ifp) & 511), SEEK_CUR); - if (get4() != i || get4() != 0x52454f42) { -#ifdef DCRAW_VERBOSE - fprintf (stderr,_("%s: Tail is missing, parsing from head...\n"), ifname); -#endif - fseek (ifp, 0, SEEK_SET); - while ((len = get4()) != EOF) { - if (get4() == 0x52454456) - if (is_raw++ == shot_select) - data_offset = ftello(ifp) - 8; - fseek (ifp, len-8, SEEK_CUR); - } - } else { - rdvo = get4(); - fseek (ifp, 12, SEEK_CUR); - is_raw = get4(); - fseeko (ifp, rdvo+8 + shot_select*4, SEEK_SET); - data_offset = get4(); - } -} -void CLASS adobe_coeff (const char *p_make, const char *p_model) -{ - static const struct { - const char *prefix; - short t_black, t_maximum, trans[12]; - } table[] = { - { "AGFAPHOTO DC-833m", 0, 0, /* DJC */ - { 11438,-3762,-1115,-2409,9914,2497,-1227,2295,5300 } }, - { "Apple QuickTake", 0, 0, /* DJC */ - { 21392,-5653,-3353,2406,8010,-415,7166,1427,2078 } }, - { "Canon EOS D2000", 0, 0, - { 24542,-10860,-3401,-1490,11370,-297,2858,-605,3225 } }, - { "Canon EOS D6000", 0, 0, - { 20482,-7172,-3125,-1033,10410,-285,2542,226,3136 } }, - { "Canon EOS D30", 0, 0, - { 9805,-2689,-1312,-5803,13064,3068,-2438,3075,8775 } }, - { "Canon EOS D60", 0, 0xfa0, - { 6188,-1341,-890,-7168,14489,2937,-2640,3228,8483 } }, - { "Canon EOS 5D Mark III", 0, 0x3c80, - { 6722,-635,-963,-4287,12460,2028,-908,2162,5668 } }, - { "Canon EOS 5D Mark II", 0, 0x3cf0, - { 4716,603,-830,-7798,15474,2480,-1496,1937,6651 } }, - { "Canon EOS 5D", 0, 0xe6c, - { 6347,-479,-972,-8297,15954,2480,-1968,2131,7649 } }, - { "Canon EOS 7D", 0, 0x3510, - { 6844,-996,-856,-3876,11761,2396,-593,1772,6198 } }, - { "Canon EOS 10D", 0, 0xfa0, - { 8197,-2000,-1118,-6714,14335,2592,-2536,3178,8266 } }, - { "Canon EOS 20Da", 0, 0, - { 14155,-5065,-1382,-6550,14633,2039,-1623,1824,6561 } }, - { "Canon EOS 20D", 0, 0xfff, - { 6599,-537,-891,-8071,15783,2424,-1983,2234,7462 } }, - { "Canon EOS 30D", 0, 0, - { 6257,-303,-1000,-7880,15621,2396,-1714,1904,7046 } }, - { "Canon EOS 40D", 0, 0x3f60, - { 6071,-747,-856,-7653,15365,2441,-2025,2553,7315 } }, - { "Canon EOS 50D", 0, 0x3d93, - { 4920,616,-593,-6493,13964,2784,-1774,3178,7005 } }, - { "Canon EOS 60D", 0, 0x2ff7, - { 6719,-994,-925,-4408,12426,2211,-887,2129,6051 } }, - { "Canon EOS 300D", 0, 0xfa0, - { 8197,-2000,-1118,-6714,14335,2592,-2536,3178,8266 } }, - { "Canon EOS 350D", 0, 0xfff, - { 6018,-617,-965,-8645,15881,2975,-1530,1719,7642 } }, - { "Canon EOS 400D", 0, 0xe8e, - { 7054,-1501,-990,-8156,15544,2812,-1278,1414,7796 } }, - { "Canon EOS 450D", 0, 0x390d, - { 5784,-262,-821,-7539,15064,2672,-1982,2681,7427 } }, - { "Canon EOS 500D", 0, 0x3479, - { 4763,712,-646,-6821,14399,2640,-1921,3276,6561 } }, - { "Canon EOS 550D", 0, 0x3dd7, - { 6941,-1164,-857,-3825,11597,2534,-416,1540,6039 } }, - { "Canon EOS 600D", 0, 0x3510, - { 6461,-907,-882,-4300,12184,2378,-819,1944,5931 } }, - { "Canon EOS 1000D", 0, 0xe43, - { 6771,-1139,-977,-7818,15123,2928,-1244,1437,7533 } }, - { "Canon EOS 1100D", 0, 0x3510, - { 6444,-904,-893,-4563,12308,2535,-903,2016,6728 } }, - { "Canon EOS-1Ds Mark III", 0, 0x3bb0, - { 5859,-211,-930,-8255,16017,2353,-1732,1887,7448 } }, - { "Canon EOS-1Ds Mark II", 0, 0xe80, - { 6517,-602,-867,-8180,15926,2378,-1618,1771,7633 } }, - { "Canon EOS-1D Mark IV", 0, 0x3bb0, - { 6014,-220,-795,-4109,12014,2361,-561,1824,5787 } }, - { "Canon EOS-1D Mark III", 0, 0x3bb0, - { 6291,-540,-976,-8350,16145,2311,-1714,1858,7326 } }, - { "Canon EOS-1D Mark II N", 0, 0xe80, - { 6240,-466,-822,-8180,15825,2500,-1801,1938,8042 } }, - { "Canon EOS-1D Mark II", 0, 0xe80, - { 6264,-582,-724,-8312,15948,2504,-1744,1919,8664 } }, - { "Canon EOS-1DS", 0, 0xe20, - { 4374,3631,-1743,-7520,15212,2472,-2892,3632,8161 } }, - { "Canon EOS-1D X", 0, 0, - { 6847,-614,-1014,-4669,12737,2139,-1197,2488,6846 } }, - { "Canon EOS-1D", 0, 0xe20, - { 6806,-179,-1020,-8097,16415,1687,-3267,4236,7690 } }, - { "Canon EOS", 0, 0, - { 8197,-2000,-1118,-6714,14335,2592,-2536,3178,8266 } }, - { "Canon PowerShot A530", 0, 0, - { 0 } }, /* don't want the A5 matrix */ - { "Canon PowerShot A50", 0, 0, - { -5300,9846,1776,3436,684,3939,-5540,9879,6200,-1404,11175,217 } }, - { "Canon PowerShot A5", 0, 0, - { -4801,9475,1952,2926,1611,4094,-5259,10164,5947,-1554,10883,547 } }, - { "Canon PowerShot G10", 0, 0, - { 11093,-3906,-1028,-5047,12492,2879,-1003,1750,5561 } }, - { "Canon PowerShot G11", 0, 0, - { 12177,-4817,-1069,-1612,9864,2049,-98,850,4471 } }, - { "Canon PowerShot G12", 0, 0, - { 13244,-5501,-1248,-1508,9858,1935,-270,1083,4366 } }, - { "Canon PowerShot G1 X", 0, 0, - { 7378,-1255,-1043,-4088,12251,2048,-876,1946,5805 } }, - { "Canon PowerShot G1", 0, 0, - { -4778,9467,2172,4743,-1141,4344,-5146,9908,6077,-1566,11051,557 } }, - { "Canon PowerShot G2", 0, 0, - { 9087,-2693,-1049,-6715,14382,2537,-2291,2819,7790 } }, - { "Canon PowerShot G3", 0, 0, - { 9212,-2781,-1073,-6573,14189,2605,-2300,2844,7664 } }, - { "Canon PowerShot G5", 0, 0, - { 9757,-2872,-933,-5972,13861,2301,-1622,2328,7212 } }, - { "Canon PowerShot G6", 0, 0, - { 9877,-3775,-871,-7613,14807,3072,-1448,1305,7485 } }, - { "Canon PowerShot G9", 0, 0, - { 7368,-2141,-598,-5621,13254,2625,-1418,1696,5743 } }, - { "Canon PowerShot Pro1", 0, 0, - { 10062,-3522,-999,-7643,15117,2730,-765,817,7323 } }, - { "Canon PowerShot Pro70", 34, 0, - { -4155,9818,1529,3939,-25,4522,-5521,9870,6610,-2238,10873,1342 } }, - { "Canon PowerShot Pro90", 0, 0, - { -4963,9896,2235,4642,-987,4294,-5162,10011,5859,-1770,11230,577 } }, - { "Canon PowerShot S30", 0, 0, - { 10566,-3652,-1129,-6552,14662,2006,-2197,2581,7670 } }, - { "Canon PowerShot S40", 0, 0, - { 8510,-2487,-940,-6869,14231,2900,-2318,2829,9013 } }, - { "Canon PowerShot S45", 0, 0, - { 8163,-2333,-955,-6682,14174,2751,-2077,2597,8041 } }, - { "Canon PowerShot S50", 0, 0, - { 8882,-2571,-863,-6348,14234,2288,-1516,2172,6569 } }, - { "Canon PowerShot S60", 0, 0, - { 8795,-2482,-797,-7804,15403,2573,-1422,1996,7082 } }, - { "Canon PowerShot S70", 0, 0, - { 9976,-3810,-832,-7115,14463,2906,-901,989,7889 } }, - { "Canon PowerShot S90", 0, 0, - { 12374,-5016,-1049,-1677,9902,2078,-83,852,4683 } }, - { "Canon PowerShot S95", 0, 0, - { 13440,-5896,-1279,-1236,9598,1931,-180,1001,4651 } }, - { "Canon PowerShot S100", 0, 0, - { 7968,-2565,-636,-2873,10697,2513,180,667,4211 } }, - { "Canon PowerShot A470", 0, 0, /* DJC */ - { 12513,-4407,-1242,-2680,10276,2405,-878,2215,4734 } }, - { "Canon PowerShot A610", 0, 0, /* DJC */ - { 15591,-6402,-1592,-5365,13198,2168,-1300,1824,5075 } }, - { "Canon PowerShot A620", 0, 0, /* DJC */ - { 15265,-6193,-1558,-4125,12116,2010,-888,1639,5220 } }, - { "Canon PowerShot A630", 0, 0, /* DJC */ - { 14201,-5308,-1757,-6087,14472,1617,-2191,3105,5348 } }, - { "Canon PowerShot A640", 0, 0, /* DJC */ - { 13124,-5329,-1390,-3602,11658,1944,-1612,2863,4885 } }, - { "Canon PowerShot A650", 0, 0, /* DJC */ - { 9427,-3036,-959,-2581,10671,1911,-1039,1982,4430 } }, - { "Canon PowerShot A720", 0, 0, /* DJC */ - { 14573,-5482,-1546,-1266,9799,1468,-1040,1912,3810 } }, - { "Canon PowerShot S2 IS", 0, 0, /* jlb */ - { 14062,-5199,-1446,-4712,12470,2243,-1286,2028,4836 } }, /* jlb - copied from Powershot S3 IS */ - { "Canon PowerShot S3 IS", 0, 0, /* DJC */ - { 14062,-5199,-1446,-4712,12470,2243,-1286,2028,4836 } }, - { "Canon PowerShot SX1 IS", 0, 0, - { 6578,-259,-502,-5974,13030,3309,-308,1058,4970 } }, - { "Canon PowerShot SX110 IS", 0, 0, /* DJC */ - { 14134,-5576,-1527,-1991,10719,1273,-1158,1929,3581 } }, - { "CASIO EX-S20", 0, 0, /* DJC */ - { 11634,-3924,-1128,-4968,12954,2015,-1588,2648,7206 } }, - { "CASIO EX-Z750", 0, 0, /* DJC */ - { 10819,-3873,-1099,-4903,13730,1175,-1755,3751,4632 } }, - { "CASIO EX-Z10", 128, 0xfff, /* DJC */ - { 9790,-3338,-603,-2321,10222,2099,-344,1273,4799 } }, - { "CINE 650", 0, 0, - { 3390,480,-500,-800,3610,340,-550,2336,1192 } }, - { "CINE 660", 0, 0, - { 3390,480,-500,-800,3610,340,-550,2336,1192 } }, - { "CINE", 0, 0, - { 20183,-4295,-423,-3940,15330,3985,-280,4870,9800 } }, - { "Contax N Digital", 0, 0xf1e, - { 7777,1285,-1053,-9280,16543,2916,-3677,5679,7060 } }, - { "EPSON R-D1", 0, 0, - { 6827,-1878,-732,-8429,16012,2564,-704,592,7145 } }, - { "FUJIFILM E550", 0, 0, - { 11044,-3888,-1120,-7248,15168,2208,-1531,2277,8069 } }, - { "FUJIFILM E900", 0, 0, - { 9183,-2526,-1078,-7461,15071,2574,-2022,2440,8639 } }, - { "FUJIFILM F5", 0, 0, - { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, - { "FUJIFILM F6", 0, 0, - { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, - { "FUJIFILM F77", 0, 0, - { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, - { "FUJIFILM F7", 0, 0, - { 10004,-3219,-1201,-7036,15047,2107,-1863,2565,7736 } }, - { "FUJIFILM F8", 0, 0, - { 11044,-3888,-1120,-7248,15168,2208,-1531,2277,8069 } }, - { "FUJIFILM S100FS", 514, 0, - { 11521,-4355,-1065,-6524,13767,3058,-1466,1984,6045 } }, - { "FUJIFILM S200EXR", 512, 0x3fff, - { 11401,-4498,-1312,-5088,12751,2613,-838,1568,5941 } }, - { "FUJIFILM S20Pro", 0, 0, - { 10004,-3219,-1201,-7036,15047,2107,-1863,2565,7736 } }, - { "FUJIFILM S2Pro", 128, 0, - { 12492,-4690,-1402,-7033,15423,1647,-1507,2111,7697 } }, - { "FUJIFILM S3Pro", 0, 0, - { 11807,-4612,-1294,-8927,16968,1988,-2120,2741,8006 } }, - { "FUJIFILM S5Pro", 0, 0, - { 12300,-5110,-1304,-9117,17143,1998,-1947,2448,8100 } }, - { "FUJIFILM S5000", 0, 0, - { 8754,-2732,-1019,-7204,15069,2276,-1702,2334,6982 } }, - { "FUJIFILM S5100", 0, 0, - { 11940,-4431,-1255,-6766,14428,2542,-993,1165,7421 } }, - { "FUJIFILM S5500", 0, 0, - { 11940,-4431,-1255,-6766,14428,2542,-993,1165,7421 } }, - { "FUJIFILM S5200", 0, 0, - { 9636,-2804,-988,-7442,15040,2589,-1803,2311,8621 } }, - { "FUJIFILM S5600", 0, 0, - { 9636,-2804,-988,-7442,15040,2589,-1803,2311,8621 } }, - { "FUJIFILM S6", 0, 0, - { 12628,-4887,-1401,-6861,14996,1962,-2198,2782,7091 } }, - { "FUJIFILM S7000", 0, 0, - { 10190,-3506,-1312,-7153,15051,2238,-2003,2399,7505 } }, - { "FUJIFILM S9000", 0, 0, - { 10491,-3423,-1145,-7385,15027,2538,-1809,2275,8692 } }, - { "FUJIFILM S9500", 0, 0, - { 10491,-3423,-1145,-7385,15027,2538,-1809,2275,8692 } }, - { "FUJIFILM S9100", 0, 0, - { 12343,-4515,-1285,-7165,14899,2435,-1895,2496,8800 } }, - { "FUJIFILM S9600", 0, 0, - { 12343,-4515,-1285,-7165,14899,2435,-1895,2496,8800 } }, - { "FUJIFILM IS-1", 0, 0, - { 21461,-10807,-1441,-2332,10599,1999,289,875,7703 } }, - { "FUJIFILM IS Pro", 0, 0, - { 12300,-5110,-1304,-9117,17143,1998,-1947,2448,8100 } }, - { "FUJIFILM HS10 HS11", 0, 0xf68, - { 12440,-3954,-1183,-1123,9674,1708,-83,1614,4086 } }, - { "FUJIFILM HS20EXR", 0, 0, - { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, - { "FUJIFILM HS3", 0, 0, - { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, - { "FUJIFILM X100", 0, 0, - { 12161,-4457,-1069,-5034,12874,2400,-795,1724,6904 } }, - { "FUJIFILM X10", 0, 0, - { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, - { "FUJIFILM X-Pro1", 0, 0, - { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, - { "FUJIFILM X-S1", 0, 0, - { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, - { "Imacon Ixpress", 0, 0, /* DJC */ - { 7025,-1415,-704,-5188,13765,1424,-1248,2742,6038 } }, - { "KODAK NC2000", 0, 0, - { 13891,-6055,-803,-465,9919,642,2121,82,1291 } }, - { "Kodak DCS315C", 8, 0, - { 17523,-4827,-2510,756,8546,-137,6113,1649,2250 } }, - { "Kodak DCS330C", 8, 0, - { 20620,-7572,-2801,-103,10073,-396,3551,-233,2220 } }, - { "KODAK DCS420", 0, 0, - { 10868,-1852,-644,-1537,11083,484,2343,628,2216 } }, - { "KODAK DCS460", 0, 0, - { 10592,-2206,-967,-1944,11685,230,2206,670,1273 } }, - { "KODAK EOSDCS1", 0, 0, - { 10592,-2206,-967,-1944,11685,230,2206,670,1273 } }, - { "KODAK EOSDCS3B", 0, 0, - { 9898,-2700,-940,-2478,12219,206,1985,634,1031 } }, - { "Kodak DCS520C", 180, 0, - { 24542,-10860,-3401,-1490,11370,-297,2858,-605,3225 } }, - { "Kodak DCS560C", 188, 0, - { 20482,-7172,-3125,-1033,10410,-285,2542,226,3136 } }, - { "Kodak DCS620C", 180, 0, - { 23617,-10175,-3149,-2054,11749,-272,2586,-489,3453 } }, - { "Kodak DCS620X", 185, 0, - { 13095,-6231,154,12221,-21,-2137,895,4602,2258 } }, - { "Kodak DCS660C", 214, 0, - { 18244,-6351,-2739,-791,11193,-521,3711,-129,2802 } }, - { "Kodak DCS720X", 0, 0, - { 11775,-5884,950,9556,1846,-1286,-1019,6221,2728 } }, - { "Kodak DCS760C", 0, 0, - { 16623,-6309,-1411,-4344,13923,323,2285,274,2926 } }, - { "Kodak DCS Pro SLR", 0, 0, - { 5494,2393,-232,-6427,13850,2846,-1876,3997,5445 } }, - { "Kodak DCS Pro 14nx", 0, 0, - { 5494,2393,-232,-6427,13850,2846,-1876,3997,5445 } }, - { "Kodak DCS Pro 14", 0, 0, - { 7791,3128,-776,-8588,16458,2039,-2455,4006,6198 } }, - { "Kodak ProBack645", 0, 0, - { 16414,-6060,-1470,-3555,13037,473,2545,122,4948 } }, - { "Kodak ProBack", 0, 0, - { 21179,-8316,-2918,-915,11019,-165,3477,-180,4210 } }, - { "KODAK P712", 0, 0, - { 9658,-3314,-823,-5163,12695,2768,-1342,1843,6044 } }, - { "KODAK P850", 0, 0xf7c, - { 10511,-3836,-1102,-6946,14587,2558,-1481,1792,6246 } }, - { "KODAK P880", 0, 0xfff, - { 12805,-4662,-1376,-7480,15267,2360,-1626,2194,7904 } }, - { "KODAK EasyShare Z980", 0, 0, - { 11313,-3559,-1101,-3893,11891,2257,-1214,2398,4908 } }, - { "KODAK EasyShare Z981", 0, 0, - { 12729,-4717,-1188,-1367,9187,2582,274,860,4411 } }, - { "KODAK EasyShare Z990", 0, 0xfed, - { 11749,-4048,-1309,-1867,10572,1489,-138,1449,4522 } }, - { "KODAK EASYSHARE Z1015", 0, 0xef1, - { 11265,-4286,-992,-4694,12343,2647,-1090,1523,5447 } }, - { "Leaf CMost", 0, 0, - { 3952,2189,449,-6701,14585,2275,-4536,7349,6536 } }, - { "Leaf Valeo 6", 0, 0, - { 3952,2189,449,-6701,14585,2275,-4536,7349,6536 } }, - { "Leaf Aptus 54S", 0, 0, - { 8236,1746,-1314,-8251,15953,2428,-3673,5786,5771 } }, - { "Leaf Aptus 65", 0, 0, - { 7914,1414,-1190,-8777,16582,2280,-2811,4605,5562 } }, - { "Leaf Aptus 75", 0, 0, - { 7914,1414,-1190,-8777,16582,2280,-2811,4605,5562 } }, - { "Leaf Aptus 22", 0, 0, - { 8236, 1746, -1314, -8251, 15953, 2428, -3673, 5786, 5770, } }, - { "Leaf Aptus-II 5", 0, 0, // Mamiya 645 AFD - { 8236, 1746, -1314, -8251, 15953, 2428, -3673, 5786, 5770, } }, - { "Leaf Aptus-II 6", 0, 0, - { 7914, 1414, -1190, -8777, 16582, 2280, -2811, 4605, 5562, } }, - { "Leaf Aptus-II 7", 0, 0, - { 7914, 1414, -1190, -8777, 16582, 2280, -2811, 4605, 5562, } }, - { "Leaf Aptus-II 8", 0, 0, // Hasselblad 500 Series - { 8236, 1746, -1314, -8251, 15953, 2428, -3673, 5786, 5770, } }, - { "Leaf Aptus-II 10", 0, 0, - { 8236, 1746, -1314, -8251, 15953, 2428, -3673, 5786, 5770, } }, - { "Leaf Aptus-II 10R", 0, 0, - { 8236, 1746, -1314, -8251, 15953, 2428, -3673, 5786, 5770, } }, - { "Leaf Aptus-II 12", 0, 0, - { 8236, 1746, -1314, -8251, 15953, 2428, -3673, 5786, 5770, } }, - { "Leaf", 0, 0, - { 8236,1746,-1314,-8251,15953,2428,-3673,5786,5771 } }, - { "Mamiya ZD", 0, 0, - { 7645,2579,-1363,-8689,16717,2015,-3712,5941,5961 } }, - { "Micron 2010", 110, 0, /* DJC */ - { 16695,-3761,-2151,155,9682,163,3433,951,4904 } }, - { "Minolta DiMAGE 5", 0, 0xf7d, - { 8983,-2942,-963,-6556,14476,2237,-2426,2887,8014 } }, - { "Minolta DiMAGE 7Hi", 0, 0xf7d, - { 11368,-3894,-1242,-6521,14358,2339,-2475,3056,7285 } }, - { "Minolta DiMAGE 7", 0, 0xf7d, - { 9144,-2777,-998,-6676,14556,2281,-2470,3019,7744 } }, - { "Minolta DiMAGE A1", 0, 0xf8b, - { 9274,-2547,-1167,-8220,16323,1943,-2273,2720,8340 } }, - { "MINOLTA DiMAGE A200", 0, 0, - { 8560,-2487,-986,-8112,15535,2771,-1209,1324,7743 } }, - { "Minolta DiMAGE A2", 0, 0xf8f, - { 9097,-2726,-1053,-8073,15506,2762,-966,981,7763 } }, - { "Minolta DiMAGE Z2", 0, 0, /* DJC */ - { 11280,-3564,-1370,-4655,12374,2282,-1423,2168,5396 } }, - { "MINOLTA DYNAX 5", 0, 0xffb, - { 10284,-3283,-1086,-7957,15762,2316,-829,882,6644 } }, - { "MINOLTA DYNAX 7", 0, 0xffb, - { 10239,-3104,-1099,-8037,15727,2451,-927,925,6871 } }, - { "MOTOROLA PIXL", 0, 0, /* DJC */ - { 8898,-989,-1033,-3292,11619,1674,-661,3178,5216 } }, - { "NIKON D100", 0, 0, - { 5902,-933,-782,-8983,16719,2354,-1402,1455,6464 } }, - { "NIKON D1H", 0, 0, - { 7577,-2166,-926,-7454,15592,1934,-2377,2808,8606 } }, - { "NIKON D1X", 0, 0, - { 7702,-2245,-975,-9114,17242,1875,-2679,3055,8521 } }, - { "NIKON D1", 0, 0, /* multiplied by 2.218750, 1.0, 1.148438 */ - { 16772,-4726,-2141,-7611,15713,1972,-2846,3494,9521 } }, - { "NIKON D200", 0, 0xfbc, - { 8367,-2248,-763,-8758,16447,2422,-1527,1550,8053 } }, - { "NIKON D2H", 0, 0, - { 5710,-901,-615,-8594,16617,2024,-2975,4120,6830 } }, - { "NIKON D2X", 0, 0, - { 10231,-2769,-1255,-8301,15900,2552,-797,680,7148 } }, - { "NIKON D3000", 0, 0, - { 8736,-2458,-935,-9075,16894,2251,-1354,1242,8263 } }, - { "NIKON D3100", 0, 0, - { 7911,-2167,-813,-5327,13150,2408,-1288,2483,7968 } }, - { "NIKON D3200", 0, 0, - { 7013,-1408,-635,-5268,12902,2640,-1470,2801,7379 } }, - { "NIKON D300", 0, 0, - { 9030,-1992,-715,-8465,16302,2255,-2689,3217,8069 } }, - { "NIKON D3X", 0, 0, - { 7171,-1986,-648,-8085,15555,2718,-2170,2512,7457 } }, - { "NIKON D3S", 0, 0, - { 8828,-2406,-694,-4874,12603,2541,-660,1509,7587 } }, - { "NIKON D3", 0, 0, - { 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 } }, - { "NIKON D40X", 0, 0, - { 8819,-2543,-911,-9025,16928,2151,-1329,1213,8449 } }, - { "NIKON D40", 0, 0, - { 6992,-1668,-806,-8138,15748,2543,-874,850,7897 } }, - { "NIKON D4", 0, 0, - { 8598,-2848,-857,-5618,13606,2195,-1002,1773,7137 } }, - { "NIKON D5000", 0, 0xf00, - { 7309,-1403,-519,-8474,16008,2622,-2433,2826,8064 } }, - { "NIKON D5100", 0, 0x3de6, - { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } }, - { "NIKON D50", 0, 0, - { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } }, - { "NIKON D60", 0, 0, - { 8736,-2458,-935,-9075,16894,2251,-1354,1242,8263 } }, - { "NIKON D7000", 0, 0, - { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } }, - { "NIKON D700", 0, 0, - { 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 } }, - { "NIKON D70", 0, 0, - { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } }, - { "NIKON D800", 0, 0, - { 7866,-2108,-555,-4869,12483,2681,-1176,2069,7501 } }, - { "NIKON D80", 0, 0, - { 8629,-2410,-883,-9055,16940,2171,-1490,1363,8520 } }, - { "NIKON D90", 0, 0xf00, - { 7309,-1403,-519,-8474,16008,2622,-2434,2826,8064 } }, - { "NIKON E950", 0, 0x3dd, /* DJC */ - { -3746,10611,1665,9621,-1734,2114,-2389,7082,3064,3406,6116,-244 } }, - { "NIKON E995", 0, 0, /* copied from E5000 */ - { -5547,11762,2189,5814,-558,3342,-4924,9840,5949,688,9083,96 } }, - { "NIKON E2100", 0, 0, /* copied from Z2, new white balance */ - { 13142,-4152,-1596,-4655,12374,2282,-1769,2696,6711} }, - { "NIKON E2500", 0, 0, - { -5547,11762,2189,5814,-558,3342,-4924,9840,5949,688,9083,96 } }, - { "NIKON E3200", 0, 0, /* DJC */ - { 9846,-2085,-1019,-3278,11109,2170,-774,2134,5745 } }, - { "NIKON E4300", 0, 0, /* copied from Minolta DiMAGE Z2 */ - { 11280,-3564,-1370,-4655,12374,2282,-1423,2168,5396 } }, - { "NIKON E4500", 0, 0, - { -5547,11762,2189,5814,-558,3342,-4924,9840,5949,688,9083,96 } }, - { "NIKON E5000", 0, 0, - { -5547,11762,2189,5814,-558,3342,-4924,9840,5949,688,9083,96 } }, - { "NIKON E5400", 0, 0, - { 9349,-2987,-1001,-7919,15766,2266,-2098,2680,6839 } }, - { "NIKON E5700", 0, 0, - { -5368,11478,2368,5537,-113,3148,-4969,10021,5782,778,9028,211 } }, - { "NIKON E8400", 0, 0, - { 7842,-2320,-992,-8154,15718,2599,-1098,1342,7560 } }, - { "NIKON E8700", 0, 0, - { 8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354 } }, - { "NIKON E8800", 0, 0, - { 7971,-2314,-913,-8451,15762,2894,-1442,1520,7610 } }, - { "NIKON COOLPIX P6000", 0, 0, - { 9698,-3367,-914,-4706,12584,2368,-837,968,5801 } }, - { "NIKON COOLPIX P7000", 0, 0, - { 11432,-3679,-1111,-3169,11239,2202,-791,1380,4455 } }, - { "NIKON COOLPIX P7100", 0, 0, - { 11053,-4269,-1024,-1976,10182,2088,-526,1263,4469 } }, - { "NIKON 1 ", 0, 0, - { 8994,-2667,-865,-4594,12324,2552,-699,1786,6260 } }, - { "OLYMPUS C5050", 0, 0, - { 10508,-3124,-1273,-6079,14294,1901,-1653,2306,6237 } }, - { "OLYMPUS C5060", 0, 0, - { 10445,-3362,-1307,-7662,15690,2058,-1135,1176,7602 } }, - { "OLYMPUS C7070", 0, 0, - { 10252,-3531,-1095,-7114,14850,2436,-1451,1723,6365 } }, - { "OLYMPUS C70", 0, 0, - { 10793,-3791,-1146,-7498,15177,2488,-1390,1577,7321 } }, - { "OLYMPUS C80", 0, 0, - { 8606,-2509,-1014,-8238,15714,2703,-942,979,7760 } }, - { "OLYMPUS E-10", 0, 0xffc, - { 12745,-4500,-1416,-6062,14542,1580,-1934,2256,6603 } }, - { "OLYMPUS E-1", 0, 0, - { 11846,-4767,-945,-7027,15878,1089,-2699,4122,8311 } }, - { "OLYMPUS E-20", 0, 0xffc, - { 13173,-4732,-1499,-5807,14036,1895,-2045,2452,7142 } }, - { "OLYMPUS E-300", 0, 0, - { 7828,-1761,-348,-5788,14071,1830,-2853,4518,6557 } }, - { "OLYMPUS E-330", 0, 0, - { 8961,-2473,-1084,-7979,15990,2067,-2319,3035,8249 } }, - { "OLYMPUS E-30", 0, 0xfbc, - { 8144,-1861,-1111,-7763,15894,1929,-1865,2542,7607 } }, - { "OLYMPUS E-3", 0, 0xf99, - { 9487,-2875,-1115,-7533,15606,2010,-1618,2100,7389 } }, - { "OLYMPUS E-400", 0, 0, - { 6169,-1483,-21,-7107,14761,2536,-2904,3580,8568 } }, - { "OLYMPUS E-410", 0, 0xf6a, - { 8856,-2582,-1026,-7761,15766,2082,-2009,2575,7469 } }, - { "OLYMPUS E-420", 0, 0xfd7, - { 8746,-2425,-1095,-7594,15612,2073,-1780,2309,7416 } }, - { "OLYMPUS E-450", 0, 0xfd2, - { 8745,-2425,-1095,-7594,15613,2073,-1780,2309,7416 } }, - { "OLYMPUS E-500", 0, 0, - { 8136,-1968,-299,-5481,13742,1871,-2556,4205,6630 } }, - { "OLYMPUS E-510", 0, 0xf6a, - { 8785,-2529,-1033,-7639,15624,2112,-1783,2300,7817 } }, - { "OLYMPUS E-520", 0, 0xfd2, - { 8344,-2322,-1020,-7596,15635,2048,-1748,2269,7287 } }, - { "OLYMPUS E-5", 0, 0, - { 11200,-3783,-1325,-4576,12593,2206,-695,1742,7504 } }, - { "OLYMPUS E-600", 0, 0xfaf, - { 8453,-2198,-1092,-7609,15681,2008,-1725,2337,7824 } }, - { "OLYMPUS E-620", 0, 0xfaf, - { 8453,-2198,-1092,-7609,15681,2008,-1725,2337,7824 } }, - { "OLYMPUS E-P1", 0, 0xffd, - { 8343,-2050,-1021,-7715,15705,2103,-1831,2380,8235 } }, - { "OLYMPUS E-P2", 0, 0xffd, - { 8343,-2050,-1021,-7715,15705,2103,-1831,2380,8235 } }, - { "OLYMPUS E-P3", 0, 0, - { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } }, - { "OLYMPUS E-PL1s", 0, 0, - { 11409,-3872,-1393,-4572,12757,2003,-709,1810,7415 } }, - { "OLYMPUS E-PL1", 0, 0, - { 11408,-4289,-1215,-4286,12385,2118,-387,1467,7787 } }, - { "OLYMPUS E-PL2", 0, 0, - { 15030,-5552,-1806,-3987,12387,1767,-592,1670,7023 } }, - { "OLYMPUS E-PL3", 0, 0, - { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } }, - { "OLYMPUS E-PM1", 0, 0, - { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } }, - { "OLYMPUS E-M5", 0, 0, - { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, - { "OLYMPUS SP350", 0, 0, - { 12078,-4836,-1069,-6671,14306,2578,-786,939,7418 } }, - { "OLYMPUS SP3", 0, 0, - { 11766,-4445,-1067,-6901,14421,2707,-1029,1217,7572 } }, - { "OLYMPUS SP500UZ", 0, 0xfff, - { 9493,-3415,-666,-5211,12334,3260,-1548,2262,6482 } }, - { "OLYMPUS SP510UZ", 0, 0xffe, - { 10593,-3607,-1010,-5881,13127,3084,-1200,1805,6721 } }, - { "OLYMPUS SP550UZ", 0, 0xffe, - { 11597,-4006,-1049,-5432,12799,2957,-1029,1750,6516 } }, - { "OLYMPUS SP560UZ", 0, 0xff9, - { 10915,-3677,-982,-5587,12986,2911,-1168,1968,6223 } }, - { "OLYMPUS SP570UZ", 0, 0, - { 11522,-4044,-1146,-4736,12172,2904,-988,1829,6039 } }, - { "OLYMPUS XZ-1", 0, 0, - { 10901,-4095,-1074,-1141,9208,2293,-62,1417,5158 } }, - { "PENTAX *ist DL2", 0, 0, - { 10504,-2438,-1189,-8603,16207,2531,-1022,863,12242 } }, - { "PENTAX *ist DL", 0, 0, - { 10829,-2838,-1115,-8339,15817,2696,-837,680,11939 } }, - { "PENTAX *ist DS2", 0, 0, - { 10504,-2438,-1189,-8603,16207,2531,-1022,863,12242 } }, - { "PENTAX *ist DS", 0, 0, - { 10371,-2333,-1206,-8688,16231,2602,-1230,1116,11282 } }, - { "PENTAX *ist D", 0, 0, - { 9651,-2059,-1189,-8881,16512,2487,-1460,1345,10687 } }, - { "PENTAX K10D", 0, 0, - { 9566,-2863,-803,-7170,15172,2112,-818,803,9705 } }, - { "PENTAX K1", 0, 0, - { 11095,-3157,-1324,-8377,15834,2720,-1108,947,11688 } }, - { "PENTAX K20D", 0, 0, - { 9427,-2714,-868,-7493,16092,1373,-2199,3264,7180 } }, - { "PENTAX K200D", 0, 0, - { 9186,-2678,-907,-8693,16517,2260,-1129,1094,8524 } }, - { "PENTAX K2000", 0, 0, - { 11057,-3604,-1155,-5152,13046,2329,-282,375,8104 } }, - { "PENTAX K-m", 0, 0, - { 11057,-3604,-1155,-5152,13046,2329,-282,375,8104 } }, - { "PENTAX K-x", 0, 0, - { 8843,-2837,-625,-5025,12644,2668,-411,1234,7410 } }, - { "PENTAX K-r", 0, 0, - { 9895,-3077,-850,-5304,13035,2521,-883,1768,6936 } }, - { "PENTAX K-5", 0, 0, - { 8713,-2833,-743,-4342,11900,2772,-722,1543,6247 } }, - { "PENTAX K-7", 0, 0, - { 9142,-2947,-678,-8648,16967,1663,-2224,2898,8615 } }, - { "PENTAX 645D", 0, 0x3e00, - { 10646,-3593,-1158,-3329,11699,1831,-667,2874,6287 } }, - { "Panasonic DMC-FZ8", 0, 0xf7f, - { 8986,-2755,-802,-6341,13575,3077,-1476,2144,6379 } }, - { "Panasonic DMC-FZ18", 0, 0, - { 9932,-3060,-935,-5809,13331,2753,-1267,2155,5575 } }, - { "Panasonic DMC-FZ28", 15, 0xf96, - { 10109,-3488,-993,-5412,12812,2916,-1305,2140,5543 } }, - { "Panasonic DMC-FZ30", 0, 0xf94, - { 10976,-4029,-1141,-7918,15491,2600,-1670,2071,8246 } }, - { "Panasonic DMC-FZ3", 143, 0, - { 9938,-2780,-890,-4604,12393,2480,-1117,2304,4620 } }, - { "Panasonic DMC-FZ4", 143, 0, - { 13639,-5535,-1371,-1698,9633,2430,316,1152,4108 } }, - { "Panasonic DMC-FZ50", 0, 0, - { 7906,-2709,-594,-6231,13351,3220,-1922,2631,6537 } }, - { "LEICA V-LUX1", 0, 0, - { 7906,-2709,-594,-6231,13351,3220,-1922,2631,6537 } }, - { "Panasonic DMC-L10", 15, 0xf96, - { 8025,-1942,-1050,-7920,15904,2100,-2456,3005,7039 } }, - { "Panasonic DMC-L1", 0, 0xf7f, - { 8054,-1885,-1025,-8349,16367,2040,-2805,3542,7629 } }, - { "LEICA DIGILUX 3", 0, 0xf7f, - { 8054,-1885,-1025,-8349,16367,2040,-2805,3542,7629 } }, - { "Panasonic DMC-LC1", 0, 0, - { 11340,-4069,-1275,-7555,15266,2448,-2960,3426,7685 } }, - { "LEICA DIGILUX 2", 0, 0, - { 11340,-4069,-1275,-7555,15266,2448,-2960,3426,7685 } }, - { "Panasonic DMC-LX1", 0, 0xf7f, - { 10704,-4187,-1230,-8314,15952,2501,-920,945,8927 } }, - { "LEICA D-LUX2", 0, 0xf7f, - { 10704,-4187,-1230,-8314,15952,2501,-920,945,8927 } }, - { "Panasonic DMC-LX2", 0, 0, - { 8048,-2810,-623,-6450,13519,3272,-1700,2146,7049 } }, - { "LEICA D-LUX3", 0, 0, - { 8048,-2810,-623,-6450,13519,3272,-1700,2146,7049 } }, - { "Panasonic DMC-LX3", 15, 0, - { 8128,-2668,-655,-6134,13307,3161,-1782,2568,6083 } }, - { "LEICA D-LUX 4", 15, 0, - { 8128,-2668,-655,-6134,13307,3161,-1782,2568,6083 } }, - { "Panasonic DMC-LX5", 143, 0, - { 10909,-4295,-948,-1333,9306,2399,22,1738,4582 } }, - { "LEICA D-LUX 5", 143, 0, - { 10909,-4295,-948,-1333,9306,2399,22,1738,4582 } }, - { "Panasonic DMC-FZ100", 143, 0xfff, - { 16197,-6146,-1761,-2393,10765,1869,366,2238,5248 } }, - { "LEICA V-LUX 2", 143, 0xfff, - { 16197,-6146,-1761,-2393,10765,1869,366,2238,5248 } }, - { "Panasonic DMC-FZ150", 143, 0xfff, - { 11904,-4541,-1189,-2355,10899,1662,-296,1586,4289 } }, - { "LEICA V-LUX 3", 143, 0xfff, - { 11904,-4541,-1189,-2355,10899,1662,-296,1586,4289 } }, - { "Panasonic DMC-FX150", 15, 0xfff, - { 9082,-2907,-925,-6119,13377,3058,-1797,2641,5609 } }, - { "Panasonic DMC-G10", 0, 0, - { 10113,-3400,-1114,-4765,12683,2317,-377,1437,6710 } }, - { "Panasonic DMC-G1", 15, 0xf94, - { 8199,-2065,-1056,-8124,16156,2033,-2458,3022,7220 } }, - { "Panasonic DMC-G2", 15, 0xf3c, - { 10113,-3400,-1114,-4765,12683,2317,-377,1437,6710 } }, - { "Panasonic DMC-G3", 143, 0xfff, - { 6763,-1919,-863,-3868,11515,2684,-1216,2387,5879 } }, - { "Panasonic DMC-GF1", 15, 0xf92, - { 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } }, - { "Panasonic DMC-GF2", 143, 0xfff, - { 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } }, - { "Panasonic DMC-GF3", 143, 0xfff, - { 9051,-2468,-1204,-5212,13276,2121,-1197,2510,6890 } }, - { "Panasonic DMC-GF5", 143, 0xfff, - { 8228,-2945,-660,-3938,11792,2430,-1094,2278,5793 } }, - { "Panasonic DMC-GH1", 15, 0xf92, - { 6299,-1466,-532,-6535,13852,2969,-2331,3112,5984 } }, - { "Panasonic DMC-GH2", 15, 0xf95, - { 7780,-2410,-806,-3913,11724,2484,-1018,2390,5298 } }, - { "Panasonic DMC-GX1", 143, 0, - { 6763,-1919,-863,-3868,11515,2684,-1216,2387,5879 } }, - { "Phase One H 20", 0, 0, /* DJC */ - { 1313,1855,-109,-6715,15908,808,-327,1840,6020 } }, - { "Phase One H 25", 0, 0, - { 2905,732,-237,-8134,16626,1476,-3038,4253,7517 } }, - { "Phase One P 2", 0, 0, - { 2905,732,-237,-8134,16626,1476,-3038,4253,7517 } }, - { "Phase One P 30", 0, 0, - { 4516,-245,-37,-7020,14976,2173,-3206,4671,7087 } }, - { "Phase One P 45", 0, 0, - { 5053,-24,-117,-5684,14076,1702,-2619,4492,5849 } }, - { "Phase One P40", 0, 0, - { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, - { "Phase One P65", 0, 0, - { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, - { "RED ONE", 704, 0xffff, /* DJC */ - { 21014,-7891,-2613,-3056,12201,856,-2203,5125,8042 } }, - { "SAMSUNG EX1", 0, 0x3e00, - { 8898,-2498,-994,-3144,11328,2066,-760,1381,4576 } }, - { "SAMSUNG NX2", 0, 0xfff, /* NX20, NX200, NX210 */ - { 6933,-2268,-753,-4921,13387,1647,-803,1641,6096 } }, - { "SAMSUNG NX", 0, 0, /* NX5, NX10, NX11, NX100 */ - { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, - { "SAMSUNG WB2000", 0, 0xfff, - { 12093,-3557,-1155,-1000,9534,1733,-22,1787,4576 } }, - { "SAMSUNG GX-1", 0, 0, - { 10504,-2438,-1189,-8603,16207,2531,-1022,863,12242 } }, - { "SAMSUNG S85", 0, 0xffff, /* DJC */ - { 11885,-3968,-1473,-4214,12299,1916,-835,1655,5549 } }, - { "Sinar", 0, 0, /* DJC */ - { 16442,-2956,-2422,-2877,12128,750,-1136,6066,4559 } }, - { "SONY DSC-F828", 491, 0, - { 7924,-1910,-777,-8226,15459,2998,-1517,2199,6818,-7242,11401,3481 } }, - { "SONY DSC-R1", 512, 0, - { 8512,-2641,-694,-8042,15670,2526,-1821,2117,7414 } }, - { "SONY DSC-V3", 0, 0, - { 7511,-2571,-692,-7894,15088,3060,-948,1111,8128 } }, - { "SONY DSLR-A100", 0, 0xfeb, - { 9437,-2811,-774,-8405,16215,2290,-710,596,7181 } }, - { "SONY DSLR-A290", 0, 0, - { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, - { "SONY DSLR-A2", 0, 0, - { 9847,-3091,-928,-8485,16345,2225,-715,595,7103 } }, - { "SONY DSLR-A300", 0, 0, - { 9847,-3091,-928,-8485,16345,2225,-715,595,7103 } }, - { "SONY DSLR-A330", 0, 0, - { 9847,-3091,-929,-8485,16346,2225,-714,595,7103 } }, - { "SONY DSLR-A350", 0, 0xffc, - { 6038,-1484,-578,-9146,16746,2513,-875,746,7217 } }, - { "SONY DSLR-A380", 0, 0, - { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, - { "SONY DSLR-A390", 0, 0, - { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, - { "SONY DSLR-A450", 128, 0xfeb, - { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, - { "SONY DSLR-A580", 128, 0xfeb, - { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } }, - { "SONY DSLR-A5", 128, 0xfeb, - { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, - { "SONY DSLR-A700", 126, 0, - { 5775,-805,-359,-8574,16295,2391,-1943,2341,7249 } }, - { "SONY DSLR-A850", 128, 0, - { 5413,-1162,-365,-5665,13098,2866,-608,1179,8440 } }, - { "SONY DSLR-A900", 128, 0, - { 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } }, - { "SONY NEX-5N", 128, 0, - { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "SONY NEX-3", 138, 0, /* DJC */ - { 6907,-1256,-645,-4940,12621,2320,-1710,2581,6230 } }, - { "SONY NEX-5", 116, 0, /* DJC */ - { 6807,-1350,-342,-4216,11649,2567,-1089,2001,6420 } }, - { "SONY NEX-3", 128, 0, /* Adobe */ - { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } }, - { "SONY NEX-5", 128, 0, /* Adobe */ - { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } }, - { "SONY NEX-7", 128, 0, - { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "SONY NEX", 128, 0, /* NEX-C3, NEX-F3 */ - { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "SONY SLT-A33", 128, 0, - { 6069,-1221,-366,-5221,12779,2734,-1024,2066,6834 } }, - { "SONY SLT-A35", 128, 0, - { 5986,-1618,-415,-4557,11820,3120,-681,1404,6971 } }, - { "SONY SLT-A37", 128, 0, - { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "SONY SLT-A55", 128, 0, - { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } }, - { "SONY SLT-A57", 128, 0, - { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "SONY SLT-A65", 128, 0, - { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "SONY SLT-A77", 128, 0, - { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } } - }; - double cam_xyz[4][3]; - char name[130]; - int i, j; - - sprintf (name, "%s %s", p_make, p_model); - for (i=0; i < sizeof table / sizeof *table; i++) - if (!strncmp (name, table[i].prefix, strlen(table[i].prefix))) { - if (table[i].t_black) black = (ushort) table[i].t_black; - if (table[i].t_maximum) maximum = (ushort) table[i].t_maximum; - if (table[i].trans[0]) { - for (j=0; j < 12; j++) -#ifdef LIBRAW_LIBRARY_BUILD - imgdata.color.cam_xyz[0][j] = -#endif - cam_xyz[0][j] = table[i].trans[j] / 10000.0; - cam_xyz_coeff (cam_xyz); - } - break; - } -} - -void CLASS simple_coeff (int index) -{ - static const float table[][12] = { - /* index 0 -- all Foveon cameras */ - { 1.4032,-0.2231,-0.1016,-0.5263,1.4816,0.017,-0.0112,0.0183,0.9113 }, - /* index 1 -- Kodak DC20 and DC25 */ - { 2.25,0.75,-1.75,-0.25,-0.25,0.75,0.75,-0.25,-0.25,-1.75,0.75,2.25 }, - /* index 2 -- Logitech Fotoman Pixtura */ - { 1.893,-0.418,-0.476,-0.495,1.773,-0.278,-1.017,-0.655,2.672 }, - /* index 3 -- Nikon E880, E900, and E990 */ - { -1.936280, 1.800443, -1.448486, 2.584324, - 1.405365, -0.524955, -0.289090, 0.408680, - -1.204965, 1.082304, 2.941367, -1.818705 } - }; - int i, c; - - for (raw_color = i=0; i < 3; i++) - FORCC rgb_cam[i][c] = table[index][i*colors+c]; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.rgb_cam_state = LIBRAW_COLORSTATE_CALCULATED; -#endif -} - -short CLASS guess_byte_order (int words) -{ - uchar test[4][2]; - int t=2, msb; - double diff, sum[2] = {0,0}; - - fread (test[0], 2, 2, ifp); - for (words-=2; words--; ) { - fread (test[t], 2, 1, ifp); - for (msb=0; msb < 2; msb++) { - diff = (test[t^2][msb] << 8 | test[t^2][!msb]) - - (test[t ][msb] << 8 | test[t ][!msb]); - sum[msb] += diff*diff; - } - t = (t+1) & 3; - } - return sum[0] < sum[1] ? 0x4d4d : 0x4949; -} - - -float CLASS find_green (int bps, int bite, int off0, int off1) -{ - UINT64 bitbuf=0; - int vbits, col, i, c; - ushort img[2][2064]; - double sum[]={0,0}; - - FORC(2) { - fseek (ifp, c ? off1:off0, SEEK_SET); - for (vbits=col=0; col < width; col++) { - for (vbits -= bps; vbits < 0; vbits += bite) { - bitbuf <<= bite; - for (i=0; i < bite; i+=8) - bitbuf |= (unsigned) (fgetc(ifp) << i); - } - img[c][col] = bitbuf << (64-bps-vbits) >> (64-bps); - } - } - FORC(width-1) { - sum[ c & 1] += ABS(img[0][c]-img[1][c+1]); - sum[~c & 1] += ABS(img[1][c]-img[0][c+1]); - } - return 100 * log(sum[0]/sum[1]); -} - -/* - Identify which camera created this file, and set global variables - accordingly. - */ -void CLASS identify() -{ - char head[32], *cp; - int hlen, flen, fsize, zero_fsize=1, i, c, is_canon; - struct jhead jh; - short pana[][6] = { - { 3130, 1743, 4, 0, -6, 0 }, - { 3130, 2055, 4, 0, -6, 0 }, - { 3130, 2319, 4, 0, -6, 0 }, - { 3170, 2103, 18, 0,-42, 20 }, - { 3170, 2367, 18, 13,-42,-21 }, - { 3177, 2367, 0, 0, -1, 0 }, - { 3304, 2458, 0, 0, -1, 0 }, - { 3330, 2463, 9, 0, -5, 0 }, - { 3330, 2479, 9, 0,-17, 4 }, - { 3370, 1899, 15, 0,-44, 20 }, - { 3370, 2235, 15, 0,-44, 20 }, - { 3370, 2511, 15, 10,-44,-21 }, - { 3690, 2751, 3, 0, -8, -3 }, - { 3710, 2751, 0, 0, -3, 0 }, - { 3724, 2450, 0, 0, 0, -2 }, - { 3770, 2487, 17, 0,-44, 19 }, - { 3770, 2799, 17, 15,-44,-19 }, - { 3880, 2170, 6, 0, -6, 0 }, - { 4060, 3018, 0, 0, 0, -2 }, - { 4290, 2391, 3, 0, -8, -1 }, - { 4330, 2439, 17, 15,-44,-19 }, - { 4508, 2962, 0, 0, -3, -4 }, - { 4508, 3330, 0, 0, -3, -6 } }; - static const struct { - int fsize; - char t_make[12], t_model[19], withjpeg; - } table[] = { - { 62464, "Kodak", "DC20" ,0 }, - { 124928, "Kodak", "DC20" ,0 }, - { 1652736, "Kodak", "DCS200" ,0 }, - { 4159302, "Kodak", "C330" ,0 }, - { 4162462, "Kodak", "C330" ,0 }, - { 460800, "Kodak", "C603v" ,0 }, - { 614400, "Kodak", "C603v" ,0 }, - { 6163328, "Kodak", "C603" ,0 }, - { 6166488, "Kodak", "C603" ,0 }, - { 9116448, "Kodak", "C603y" ,0 }, - { 311696, "ST Micro", "STV680 VGA" ,0 }, /* SPYz */ - { 787456, "Creative", "PC-CAM 600" ,0 }, - { 1138688, "Minolta", "RD175" ,0 }, - { 3840000, "Foculus", "531C" ,0 }, - { 307200, "Generic", "640x480" ,0 }, - { 786432, "AVT", "F-080C" ,0 }, - { 1447680, "AVT", "F-145C" ,0 }, - { 1920000, "AVT", "F-201C" ,0 }, - { 5067304, "AVT", "F-510C" ,0 }, - { 5067316, "AVT", "F-510C" ,0 }, - { 10134608, "AVT", "F-510C" ,0 }, - { 10134620, "AVT", "F-510C" ,0 }, - { 16157136, "AVT", "F-810C" ,0 }, - { 1409024, "Sony", "XCD-SX910CR" ,0 }, - { 2818048, "Sony", "XCD-SX910CR" ,0 }, - { 3884928, "Micron", "2010" ,0 }, - { 6624000, "Pixelink", "A782" ,0 }, - { 13248000, "Pixelink", "A782" ,0 }, - { 6291456, "RoverShot","3320AF" ,0 }, - { 6553440, "Canon", "PowerShot A460" ,0 }, - { 6653280, "Canon", "PowerShot A530" ,0 }, - { 6573120, "Canon", "PowerShot A610" ,0 }, - { 9219600, "Canon", "PowerShot A620" ,0 }, - { 9243240, "Canon", "PowerShot A470" ,0 }, - { 10341600, "Canon", "PowerShot A720 IS",0 }, - { 10383120, "Canon", "PowerShot A630" ,0 }, - { 12945240, "Canon", "PowerShot A640" ,0 }, - { 15636240, "Canon", "PowerShot A650" ,0 }, - { 5298000, "Canon", "PowerShot SD300" ,0 }, - { 7710960, "Canon", "PowerShot S3 IS" ,0 }, - { 15467760, "Canon", "PowerShot SX110 IS",0 }, - { 15534576, "Canon", "PowerShot SX120 IS",0 }, - { 18653760, "Canon", "PowerShot SX20 IS",0 }, - { 19131120, "Canon", "PowerShot SX220 HS",0 }, - { 21936096, "Canon", "PowerShot SX30 IS",0 }, - { 5939200, "OLYMPUS", "C770UZ" ,0 }, - { 1581060, "NIKON", "E900" ,1 }, /* or E900s,E910 */ - { 2465792, "NIKON", "E950" ,1 }, /* or E800,E700 */ - { 2940928, "NIKON", "E2100" ,1 }, /* or E2500 */ - { 4771840, "NIKON", "E990" ,1 }, /* or E995, Oly C3030Z */ - { 4775936, "NIKON", "E3700" ,1 }, /* or Optio 33WR */ - { 5869568, "NIKON", "E4300" ,1 }, /* or DiMAGE Z2 */ - { 5865472, "NIKON", "E4500" ,1 }, - { 7438336, "NIKON", "E5000" ,1 }, /* or E5700 */ - { 8998912, "NIKON", "COOLPIX S6" ,1 }, - { 1976352, "CASIO", "QV-2000UX" ,1 }, - { 3217760, "CASIO", "QV-3*00EX" ,1 }, - { 6218368, "CASIO", "QV-5700" ,1 }, - { 6054400, "CASIO", "QV-R41" ,1 }, - { 7530816, "CASIO", "QV-R51" ,1 }, - { 7684000, "CASIO", "QV-4000" ,1 }, - { 2937856, "CASIO", "EX-S20" ,1 }, - { 4948608, "CASIO", "EX-S100" ,1 }, - { 7542528, "CASIO", "EX-Z50" ,1 }, - { 7562048, "CASIO", "EX-Z500" ,1 }, - { 7753344, "CASIO", "EX-Z55" ,1 }, - { 7816704, "CASIO", "EX-Z60" ,1 }, - { 10843712, "CASIO", "EX-Z75" ,1 }, - { 10834368, "CASIO", "EX-Z750" ,1 }, - { 12310144, "CASIO", "EX-Z850" ,1 }, - { 12489984, "CASIO", "EX-Z8" ,1 }, - { 15499264, "CASIO", "EX-Z1050" ,1 }, - { 7426656, "CASIO", "EX-P505" ,1 }, - { 9313536, "CASIO", "EX-P600" ,1 }, - { 10979200, "CASIO", "EX-P700" ,1 }, - { 3178560, "PENTAX", "Optio S" ,1 }, - { 4841984, "PENTAX", "Optio S" ,1 }, - { 6114240, "PENTAX", "Optio S4" ,1 }, /* or S4i, CASIO EX-Z4 */ - { 10702848, "PENTAX", "Optio 750Z" ,1 }, - { 15980544, "AGFAPHOTO","DC-833m" ,1 }, - { 16098048, "SAMSUNG", "S85" ,1 }, - { 16215552, "SAMSUNG", "S85" ,1 }, - { 20487168, "SAMSUNG", "WB550" ,1 }, - { 24000000, "SAMSUNG", "WB550" ,1 }, - { 9994240, "ptGrey", "GRAS-50S5C" ,0 }, // KC: SUPPORT GRASSHOPPER - { 10075968, "JaiPulnix","BB-500CL" ,0 }, // KC: SUPPORT BB-500CL - { 10108896, "JaiPulnix","BB-500GE" ,0 }, // KC: SUPPORT BB-500GE - { 10036800, "SVS", "SVS625CL" ,0 }, // KC: SUPPORT SVS625 cameralink - { 12582980, "Sinar", "" ,0 }, - { 33292868, "Sinar", "" ,0 }, - { 44390468, "Sinar", "" ,0 } }; - static const char *corp[] = - { "Canon", "NIKON", "EPSON", "KODAK", "Kodak", "OLYMPUS", "PENTAX", - "MINOLTA", "Minolta", "Konica", "CASIO", "Sinar", "Phase One", - "SAMSUNG", "Mamiya", "MOTOROLA", "LEICA" }; - -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_IDENTIFY,0,2); -#endif - - tiff_flip = flip = filters = -1; /* 0 is valid, so -1 is unknown */ - raw_height = raw_width = fuji_width = fuji_layout = cr2_slice[0] = 0; - maximum = height = width = top_margin = left_margin = 0; - cdesc[0] = desc[0] = artist[0] = make[0] = model[0] = model2[0] = 0; - iso_speed = shutter = aperture = focal_len = unique_id = 0; - tiff_nifds = 0; - memset (tiff_ifd, 0, sizeof tiff_ifd); - memset (gpsdata, 0, sizeof gpsdata); - memset (cblack, 0, sizeof cblack); - memset (white, 0, sizeof white); - thumb_offset = thumb_length = thumb_width = thumb_height = 0; - load_raw = thumb_load_raw = 0; - write_thumb = &CLASS jpeg_thumb; - data_offset = meta_length = tiff_bps = tiff_compress = 0; - kodak_cbpp = zero_after_ff = dng_version = load_flags = 0; - timestamp = shot_order = tiff_samples = black = is_foveon = 0; - mix_green = profile_length = data_error = zero_is_bad = 0; - pixel_aspect = is_raw = raw_color = 1; - tile_width = tile_length = INT_MAX; - for (i=0; i < 4; i++) { - cam_mul[i] = i == 1; - pre_mul[i] = i < 3; - FORC3 cmatrix[c][i] = 0; - FORC3 rgb_cam[c][i] = c == i; - } -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cmatrix_state = LIBRAW_COLORSTATE_INIT; - color_flags.rgb_cam_state = LIBRAW_COLORSTATE_INIT; - color_flags.pre_mul_state = LIBRAW_COLORSTATE_INIT; - color_flags.cam_mul_state = LIBRAW_COLORSTATE_INIT; -#endif - colors = 3; - for (i=0; i < 0x4000; i++) curve[i] = i; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.curve_state = LIBRAW_COLORSTATE_INIT; -#endif - - order = get2(); - hlen = get4(); - fseek (ifp, 0, SEEK_SET); - fread (head, 1, 32, ifp); - fseek (ifp, 0, SEEK_END); - flen = fsize = ftell(ifp); - if ((cp = (char *) memmem (head, 32, (char*)"MMMM", 4)) || - (cp = (char *) memmem (head, 32, (char*)"IIII", 4))) { - parse_phase_one (cp-head); - if (cp-head && parse_tiff(0)) apply_tiff(); - } else if (order == 0x4949 || order == 0x4d4d) { - if (!memcmp (head+6,"HEAPCCDR",8)) { - data_offset = hlen; - parse_ciff (hlen, flen - hlen); - } else if (parse_tiff(0)) apply_tiff(); - } else if (!memcmp (head,"\xff\xd8\xff\xe1",4) && - !memcmp (head+6,"Exif",4)) { - fseek (ifp, 4, SEEK_SET); - data_offset = 4 + get2(); - fseek (ifp, data_offset, SEEK_SET); - if (fgetc(ifp) != 0xff) - parse_tiff(12); - thumb_offset = 0; - } else if (!memcmp (head+25,"ARECOYK",7)) { - strcpy (make, "Contax"); - strcpy (model,"N Digital"); - fseek (ifp, 33, SEEK_SET); - get_timestamp(1); - fseek (ifp, 60, SEEK_SET); - FORC4 cam_mul[c ^ (c >> 1)] = get4(); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.cam_mul_state = LIBRAW_COLORSTATE_LOADED; -#endif - } else if (!strcmp (head, "PXN")) { - strcpy (make, "Logitech"); - strcpy (model,"Fotoman Pixtura"); - } else if (!strcmp (head, "qktk")) { - strcpy (make, "Apple"); - strcpy (model,"QuickTake 100"); - load_raw = &CLASS quicktake_100_load_raw; - } else if (!strcmp (head, "qktn")) { - strcpy (make, "Apple"); - strcpy (model,"QuickTake 150"); - load_raw = &CLASS kodak_radc_load_raw; - } else if (!memcmp (head,"FUJIFILM",8)) { - fseek (ifp, 84, SEEK_SET); - thumb_offset = get4(); - thumb_length = get4(); - fseek (ifp, 92, SEEK_SET); - parse_fuji (get4()); - if (thumb_offset > 120) { - fseek (ifp, 120, SEEK_SET); - is_raw += (i = get4()) && 1; - if (is_raw == 2 && shot_select) - parse_fuji (i); - } -// load_raw = &CLASS unpacked_load_raw; - fseek (ifp, 100+28*(shot_select > 0), SEEK_SET); - parse_tiff (data_offset = get4()); - parse_tiff (thumb_offset+12); - apply_tiff(); - } else if (!memcmp (head,"RIFF",4)) { - fseek (ifp, 0, SEEK_SET); - parse_riff(); - } else if (!memcmp (head,"\0\001\0\001\0@",6)) { - fseek (ifp, 6, SEEK_SET); - fread (make, 1, 8, ifp); - fread (model, 1, 8, ifp); - fread (model2, 1, 16, ifp); - data_offset = get2(); - get2(); - raw_width = get2(); - raw_height = get2(); - load_raw = &CLASS nokia_load_raw; - filters = 0x61616161; - } else if (!memcmp (head,"NOKIARAW",8)) { - strcpy (make, "NOKIA"); - strcpy (model, "X2"); - order = 0x4949; - fseek (ifp, 300, SEEK_SET); - data_offset = get4(); - i = get4(); - width = get2(); - height = get2(); - data_offset += i - width * 5 / 4 * height; - load_raw = &CLASS nokia_load_raw; - filters = 0x61616161; - } else if (!memcmp (head,"ARRI",4)) { - order = 0x4949; - fseek (ifp, 20, SEEK_SET); - width = get4(); - height = get4(); - strcpy (make, "ARRI"); - fseek (ifp, 668, SEEK_SET); - fread (model, 1, 64, ifp); - data_offset = 4096; - load_raw = &CLASS packed_load_raw; - load_flags = 88; - filters = 0x61616161; - } else if (!memcmp (head+4,"RED1",4)) { - strcpy (make, "RED"); - strcpy (model,"ONE"); - parse_redcine(); - load_raw = &CLASS redcine_load_raw; - gamma_curve (1/2.4, 12.92, 1, 4095); - filters = 0x49494949; - } else if (!memcmp (head,"DSC-Image",9)) - parse_rollei(); - else if (!memcmp (head,"PWAD",4)) - parse_sinar_ia(); - else if (!memcmp (head,"\0MRM",4)) - parse_minolta(0); - else if (!memcmp (head,"FOVb",4)) - { - parse_foveon(); - if(!strcasecmp(make,"SIGMA") && !strncasecmp(model,"SIGMA DP",8)) - { - make[0] = model[0] = 0; - is_foveon = 0; - } - } - else if (!memcmp (head,"CI",2)) - parse_cine(); - else - for (zero_fsize=i=0; i < sizeof table / sizeof *table; i++) - if (fsize == table[i].fsize) { - strcpy (make, table[i].t_make ); - strcpy (model, table[i].t_model); - if (table[i].withjpeg) - parse_external_jpeg(); - } - if (zero_fsize) fsize = 0; - if (make[0] == 0) parse_smal (0, flen); - if (make[0] == 0) parse_jpeg (is_raw = 0); - - for (i=0; i < sizeof corp / sizeof *corp; i++) - if (strstr (make, corp[i])) /* Simplify company names */ - strcpy (make, corp[i]); - if (!strncmp (make,"KODAK",5) && - ((cp = strstr(model," DIGITAL CAMERA")) || - (cp = strstr(model," Digital Camera")) || - (cp = strstr(model,"FILE VERSION")))) - *cp = 0; - cp = make + strlen(make); /* Remove trailing spaces */ - while (*--cp == ' ') *cp = 0; - cp = model + strlen(model); - while (*--cp == ' ') *cp = 0; - i = strlen(make); /* Remove make from model */ - if (!strncasecmp (model, make, i) && model[i++] == ' ') - memmove (model, model+i, 64-i); - if (!strncmp (model,"FinePix ",8)) - strcpy (model, model+8); - if (!strncmp (model,"Digital Camera ",15)) - strcpy (model, model+15); - desc[511] = artist[63] = make[63] = model[63] = model2[63] = 0; - if (!is_raw) goto notraw; - - if (!height) height = raw_height; - if (!width) width = raw_width; - if (fuji_width) { - fuji_width = (raw_width+1)/2; - width = height + fuji_width; - height = width - 1; - pixel_aspect = 1; - } - if (height == 2624 && width == 3936) /* Pentax K10D and Samsung GX10 */ - { height = 2616; width = 3896; } - if (height == 3136 && width == 4864) /* Pentax K20D and Samsung GX20 */ - { height = 3124; width = 4688; filters = 0x16161616; } - if (width == 4352 && (!strcmp(model,"K-r") || !strcmp(model,"K-x"))) - { width = 4309; filters = 0x16161616; } - if (width >= 4960 && !strcmp(model,"K-5")) - { left_margin = 10; width = 4950; filters = 0x16161616; } - if (width == 4736 && !strcmp(model,"K-7")) - { height = 3122; width = 4684; filters = 0x16161616; top_margin = 2; } - if (width == 7424 && !strcmp(model,"645D")) - { height = 5502; width = 7328; filters = 0x61616161; top_margin = 29; - left_margin = 48; } - if (height == 3014 && width == 4096) /* Ricoh GX200 */ - width = 4014; - if (dng_version) { - if (filters == UINT_MAX) filters = 0; - if (filters) is_raw = tiff_samples; - else colors = tiff_samples; - if (tiff_compress == 1) - load_raw = &CLASS adobe_dng_load_raw_nc; - if (tiff_compress == 7) - load_raw = &CLASS adobe_dng_load_raw_lj; - goto dng_skip; - } - if ((is_canon = !strcmp(make,"Canon"))) - load_raw = memcmp (head+6,"HEAPCCDR",8) ? - &CLASS lossless_jpeg_load_raw : &CLASS canon_compressed_load_raw; - if (!strcmp(make,"NIKON")) { - if (!load_raw) - load_raw = &CLASS packed_load_raw; - if (model[0] == 'E') - load_flags |= !data_offset << 2 | 2; - } - if (!strcmp(make,"CASIO")) { - load_raw = &CLASS packed_load_raw; - maximum = 0xf7f; - } - -/* Set parameters based on camera name (for non-DNG files). */ - if (is_foveon) { - if (height*2 < width) pixel_aspect = 0.5; - if (height > width) pixel_aspect = 2; - filters = 0; - load_raw = &CLASS foveon_load_raw; - simple_coeff(0); - } else if (is_canon && tiff_bps == 15) { - switch (width) { - case 3344: width -= 66; - case 3872: width -= 6; - } - filters = 0; - load_raw = &CLASS canon_sraw_load_raw; - } else if (!strcmp(model,"PowerShot 600")) { - height = 613; - width = 854; - raw_width = 896; - pixel_aspect = 607/628.0; - colors = 4; - filters = 0xe1e4e1e4; - load_raw = &CLASS canon_600_load_raw; - } else if (!strcmp(model,"PowerShot A5") || - !strcmp(model,"PowerShot A5 Zoom")) { - height = 773; - width = 960; - raw_width = 992; - pixel_aspect = 256/235.0; - colors = 4; - filters = 0x1e4e1e4e; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A50")) { - height = 968; - width = 1290; - raw_width = 1320; - colors = 4; - filters = 0x1b4e4b1e; - goto canon_a5; - } else if (!strcmp(model,"PowerShot Pro70")) { - height = 1024; - width = 1552; - colors = 4; - filters = 0x1e4b4e1b; - goto canon_a5; - } else if (!strcmp(model,"PowerShot SD300")) { - height = 1752; - width = 2344; - raw_height = 1766; - raw_width = 2400; - top_margin = 12; - left_margin = 12; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A460")) { - height = 1960; - width = 2616; - raw_height = 1968; - raw_width = 2664; - top_margin = 4; - left_margin = 4; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A530")) { - height = 1984; - width = 2620; - raw_height = 1992; - raw_width = 2672; - top_margin = 6; - left_margin = 10; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A610")) { - if (canon_s2is()) strcpy (model+10, "S2 IS"); - height = 1960; - width = 2616; - raw_height = 1968; - raw_width = 2672; - top_margin = 8; - left_margin = 12; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A620")) { - height = 2328; - width = 3112; - raw_height = 2340; - raw_width = 3152; - top_margin = 12; - left_margin = 36; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A470")) { - height = 2328; - width = 3096; - raw_height = 2346; - raw_width = 3152; - top_margin = 6; - left_margin = 12; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A720 IS")) { - height = 2472; - width = 3298; - raw_height = 2480; - raw_width = 3336; - top_margin = 5; - left_margin = 6; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A630")) { - height = 2472; - width = 3288; - raw_height = 2484; - raw_width = 3344; - top_margin = 6; - left_margin = 12; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A640")) { - height = 2760; - width = 3672; - raw_height = 2772; - raw_width = 3736; - top_margin = 6; - left_margin = 12; - goto canon_a5; - } else if (!strcmp(model,"PowerShot A650")) { - height = 3024; - width = 4032; - raw_height = 3048; - raw_width = 4104; - top_margin = 12; - left_margin = 48; - goto canon_a5; - } else if (!strcmp(model,"PowerShot S3 IS")) { - height = 2128; - width = 2840; - raw_height = 2136; - raw_width = 2888; - top_margin = 8; - left_margin = 44; -canon_a5: - tiff_bps = 10; - load_raw = &CLASS packed_load_raw; - load_flags = 40; - if (raw_width > 1600) zero_is_bad = 1; - } else if (!strcmp(model,"PowerShot SX110 IS")) { - height = 2760; - width = 3684; - raw_height = 2772; - raw_width = 3720; - top_margin = 12; - left_margin = 6; - load_raw = &CLASS packed_load_raw; - load_flags = 40; - zero_is_bad = 1; - } else if (!strcmp(model,"PowerShot SX120 IS")) { - height = 2742; - width = 3664; - raw_height = 2778; - raw_width = 3728; - top_margin = 18; - left_margin = 16; - filters = 0x49494949; - load_raw = &CLASS packed_load_raw; - load_flags = 40; - zero_is_bad = 1; - } else if (!strcmp(model,"PowerShot SX20 IS")) { - height = 3024; - width = 4032; - raw_height = 3048; - raw_width = 4080; - top_margin = 12; - left_margin = 24; - load_raw = &CLASS packed_load_raw; - load_flags = 40; - zero_is_bad = 1; - } else if (!strcmp(model,"PowerShot SX220 HS")) { - height = 3043; - width = 4072; - raw_height = 3060; - raw_width = 4168; -/* - mask[0][0] = top_margin = 16; - mask[0][2] = top_margin + height; - mask[0][3] = left_margin = 92; -*/ - load_raw = &CLASS packed_load_raw; - load_flags = 8; - zero_is_bad = 1; - } else if (!strcmp(model,"PowerShot SX30 IS")) { - height = 3254; - width = 4366; - raw_height = 3276; - raw_width = 4464; - top_margin = 10; - left_margin = 25; - filters = 0x16161616; - load_raw = &CLASS packed_load_raw; - load_flags = 40; - zero_is_bad = 1; - } else if (!strcmp(model,"PowerShot Pro90 IS")) { - width = 1896; - colors = 4; - filters = 0xb4b4b4b4; - } else if (is_canon && raw_width == 2144) { - height = 1550; - width = 2088; - top_margin = 8; - left_margin = 4; - if (!strcmp(model,"PowerShot G1")) { - colors = 4; - filters = 0xb4b4b4b4; - } - } else if (is_canon && raw_width == 2224) { - height = 1448; - width = 2176; - top_margin = 6; - left_margin = 48; - } else if (is_canon && raw_width == 2376) { - height = 1720; - width = 2312; - top_margin = 6; - left_margin = 12; - } else if (is_canon && raw_width == 2672) { - height = 1960; - width = 2616; - top_margin = 6; - left_margin = 12; - } else if (is_canon && raw_width == 3152) { - height = 2056; - width = 3088; - top_margin = 12; - left_margin = 64; - if (unique_id == 0x80000170) - adobe_coeff ("Canon","EOS 300D"); - } else if (is_canon && raw_width == 3160) { - height = 2328; - width = 3112; - top_margin = 12; - left_margin = 44; - } else if (is_canon && raw_width == 3344) { - height = 2472; - width = 3288; - top_margin = 6; - left_margin = 4; - } else if (!strcmp(model,"EOS D2000C")) { - filters = 0x61616161; - black = curve[200]; - } else if (is_canon && raw_width == 3516) { - top_margin = 14; - left_margin = 42; - if (unique_id == 0x80000189) - adobe_coeff ("Canon","EOS 350D"); - goto canon_cr2; - } else if (is_canon && raw_width == 3596) { - top_margin = 12; - left_margin = 74; - goto canon_cr2; - } else if (is_canon && raw_width == 3744) { - height = 2760; - width = 3684; - top_margin = 16; - left_margin = 8; - if (unique_id > 0x2720000) { - top_margin = 12; - left_margin = 52; - } - } else if (is_canon && raw_width == 3944) { - height = 2602; - width = 3908; - top_margin = 18; - left_margin = 30; - } else if (is_canon && raw_width == 3948) { - top_margin = 18; - left_margin = 42; - height -= 2; - if (unique_id == 0x80000236) - adobe_coeff ("Canon","EOS 400D"); - if (unique_id == 0x80000254) - adobe_coeff ("Canon","EOS 1000D"); - goto canon_cr2; - } else if (is_canon && raw_width == 3984) { - top_margin = 20; - left_margin = 76; - height -= 2; - goto canon_cr2; - } else if (is_canon && raw_width == 4104) { - height = 3024; - width = 4032; - top_margin = 12; - left_margin = 48; - } else if (is_canon && raw_width == 4152) { - top_margin = 12; - left_margin = 192; - goto canon_cr2; - } else if (is_canon && raw_width == 4160) { - height = 3048; - width = 4048; - top_margin = 11; - left_margin = 104; - } else if (is_canon && raw_width == 4312) { - top_margin = 18; - left_margin = 22; - height -= 2; - if (unique_id == 0x80000176) - adobe_coeff ("Canon","EOS 450D"); - goto canon_cr2; - } else if (is_canon && raw_width == 4352) { - top_margin = 18; - left_margin = 62; - if (unique_id == 0x80000288) - adobe_coeff ("Canon","EOS 1100D"); - goto canon_cr2; - } else if (is_canon && raw_width == 4476) { - top_margin = 34; - left_margin = 90; - goto canon_cr2; - } else if (is_canon && raw_width == 4480) { - height = 3326; - width = 4432; - top_margin = 10; - left_margin = 12; - filters = 0x49494949; - } else if (is_canon && raw_width == 4496) { - height = 3316; - width = 4404; - top_margin = 50; - left_margin = 80; - } else if (is_canon && raw_width == 4832) { - top_margin = unique_id == 0x80000261 ? 51:26; - left_margin = 62; - if (unique_id == 0x80000252) - adobe_coeff ("Canon","EOS 500D"); - goto canon_cr2; - } else if (is_canon && raw_width == 5108) { - top_margin = 13; - left_margin = 98; - goto canon_cr2; - } else if (is_canon && raw_width == 5120) { - height -= top_margin = 45; - left_margin = 142; - width = 4916; - } else if (is_canon && raw_width == 5344) { - top_margin = 51; - left_margin = 142; - if (unique_id == 0x80000269) { - top_margin = 100; - left_margin = 126; - height -= 2; - adobe_coeff ("Canon","EOS-1D X"); - } - if (unique_id == 0x80000270) - adobe_coeff ("Canon","EOS 550D"); - if (unique_id == 0x80000286) - adobe_coeff ("Canon","EOS 600D"); - goto canon_cr2; - } else if (is_canon && raw_width == 5360) { - top_margin = 51; - left_margin = 158; - goto canon_cr2; - } else if (is_canon && raw_width == 5712) { - height = 3752; - width = 5640; - top_margin = 20; - left_margin = 62; - } else if (is_canon && raw_width == 5792) { - top_margin = 51; - left_margin = 158; -canon_cr2: - height -= top_margin; - width -= left_margin; - } else if (is_canon && raw_width == 5920) { - height = 3870; - width = 5796; - top_margin = 80; - left_margin = 122; - } else if (!strcmp(model,"D1")) { - cam_mul[0] *= 256/527.0; - cam_mul[2] *= 256/317.0; - } else if (!strcmp(model,"D1X")) { - width -= 4; - pixel_aspect = 0.5; - } else if (!strcmp(model,"D40X") || - !strcmp(model,"D60") || - !strcmp(model,"D80") || - !strcmp(model,"D3000")) { - height -= 3; - width -= 4; - } else if (!strcmp(model,"D3") || - !strcmp(model,"D3S") || - !strcmp(model,"D700")) { - width -= 4; - left_margin = 2; - } else if (!strcmp(model,"D3100")) { - width -= 28; - left_margin = 6; - } else if (!strcmp(model,"D5000") || - !strcmp(model,"D90")) { - width -= 42; - } else if (!strcmp(model,"D5100") || - !strcmp(model,"D7000")) { - width -= 44; - } else if (!strcmp(model,"D3200") || - !strcmp(model,"D800")) { - width -= 46; - } else if (!strcmp(model,"D4")) { - width -= 52; - left_margin = 2; - } else if (!strncmp(model,"D40",3) || - !strncmp(model,"D50",3) || - !strncmp(model,"D70",3)) { - width--; - } else if (!strcmp(model,"D100")) { - if (tiff_compress == 34713 && !nikon_is_compressed()) { - load_raw = &CLASS packed_load_raw; - load_flags |= 1; - raw_width = (width += 3) + 3; - } - } else if (!strcmp(model,"D200")) { - left_margin = 1; - width -= 4; - filters = 0x94949494; - } else if (!strncmp(model,"D2H",3)) { - left_margin = 6; - width -= 14; - } else if (!strncmp(model,"D2X",3)) { - if (width == 3264) width -= 32; - else width -= 8; - } else if (!strncmp(model,"D300",4)) { - width -= 32; - } else if (!strncmp(model,"COOLPIX P",9)) { - load_flags = 24; - filters = 0x94949494; - if (model[9] == '7' && iso_speed >= 400) - black = 255; - } else if (!strncmp(model,"1 ",2)) { - height -= 2; - } else if (fsize == 1581060) { - height = 963; - width = 1287; - raw_width = 1632; - maximum = 0x3f4; - colors = 4; - filters = 0x1e1e1e1e; - simple_coeff(3); - pre_mul[0] = 1.2085; - pre_mul[1] = 1.0943; - pre_mul[3] = 1.1103; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.pre_mul_state = LIBRAW_COLORSTATE_CONST; -#endif - goto e900; - } else if (fsize == 2465792) { - height = 1203; - width = 1616; - raw_width = 2048; - colors = 4; - filters = 0x4b4b4b4b; - adobe_coeff ("NIKON","E950"); -e900: - tiff_bps = 10; - load_raw = &CLASS packed_load_raw; - load_flags = 6; - } else if (fsize == 4771840) { - height = 1540; - width = 2064; - colors = 4; - filters = 0xe1e1e1e1; - load_raw = &CLASS packed_load_raw; - load_flags = 6; - if (!timestamp && nikon_e995()) - strcpy (model, "E995"); - if (strcmp(model,"E995")) { - filters = 0xb4b4b4b4; - simple_coeff(3); - pre_mul[0] = 1.196; - pre_mul[1] = 1.246; - pre_mul[2] = 1.018; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.pre_mul_state = LIBRAW_COLORSTATE_CONST; -#endif - } - } else if (!strcmp(model,"E2100")) { - if (!timestamp && !nikon_e2100()) goto cp_e2500; - height = 1206; - width = 1616; - load_flags = 30; - } else if (!strcmp(model,"E2500")) { -cp_e2500: - strcpy (model, "E2500"); - height = 1204; - width = 1616; - colors = 4; - filters = 0x4b4b4b4b; - } else if (fsize == 4775936) { - height = 1542; - width = 2064; - load_raw = &CLASS packed_load_raw; - load_flags = 30; - if (!timestamp) nikon_3700(); - if (model[0] == 'E' && atoi(model+1) < 3700) - filters = 0x49494949; - if (!strcmp(model,"Optio 33WR")) { - flip = 1; - filters = 0x16161616; - } - if (make[0] == 'O') { - i = find_green (12, 32, 1188864, 3576832); - c = find_green (12, 32, 2383920, 2387016); - if (abs(i) < abs(c)) { - SWAP(i,c); - load_flags = 24; - } - if (i < 0) filters = 0x61616161; - } - } else if (fsize == 5869568) { - height = 1710; - width = 2288; - filters = 0x16161616; - if (!timestamp && minolta_z2()) { - strcpy (make, "Minolta"); - strcpy (model,"DiMAGE Z2"); - } - load_raw = &CLASS packed_load_raw; - load_flags = 6 + 24*(make[0] == 'M'); - } else if (!strcmp(model,"E4500")) { - height = 1708; - width = 2288; - colors = 4; - filters = 0xb4b4b4b4; - } else if (fsize == 7438336) { - height = 1924; - width = 2576; - colors = 4; - filters = 0xb4b4b4b4; - } else if (fsize == 8998912) { - height = 2118; - width = 2832; - maximum = 0xf83; - load_raw = &CLASS packed_load_raw; - load_flags = 30; - } else if (!strcmp(make,"FUJIFILM")) { - if (!strcmp(model+7,"S2Pro")) { - strcpy (model,"S2Pro"); - height = 2144; - width = 2880; - flip = 6; - } else if (load_raw != &CLASS packed_load_raw) - maximum = (is_raw == 2 && shot_select) ? 0x2f00 : 0x3e00; - top_margin = (raw_height - height) >> 2 << 1; - left_margin = (raw_width - width ) >> 2 << 1; - if (width == 3328) { - width = 3262; - left_margin = 34; - } - if (!strcmp(model,"X10") || !strcmp(model,"X-S1")) - filters = 0x16161616; - if (fuji_layout) raw_width *= is_raw; - if (load_raw == &CLASS fuji_load_raw) { - fuji_width = width >> !fuji_layout; - width = (height >> fuji_layout) + fuji_width; - raw_height = height; - height = width - 1; - if (~fuji_width & 1) filters = 0x49494949; - } - if (!strcmp(model,"X-Pro1")) { - left_margin = 0; - filters = 2; - is_raw = 0; /* Not supported! */ - } - } else if (!strcmp(model,"RD175")) { - height = 986; - width = 1534; - data_offset = 513; - filters = 0x61616161; - load_raw = &CLASS minolta_rd175_load_raw; - } else if (!strcmp(model,"KD-400Z")) { - height = 1712; - width = 2312; - raw_width = 2336; - goto konica_400z; - } else if (!strcmp(model,"KD-510Z")) { - goto konica_510z; - } else if (!strcasecmp(make,"MINOLTA")) { - load_raw = &CLASS unpacked_load_raw; - maximum = 0xfff; - if (!strncmp(model,"DiMAGE A",8)) { - if (!strcmp(model,"DiMAGE A200")) - filters = 0x49494949; - tiff_bps = 12; - load_raw = &CLASS packed_load_raw; - } else if (!strncmp(model,"ALPHA",5) || - !strncmp(model,"DYNAX",5) || - !strncmp(model,"MAXXUM",6)) { - sprintf (model+20, "DYNAX %-10s", model+6+(model[0]=='M')); - adobe_coeff (make, model+20); - load_raw = &CLASS packed_load_raw; - } else if (!strncmp(model,"DiMAGE G",8)) { - if (model[8] == '4') { - height = 1716; - width = 2304; - } else if (model[8] == '5') { -konica_510z: - height = 1956; - width = 2607; - raw_width = 2624; - } else if (model[8] == '6') { - height = 2136; - width = 2848; - } - data_offset += 14; - filters = 0x61616161; -konica_400z: - load_raw = &CLASS unpacked_load_raw; - maximum = 0x3df; - order = 0x4d4d; - } - } else if (!strcmp(model,"*ist D")) { - load_raw = &CLASS unpacked_load_raw; - data_error = -1; - } else if (!strcmp(model,"*ist DS")) { - height -= 2; - } else if (!strcmp(model,"Optio S")) { - if (fsize == 3178560) { - height = 1540; - width = 2064; - load_raw = &CLASS eight_bit_load_raw; - cam_mul[0] *= 4; - cam_mul[2] *= 4; - } else { - height = 1544; - width = 2068; - raw_width = 3136; - load_raw = &CLASS packed_load_raw; - maximum = 0xf7c; - } - } else if (fsize == 6114240) { - height = 1737; - width = 2324; - raw_width = 3520; - load_raw = &CLASS packed_load_raw; - maximum = 0xf7a; - } else if (!strcmp(model,"Optio 750Z")) { - height = 2302; - width = 3072; - load_raw = &CLASS packed_load_raw; - load_flags = 30; - } else if (!strcmp(model,"DC-833m")) { - height = 2448; - width = 3264; - order = 0x4949; - filters = 0x61616161; - load_raw = &CLASS unpacked_load_raw; - maximum = 0xfc00; - } else if (!strncmp(model,"S85",3)) { - height = 2448; - width = 3264; - raw_width = fsize/height/2; - order = 0x4d4d; - load_raw = &CLASS unpacked_load_raw; - } else if (!strncmp(model,"NX1",3)) { - height -= top_margin = 8; - width -= 2 * (left_margin = 8); - load_flags = 32; - } else if (!strcmp(model,"NX200")) { - order = 0x4949; - height = 3694; - top_margin = 2; - width = 5574 - (left_margin = 32 + tiff_bps); - if (tiff_bps == 12) load_flags = 80; - } else if (!strcmp(model,"EX1")) { - order = 0x4949; - height -= 20; - top_margin = 2; - if ((width -= 6) > 3682) { - height -= 10; - width -= 46; - top_margin = 8; - } - } else if (!strcmp(model,"WB2000")) { - order = 0x4949; - height -= 3; - top_margin = 2; - if ((width -= 10) > 3718) { - height -= 28; - width -= 56; - top_margin = 8; - } - } else if (fsize == 20487168) { - height = 2808; - width = 3648; - goto wb550; - } else if (fsize == 24000000) { - height = 3000; - width = 4000; -wb550: - strcpy (model, "WB550"); - order = 0x4d4d; - load_raw = &CLASS unpacked_load_raw; - load_flags = 6; - maximum = 0x3df; - } else if (!strcmp(model,"STV680 VGA")) { - height = 484; - width = 644; - load_raw = &CLASS eight_bit_load_raw; - flip = 2; - filters = 0x16161616; - black = 16; - } else if (!strcmp(model,"N95")) { - height = raw_height - (top_margin = 2); - } else if (!strcmp(model,"531C")) { - height = 1200; - width = 1600; - load_raw = &CLASS unpacked_load_raw; - filters = 0x49494949; - } else if (!strcmp(model,"640x480")) { - height = 480; - width = 640; - load_raw = &CLASS eight_bit_load_raw; - gamma_curve (0.45, 4.5, 1, 255); - } else if (!strcmp(model,"F-080C")) { - height = 768; - width = 1024; - load_raw = &CLASS eight_bit_load_raw; - } else if (!strcmp(model,"F-145C")) { - height = 1040; - width = 1392; - load_raw = &CLASS eight_bit_load_raw; - } else if (!strcmp(model,"F-201C")) { - height = 1200; - width = 1600; - load_raw = &CLASS eight_bit_load_raw; - } else if (!strcmp(model,"F-510C")) { - height = 1958; - width = 2588; - load_raw = fsize < 7500000 ? - &CLASS eight_bit_load_raw : &CLASS unpacked_load_raw; - data_offset = fsize - width*height*(fsize >> 22); - maximum = 0xfff0; - } else if (!strcmp(model,"F-810C")) { - height = 2469; - width = 3272; - load_raw = &CLASS unpacked_load_raw; - maximum = 0xfff0; - } else if (!strcmp(model,"XCD-SX910CR")) { - height = 1024; - width = 1375; - raw_width = 1376; - filters = 0x49494949; - maximum = 0x3ff; - load_raw = fsize < 2000000 ? - &CLASS eight_bit_load_raw : &CLASS unpacked_load_raw; - } else if (!strcmp(model,"2010")) { - height = 1207; - width = 1608; - order = 0x4949; - filters = 0x16161616; - data_offset = 3212; - maximum = 0x3ff; - load_raw = &CLASS unpacked_load_raw; - } else if (!strcmp(model,"A782")) { - height = 3000; - width = 2208; - filters = 0x61616161; - load_raw = fsize < 10000000 ? - &CLASS eight_bit_load_raw : &CLASS unpacked_load_raw; - maximum = 0xffc0; - } else if (!strcmp(model,"3320AF")) { - height = 1536; - raw_width = width = 2048; - filters = 0x61616161; - load_raw = &CLASS unpacked_load_raw; - maximum = 0x3ff; - fseek (ifp, 0x300000, SEEK_SET); - if ((order = guess_byte_order(0x10000)) == 0x4d4d) { - height -= (top_margin = 16); - width -= (left_margin = 28); - maximum = 0xf5c0; - strcpy (make, "ISG"); - model[0] = 0; - } - } else if (!strcmp(make,"Hasselblad")) { - if (load_raw == &CLASS lossless_jpeg_load_raw) - load_raw = &CLASS hasselblad_load_raw; - if (raw_width == 7262) { - height = 5444; - width = 7248; - top_margin = 4; - left_margin = 7; - filters = 0x61616161; - } else if (raw_width == 7410) { - height = 5502; - width = 7328; - top_margin = 4; - left_margin = 41; - filters = 0x61616161; - } else if (raw_width == 9044) { - height = 6716; - width = 8964; - top_margin = 8; - left_margin = 40; - black += load_flags = 256; - maximum = 0x8101; - } else if (raw_width == 4090) { - strcpy (model, "V96C"); - height -= (top_margin = 6); - width -= (left_margin = 3) + 7; - filters = 0x61616161; - } - } else if (!strcmp(make,"Sinar")) { - if (!memcmp(head,"8BPS",4)) { - fseek (ifp, 14, SEEK_SET); - height = get4(); - width = get4(); - filters = 0x61616161; - data_offset = 68; - } - if (!load_raw) load_raw = &CLASS unpacked_load_raw; - maximum = 0x3fff; - } else if (!strcmp(make,"Leaf")) { - maximum = 0x3fff; - fseek (ifp, data_offset, SEEK_SET); - if (ljpeg_start (&jh, 1) && jh.bits == 15) - maximum = 0x1fff; - if (tiff_samples > 1) filters = 0; - if (tiff_samples > 1 || tile_length < raw_height) { - load_raw = &CLASS leaf_hdr_load_raw; - raw_width = tile_width; - } - if ((width | height) == 2048) { - if (tiff_samples == 1) { - filters = 1; - strcpy (cdesc, "RBTG"); - strcpy (model, "CatchLight"); - top_margin = 8; left_margin = 18; height = 2032; width = 2016; - } else { - strcpy (model, "DCB2"); - top_margin = 10; left_margin = 16; height = 2028; width = 2022; - } - } else if (width+height == 3144+2060) { - if (!model[0]) strcpy (model, "Cantare"); - if (width > height) { - top_margin = 6; left_margin = 32; height = 2048; width = 3072; - filters = 0x61616161; - } else { - left_margin = 6; top_margin = 32; width = 2048; height = 3072; - filters = 0x16161616; - } - if (!cam_mul[0] || model[0] == 'V') filters = 0; - else is_raw = tiff_samples; - } else if (width == 2116) { - strcpy (model, "Valeo 6"); - height -= 2 * (top_margin = 30); - width -= 2 * (left_margin = 55); - filters = 0x49494949; - } else if (width == 3171) { - strcpy (model, "Valeo 6"); - height -= 2 * (top_margin = 24); - width -= 2 * (left_margin = 24); - filters = 0x16161616; - } - } else if (!strcmp(make,"LEICA") || !strcmp(make,"Panasonic")) { - if(raw_width < 1) { is_raw = 0; goto notraw; } - if ((flen - data_offset) / (raw_width*8/7) == raw_height) - load_raw = &CLASS panasonic_load_raw; - if (!load_raw) { - load_raw = &CLASS unpacked_load_raw; - load_flags = 4; - } - zero_is_bad = 1; - if ((height += 12) > raw_height) height = raw_height; - for (i=0; i < sizeof pana / sizeof *pana; i++) - if (raw_width == pana[i][0] && raw_height == pana[i][1]) { - left_margin = pana[i][2]; - top_margin = pana[i][3]; - width += pana[i][4]; - height += pana[i][5]; - } - filters = 0x01010101 * (uchar) "\x94\x61\x49\x16" - [((filters-1) ^ (left_margin & 1) ^ (top_margin << 1)) & 3]; - } else if (!strcmp(model,"C770UZ")) { - height = 1718; - width = 2304; - filters = 0x16161616; - load_raw = &CLASS packed_load_raw; - load_flags = 30; - } else if (!strcmp(make,"OLYMPUS")) { - height += height & 1; - filters = exif_cfa; - if (width == 4100) width -= 4; - if (width == 4080) width -= 24; - if (load_raw == &CLASS unpacked_load_raw) - load_flags = 4; - tiff_bps = 12; - if (!strcmp(model,"E-300") || - !strcmp(model,"E-500")) { - width -= 20; - if (load_raw == &CLASS unpacked_load_raw) { - maximum = 0xfc3; - memset (cblack, 0, sizeof cblack); - } - } else if (!strcmp(model,"E-330")) { - width -= 30; - if (load_raw == &CLASS unpacked_load_raw) - maximum = 0xf79; - } else if (!strcmp(model,"SP550UZ")) { - thumb_length = flen - (thumb_offset = 0xa39800); - thumb_height = 480; - thumb_width = 640; - } - } - else - identify2(fsize,flen,head); /* Avoid MS VS 2008 bug */ - - - if (!model[0]) - sprintf (model, "%dx%d", width, height); - if (filters == UINT_MAX) filters = 0x94949494; - if (raw_color) adobe_coeff (make, model); - if (load_raw == &CLASS kodak_radc_load_raw) - if (raw_color) adobe_coeff ("Apple","Quicktake"); - if (thumb_offset && !thumb_height) { - fseek (ifp, thumb_offset, SEEK_SET); - if (ljpeg_start (&jh, 1)) { - thumb_width = jh.wide; - thumb_height = jh.high; - } - } -dng_skip: - if (fuji_width) { -/* - fuji_width = width >> !fuji_layout; - if (~fuji_width & 1) filters = 0x49494949; - width = (height >> fuji_layout) + fuji_width; - height = width - 1; - pixel_aspect = 1; -*/ - } else { - if (raw_height < height) raw_height = height; - if (raw_width < width ) raw_width = width; - } - if (!tiff_bps) tiff_bps = 12; - if (!maximum) maximum = (1 << tiff_bps) - 1; - if (!load_raw || height < 22) is_raw = 0; -#ifdef NO_JASPER - if (load_raw == &CLASS redcine_load_raw) { -#ifdef DCRAW_VERBOSE - fprintf (stderr,_("%s: You must link dcraw with %s!!\n"), - ifname, "libjasper"); -#endif - is_raw = 0; -#ifdef LIBRAW_LIBRARY_BUILD - imgdata.process_warnings |= LIBRAW_WARN_NO_JASPER; -#endif - } -#endif -#ifdef NO_JPEG - if (load_raw == &CLASS kodak_jpeg_load_raw) { -#ifdef DCRAW_VERBOSE - fprintf (stderr,_("%s: You must link dcraw with %s!!\n"), - ifname, "libjpeg"); -#endif - is_raw = 0; -#ifdef LIBRAW_LIBRARY_BUILD - imgdata.process_warnings |= LIBRAW_WARN_NO_JPEGLIB; -#endif - } -#endif - if (!cdesc[0]) - strcpy (cdesc, colors == 3 ? "RGBG":"GMCY"); - if (!raw_height) raw_height = height; - if (!raw_width ) raw_width = width; - if (filters && colors == 3) - filters |= ((filters >> 2 & 0x22222222) | - (filters << 2 & 0x88888888)) & filters << 1; -notraw: - if (flip == -1) flip = tiff_flip; - if (flip == -1) flip = 0; - -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_IDENTIFY,1,2); -#endif -} - -void CLASS identify2(unsigned fsize, unsigned flen, char *head) -{ - if (!strcmp(model,"N Digital")) { - height = 2047; - width = 3072; - filters = 0x61616161; - data_offset = 0x1a00; - load_raw = &CLASS packed_load_raw; - } else if (!strcmp(model,"DSC-F828")) { - width = 3288; - left_margin = 5; - data_offset = 862144; - load_raw = &CLASS sony_load_raw; - filters = 0x9c9c9c9c; - colors = 4; - strcpy (cdesc, "RGBE"); - } else if (!strcmp(model,"DSC-V3")) { - width = 3109; - left_margin = 59; - data_offset = 787392; - load_raw = &CLASS sony_load_raw; - } else if (!strcmp(make,"SONY") && raw_width == 3984) { - adobe_coeff ("SONY","DSC-R1"); - width = 3925; - order = 0x4d4d; - } else if (!strcmp(make,"SONY") && raw_width == 6048) { - width -= 24; - } else if (!strcmp(model,"DSLR-A100")) { - if (width == 3880) { - height--; - width = ++raw_width; - } else { - order = 0x4d4d; - load_flags = 2; - } - filters = 0x61616161; - } else if (!strcmp(model,"DSLR-A350")) { - height -= 4; - } - else if (!strcmp(model,"PIXL")) { - height -= top_margin = 4; - width -= left_margin = 32; - gamma_curve (0, 7, 1, 255); - } else if (!strcmp(model,"C603v")) { - height = 480; - width = 640; - if (fsize < 614400 || find_green (16, 16, 3840, 5120) < 25) goto c603v; - strcpy (model,"KAI-0340"); - height -= 3; - data_offset = 3840; - order = 0x4949; - load_raw = &CLASS unpacked_load_raw; - } else if (!strcmp(model,"C603y")) { - height = 2134; - width = 2848; -c603v: - filters = 0; - load_raw = &CLASS kodak_yrgb_load_raw; - gamma_curve (0, 3.875, 1, 255); - } else if (!strcmp(model,"C603")) { - raw_height = height = 2152; - raw_width = width = 2864; - goto c603; - } else if (!strcmp(model,"C330")) { - height = 1744; - width = 2336; - raw_height = 1779; - raw_width = 2338; - top_margin = 33; - left_margin = 1; -c603: - order = 0x4949; - if ((data_offset = fsize - raw_height*raw_width)) { - fseek (ifp, 168, SEEK_SET); - read_shorts (curve, 256); -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.curve_state = LIBRAW_COLORSTATE_LOADED; -#endif - } else gamma_curve (0, 3.875, 1, 255); - load_raw = &CLASS eight_bit_load_raw; - } - else if (!strncasecmp(model,"EasyShare",9)) { - data_offset = data_offset < 0x15000 ? 0x15000 : 0x17000; - load_raw = &CLASS packed_load_raw; - } else if (!strcasecmp(make,"KODAK")) { - if (filters == UINT_MAX) filters = 0x61616161; - if (!strncmp(model,"NC2000",6)) { - width -= 4; - left_margin = 2; - } else if (!strcmp(model,"EOSDCS3B")) { - width -= 4; - left_margin = 2; - } else if (!strcmp(model,"EOSDCS1")) { - width -= 4; - left_margin = 2; - } else if (!strcmp(model,"DCS420")) { - width -= 4; - left_margin = 2; - } else if (!strncmp(model,"DCS460 ",7)) { - model[6] = 0; - width -= 4; - left_margin = 2; - } else if (!strcmp(model,"DCS460A")) { - width -= 4; - left_margin = 2; - colors = 1; - filters = 0; - } else if (!strcmp(model,"DCS660M")) { - black = 214; - colors = 1; - filters = 0; - } else if (!strcmp(model,"DCS760M")) { - colors = 1; - filters = 0; - } - if (!strcmp(model+4,"20X")) - strcpy (cdesc, "MYCY"); - if (strstr(model,"DC25")) { - strcpy (model, "DC25"); - data_offset = 15424; - } - if (!strncmp(model,"DC2",3)) { - raw_height = height = 242; - if (flen < 100000) { - raw_width = 256; width = 249; - pixel_aspect = (4.0*height) / (3.0*width); - } else { - raw_width = 512; width = 501; - pixel_aspect = (493.0*height) / (373.0*width); - } - data_offset += raw_width + 1; - colors = 4; - filters = 0x8d8d8d8d; - simple_coeff(1); - pre_mul[1] = 1.179; - pre_mul[2] = 1.209; - pre_mul[3] = 1.036; -#ifdef LIBRAW_LIBRARY_BUILD - color_flags.pre_mul_state = LIBRAW_COLORSTATE_CONST; -#endif - load_raw = &CLASS eight_bit_load_raw; - } else if (!strcmp(model,"40")) { - strcpy (model, "DC40"); - height = 512; - width = 768; - data_offset = 1152; - load_raw = &CLASS kodak_radc_load_raw; - } else if (strstr(model,"DC50")) { - strcpy (model, "DC50"); - height = 512; - width = 768; - data_offset = 19712; - load_raw = &CLASS kodak_radc_load_raw; - } else if (strstr(model,"DC120")) { - strcpy (model, "DC120"); - height = 976; - width = 848; - pixel_aspect = height/0.75/width; - load_raw = tiff_compress == 7 ? - &CLASS kodak_jpeg_load_raw : &CLASS kodak_dc120_load_raw; - } else if (!strcmp(model,"DCS200")) { - thumb_height = 128; - thumb_width = 192; - thumb_offset = 6144; - thumb_misc = 360; - write_thumb = &CLASS layer_thumb; - height = 1024; - width = 1536; - data_offset = 79872; - load_raw = &CLASS eight_bit_load_raw; - black = 17; - } -} else if (!strcmp(model,"Fotoman Pixtura")) { - height = 512; - width = 768; - data_offset = 3632; - load_raw = &CLASS kodak_radc_load_raw; - filters = 0x61616161; - simple_coeff(2); - } else if (!strncmp(model,"QuickTake",9)) { - if (head[5]) strcpy (model+10, "200"); - fseek (ifp, 544, SEEK_SET); - height = get2(); - width = get2(); - data_offset = (get4(),get2()) == 30 ? 738:736; - if (height > width) { - SWAP(height,width); - fseek (ifp, data_offset-6, SEEK_SET); - flip = ~get2() & 3 ? 5:6; - } - filters = 0x61616161; - } else if (!strcmp(make,"Rollei") && !load_raw) { - switch (raw_width) { - case 1316: - height = 1030; - width = 1300; - top_margin = 1; - left_margin = 6; - break; - case 2568: - height = 1960; - width = 2560; - top_margin = 2; - left_margin = 8; - } - filters = 0x16161616; - load_raw = &CLASS rollei_load_raw; - } else if (!strcmp(model,"PC-CAM 600")) { - height = 768; - data_offset = width = 1024; - filters = 0x49494949; - load_raw = &CLASS eight_bit_load_raw; - } -else if (!strcmp(model,"QV-2000UX")) { - height = 1208; - width = 1632; - data_offset = width * 2; - load_raw = &CLASS eight_bit_load_raw; - } else if (fsize == 3217760) { - height = 1546; - width = 2070; - raw_width = 2080; - load_raw = &CLASS eight_bit_load_raw; - } else if (!strcmp(model,"QV-4000")) { - height = 1700; - width = 2260; - load_raw = &CLASS unpacked_load_raw; - maximum = 0xffff; - } else if (!strcmp(model,"QV-5700")) { - height = 1924; - width = 2576; - raw_width = 3232; - tiff_bps = 10; - } else if (!strcmp(model,"QV-R41")) { - height = 1720; - width = 2312; - raw_width = 3520; - left_margin = 2; - } else if (!strcmp(model,"QV-R51")) { - height = 1926; - width = 2580; - raw_width = 3904; - } else if (!strcmp(model,"EX-S20")) { - height = 1208; - width = 1620; - raw_width = 2432; - flip = 3; - } else if (!strcmp(model,"EX-S100")) { - height = 1544; - width = 2058; - raw_width = 3136; - } else if (!strcmp(model,"EX-Z50")) { - height = 1931; - width = 2570; - raw_width = 3904; - } else if (!strcmp(model,"EX-Z500")) { - height = 1937; - width = 2577; - raw_width = 3904; - filters = 0x16161616; - } else if (!strcmp(model,"EX-Z55")) { - height = 1960; - width = 2570; - raw_width = 3904; - } else if (!strcmp(model,"EX-Z60")) { - height = 2145; - width = 2833; - raw_width = 3584; - filters = 0x16161616; - tiff_bps = 10; - } else if (!strcmp(model,"EX-Z75")) { - height = 2321; - width = 3089; - raw_width = 4672; - } else if (!strcmp(model,"EX-Z750")) { - height = 2319; - width = 3087; - raw_width = 4672; - maximum = 0xfff; - } else if (!strcmp(model,"EX-Z850")) { - height = 2468; - width = 3279; - raw_width = 4928; - maximum = 0xfff; - } else if (!strcmp(model,"EX-Z8")) { - height = 2467; - width = 3281; - raw_height = 2502; - raw_width = 4992; - maximum = 0xfff; - } else if (fsize == 15499264) { /* EX-Z1050 or EX-Z1080 */ - height = 2752; - width = 3672; - raw_width = 5632; - } else if (!strcmp(model,"EX-P505")) { - height = 1928; - width = 2568; - raw_width = 3852; - maximum = 0xfff; - } else if (fsize == 9313536) { /* EX-P600 or QV-R61 */ - height = 2142; - width = 2844; - raw_width = 4288; - } else if (!strcmp(model,"EX-P700")) { - height = 2318; - width = 3082; - raw_width = 4672; - } - else if (!strcmp(model,"GRAS-50S5C")) { - height = 2048; - width = 2440; - load_raw = &CLASS unpacked_load_raw; - data_offset = 0; - filters = 0x49494949; - order = 0x4949; - maximum = 0xfffC; - } else if (!strcmp(model,"BB-500CL")) { - height = 2058; - width = 2448; - load_raw = &CLASS unpacked_load_raw; - data_offset = 0; - filters = 0x94949494; - order = 0x4949; - maximum = 0x3fff; - } else if (!strcmp(model,"BB-500GE")) { - height = 2058; - width = 2456; - load_raw = &CLASS unpacked_load_raw; - data_offset = 0; - filters = 0x94949494; - order = 0x4949; - maximum = 0x3fff; - } else if (!strcmp(model,"SVS625CL")) { - height = 2050; - width = 2448; - load_raw = &CLASS unpacked_load_raw; - data_offset = 0; - filters = 0x94949494; - order = 0x4949; - maximum = 0x0fff; - } -} - -void CLASS convert_to_rgb() -{ - int row, col, c, i, j, k; - ushort *img; - float out[3], out_cam[3][4]; - double num, inverse[3][3]; - static const double xyzd50_srgb[3][3] = - { { 0.436083, 0.385083, 0.143055 }, - { 0.222507, 0.716888, 0.060608 }, - { 0.013930, 0.097097, 0.714022 } }; - static const double rgb_rgb[3][3] = - { { 1,0,0 }, { 0,1,0 }, { 0,0,1 } }; - static const double adobe_rgb[3][3] = - { { 0.715146, 0.284856, 0.000000 }, - { 0.000000, 1.000000, 0.000000 }, - { 0.000000, 0.041166, 0.958839 } }; - static const double wide_rgb[3][3] = - { { 0.593087, 0.404710, 0.002206 }, - { 0.095413, 0.843149, 0.061439 }, - { 0.011621, 0.069091, 0.919288 } }; - static const double prophoto_rgb[3][3] = - { { 0.529317, 0.330092, 0.140588 }, - { 0.098368, 0.873465, 0.028169 }, - { 0.016879, 0.117663, 0.865457 } }; - static const double (*out_rgb[])[3] = - { rgb_rgb, adobe_rgb, wide_rgb, prophoto_rgb, xyz_rgb }; - static const char *name[] = - { "sRGB", "Adobe RGB (1998)", "WideGamut D65", "ProPhoto D65", "XYZ" }; - static const unsigned phead[] = - { 1024, 0, 0x2100000, 0x6d6e7472, 0x52474220, 0x58595a20, 0, 0, 0, - 0x61637370, 0, 0, 0x6e6f6e65, 0, 0, 0, 0, 0xf6d6, 0x10000, 0xd32d }; - unsigned pbody[] = - { 10, 0x63707274, 0, 36, /* cprt */ - 0x64657363, 0, 40, /* desc */ - 0x77747074, 0, 20, /* wtpt */ - 0x626b7074, 0, 20, /* bkpt */ - 0x72545243, 0, 14, /* rTRC */ - 0x67545243, 0, 14, /* gTRC */ - 0x62545243, 0, 14, /* bTRC */ - 0x7258595a, 0, 20, /* rXYZ */ - 0x6758595a, 0, 20, /* gXYZ */ - 0x6258595a, 0, 20 }; /* bXYZ */ - static const unsigned pwhite[] = { 0xf351, 0x10000, 0x116cc }; - unsigned pcurve[] = { 0x63757276, 0, 1, 0x1000000 }; - -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_CONVERT_RGB,0,2); -#endif - gamma_curve (gamm[0], gamm[1], 0, 0); - memcpy (out_cam, rgb_cam, sizeof out_cam); - raw_color |= colors == 1 || document_mode || - output_color < 1 || output_color > 5; - if (!raw_color) { - oprof = (unsigned *) calloc (phead[0], 1); - merror (oprof, "convert_to_rgb()"); - memcpy (oprof, phead, sizeof phead); - if (output_color == 5) oprof[4] = oprof[5]; - oprof[0] = 132 + 12*pbody[0]; - for (i=0; i < pbody[0]; i++) { - oprof[oprof[0]/4] = i ? (i > 1 ? 0x58595a20 : 0x64657363) : 0x74657874; - pbody[i*3+2] = oprof[0]; - oprof[0] += (pbody[i*3+3] + 3) & -4; - } - memcpy (oprof+32, pbody, sizeof pbody); - oprof[pbody[5]/4+2] = strlen(name[output_color-1]) + 1; - memcpy ((char *)oprof+pbody[8]+8, pwhite, sizeof pwhite); - pcurve[3] = (short)(256/gamm[5]+0.5) << 16; - for (i=4; i < 7; i++) - memcpy ((char *)oprof+pbody[i*3+2], pcurve, sizeof pcurve); - pseudoinverse ((double (*)[3]) out_rgb[output_color-1], inverse, 3); - for (i=0; i < 3; i++) - for (j=0; j < 3; j++) { - for (num = k=0; k < 3; k++) - num += xyzd50_srgb[i][k] * inverse[j][k]; - oprof[pbody[j*3+23]/4+i+2] = num * 0x10000 + 0.5; - } - for (i=0; i < phead[0]/4; i++) - oprof[i] = htonl(oprof[i]); - strcpy ((char *)oprof+pbody[2]+8, "auto-generated by dcraw"); - strcpy ((char *)oprof+pbody[5]+12, name[output_color-1]); - for (i=0; i < 3; i++) - for (j=0; j < colors; j++) - for (out_cam[i][j] = k=0; k < 3; k++) - out_cam[i][j] += out_rgb[output_color-1][i][k] * rgb_cam[k][j]; - } -#ifdef DCRAW_VERBOSE - if (verbose) - fprintf (stderr, raw_color ? _("Building histograms...\n") : - _("Converting to %s colorspace...\n"), name[output_color-1]); - -#endif -#ifdef LIBRAW_LIBRARY_BUILD - memset(histogram,0,sizeof(int)*LIBRAW_HISTOGRAM_SIZE*4); -#else - memset (histogram, 0, sizeof histogram); -#endif - for (img=image[0], row=0; row < height; row++) - for (col=0; col < width; col++, img+=4) { - if (!raw_color) { - out[0] = out[1] = out[2] = 0; - FORCC { - out[0] += out_cam[0][c] * img[c]; - out[1] += out_cam[1][c] * img[c]; - out[2] += out_cam[2][c] * img[c]; - } - FORC3 img[c] = CLIP((int) out[c]); - } - else if (document_mode) - img[0] = img[FC(row,col)]; - FORCC histogram[c][img[c] >> 3]++; - } - if (colors == 4 && output_color) colors = 3; - if (document_mode && filters) colors = 1; -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_CONVERT_RGB,1,2); -#endif -} - -void CLASS fuji_rotate() -{ - int i, row, col; - double step; - float r, c, fr, fc; - unsigned ur, uc; - ushort wide, high, (*img)[4], (*pix)[4]; - - if (!fuji_width) return; -#ifdef DCRAW_VERBOSE - if (verbose) - fprintf (stderr,_("Rotating image 45 degrees...\n")); -#endif - fuji_width = (fuji_width - 1 + shrink) >> shrink; - step = sqrt(0.5); - wide = fuji_width / step; - high = (height - fuji_width) / step; - img = (ushort (*)[4]) calloc (wide*high, sizeof *img); - merror (img, "fuji_rotate()"); - -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_FUJI_ROTATE,0,2); -#endif - - for (row=0; row < high; row++) - for (col=0; col < wide; col++) { - ur = r = fuji_width + (row-col)*step; - uc = c = (row+col)*step; - if (ur > height-2 || uc > width-2) continue; - fr = r - ur; - fc = c - uc; - pix = image + ur*width + uc; - for (i=0; i < colors; i++) - img[row*wide+col][i] = - (pix[ 0][i]*(1-fc) + pix[ 1][i]*fc) * (1-fr) + - (pix[width][i]*(1-fc) + pix[width+1][i]*fc) * fr; - } - free (image); - width = wide; - height = high; - image = img; - fuji_width = 0; -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_FUJI_ROTATE,1,2); -#endif -} - -void CLASS stretch() -{ - ushort newdim, (*img)[4], *pix0, *pix1; - int row, col, c; - double rc, frac; - - if (pixel_aspect == 1) return; -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_STRETCH,0,2); -#endif -#ifdef DCRAW_VERBOSE - if (verbose) fprintf (stderr,_("Stretching the image...\n")); -#endif - if (pixel_aspect < 1) { - newdim = height / pixel_aspect + 0.5; - img = (ushort (*)[4]) calloc (width*newdim, sizeof *img); - merror (img, "stretch()"); - for (rc=row=0; row < newdim; row++, rc+=pixel_aspect) { - frac = rc - (c = rc); - pix0 = pix1 = image[c*width]; - if (c+1 < height) pix1 += width*4; - for (col=0; col < width; col++, pix0+=4, pix1+=4) - FORCC img[row*width+col][c] = pix0[c]*(1-frac) + pix1[c]*frac + 0.5; - } - height = newdim; - } else { - newdim = width * pixel_aspect + 0.5; - img = (ushort (*)[4]) calloc (height*newdim, sizeof *img); - merror (img, "stretch()"); - for (rc=col=0; col < newdim; col++, rc+=1/pixel_aspect) { - frac = rc - (c = rc); - pix0 = pix1 = image[c]; - if (c+1 < width) pix1 += 4; - for (row=0; row < height; row++, pix0+=width*4, pix1+=width*4) - FORCC img[row*newdim+col][c] = pix0[c]*(1-frac) + pix1[c]*frac + 0.5; - } - width = newdim; - } - free (image); - image = img; -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_STRETCH,1,2); -#endif -} - -int CLASS flip_index (int row, int col) -{ - if (flip & 4) SWAP(row,col); - if (flip & 2) row = iheight - 1 - row; - if (flip & 1) col = iwidth - 1 - col; - return row * iwidth + col; -} - -void CLASS tiff_set (ushort *ntag, - ushort tag, ushort type, int count, int val) -{ - struct tiff_tag *tt; - int c; - - tt = (struct tiff_tag *)(ntag+1) + (*ntag)++; - tt->tag = tag; - tt->type = type; - tt->count = count; - if (type < 3 && count <= 4) - FORC(4) tt->val.c[c] = val >> (c << 3); - else if (type == 3 && count <= 2) - FORC(2) tt->val.s[c] = val >> (c << 4); - else tt->val.i = val; -} - -#define TOFF(ptr) ((char *)(&(ptr)) - (char *)th) - -void CLASS tiff_head (struct tiff_hdr *th, int full) -{ - int c, psize=0; - struct tm *t; - - memset (th, 0, sizeof *th); - th->t_order = htonl(0x4d4d4949) >> 16; - th->magic = 42; - th->ifd = 10; - if (full) { - tiff_set (&th->ntag, 254, 4, 1, 0); - tiff_set (&th->ntag, 256, 4, 1, width); - tiff_set (&th->ntag, 257, 4, 1, height); - tiff_set (&th->ntag, 258, 3, colors, output_bps); - if (colors > 2) - th->tag[th->ntag-1].val.i = TOFF(th->bps); - FORC4 th->bps[c] = output_bps; - tiff_set (&th->ntag, 259, 3, 1, 1); - tiff_set (&th->ntag, 262, 3, 1, 1 + (colors > 1)); - } - tiff_set (&th->ntag, 270, 2, 512, TOFF(th->t_desc)); - tiff_set (&th->ntag, 271, 2, 64, TOFF(th->t_make)); - tiff_set (&th->ntag, 272, 2, 64, TOFF(th->t_model)); - if (full) { - if (oprof) psize = ntohl(oprof[0]); - tiff_set (&th->ntag, 273, 4, 1, sizeof *th + psize); - tiff_set (&th->ntag, 277, 3, 1, colors); - tiff_set (&th->ntag, 278, 4, 1, height); - tiff_set (&th->ntag, 279, 4, 1, height*width*colors*output_bps/8); - } else - tiff_set (&th->ntag, 274, 3, 1, "12435867"[flip]-'0'); - tiff_set (&th->ntag, 282, 5, 1, TOFF(th->rat[0])); - tiff_set (&th->ntag, 283, 5, 1, TOFF(th->rat[2])); - tiff_set (&th->ntag, 284, 3, 1, 1); - tiff_set (&th->ntag, 296, 3, 1, 2); - tiff_set (&th->ntag, 305, 2, 32, TOFF(th->soft)); - tiff_set (&th->ntag, 306, 2, 20, TOFF(th->date)); - tiff_set (&th->ntag, 315, 2, 64, TOFF(th->t_artist)); - tiff_set (&th->ntag, 34665, 4, 1, TOFF(th->nexif)); - if (psize) tiff_set (&th->ntag, 34675, 7, psize, sizeof *th); - tiff_set (&th->nexif, 33434, 5, 1, TOFF(th->rat[4])); - tiff_set (&th->nexif, 33437, 5, 1, TOFF(th->rat[6])); - tiff_set (&th->nexif, 34855, 3, 1, iso_speed); - tiff_set (&th->nexif, 37386, 5, 1, TOFF(th->rat[8])); - if (gpsdata[1]) { - tiff_set (&th->ntag, 34853, 4, 1, TOFF(th->ngps)); - tiff_set (&th->ngps, 0, 1, 4, 0x202); - tiff_set (&th->ngps, 1, 2, 2, gpsdata[29]); - tiff_set (&th->ngps, 2, 5, 3, TOFF(th->gps[0])); - tiff_set (&th->ngps, 3, 2, 2, gpsdata[30]); - tiff_set (&th->ngps, 4, 5, 3, TOFF(th->gps[6])); - tiff_set (&th->ngps, 5, 1, 1, gpsdata[31]); - tiff_set (&th->ngps, 6, 5, 1, TOFF(th->gps[18])); - tiff_set (&th->ngps, 7, 5, 3, TOFF(th->gps[12])); - tiff_set (&th->ngps, 18, 2, 12, TOFF(th->gps[20])); - tiff_set (&th->ngps, 29, 2, 12, TOFF(th->gps[23])); - memcpy (th->gps, gpsdata, sizeof th->gps); - } - th->rat[0] = th->rat[2] = 300; - th->rat[1] = th->rat[3] = 1; - FORC(6) th->rat[4+c] = 1000000; - th->rat[4] *= shutter; - th->rat[6] *= aperture; - th->rat[8] *= focal_len; - strncpy (th->t_desc, desc, 512); - strncpy (th->t_make, make, 64); - strncpy (th->t_model, model, 64); - strcpy (th->soft, "dcraw v"DCRAW_VERSION); - t = localtime (×tamp); - sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d", - t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); - strncpy (th->t_artist, artist, 64); -} - -void CLASS jpeg_thumb_writer (FILE *tfp,char *t_humb,int t_humb_length) -{ - ushort exif[5]; - struct tiff_hdr th; - fputc (0xff, tfp); - fputc (0xd8, tfp); - if (strcmp (t_humb+6, "Exif")) { - memcpy (exif, "\xff\xe1 Exif\0\0", 10); - exif[1] = htons (8 + sizeof th); - fwrite (exif, 1, sizeof exif, tfp); - tiff_head (&th, 0); - fwrite (&th, 1, sizeof th, tfp); - } - fwrite (t_humb+2, 1, t_humb_length-2, tfp); -} - - -void CLASS jpeg_thumb() -{ - char *thumb; - - thumb = (char *) malloc (thumb_length); - merror (thumb, "jpeg_thumb()"); - fread (thumb, 1, thumb_length, ifp); - jpeg_thumb_writer(ofp,thumb,thumb_length); - free (thumb); -} - -void CLASS write_ppm_tiff() -{ - struct tiff_hdr th; - uchar *ppm; - ushort *ppm2; - int c, row, col, soff, rstep, cstep; - int perc, val, total, t_white=0x2000; - - perc = width * height * 0.01; /* 99th percentile white level */ - if (fuji_width) perc /= 2; - if (!((highlight & ~2) || no_auto_bright)) - for (t_white=c=0; c < colors; c++) { - for (val=0x2000, total=0; --val > 32; ) - if ((total += histogram[c][val]) > perc) break; - if (t_white < val) t_white = val; - } - gamma_curve (gamm[0], gamm[1], 2, (t_white << 3)/bright); - iheight = height; - iwidth = width; - if (flip & 4) SWAP(height,width); - ppm = (uchar *) calloc (width, colors*output_bps/8); - ppm2 = (ushort *) ppm; - merror (ppm, "write_ppm_tiff()"); - if (output_tiff) { - tiff_head (&th, 1); - fwrite (&th, sizeof th, 1, ofp); - if (oprof) - fwrite (oprof, ntohl(oprof[0]), 1, ofp); - } else if (colors > 3) - fprintf (ofp, - "P7\nWIDTH %d\nHEIGHT %d\nDEPTH %d\nMAXVAL %d\nTUPLTYPE %s\nENDHDR\n", - width, height, colors, (1 << output_bps)-1, cdesc); - else - fprintf (ofp, "P%d\n%d %d\n%d\n", - colors/2+5, width, height, (1 << output_bps)-1); - - soff = flip_index (0, 0); - cstep = flip_index (0, 1) - soff; - rstep = flip_index (1, 0) - flip_index (0, width); - for (row=0; row < height; row++, soff += rstep) { - for (col=0; col < width; col++, soff += cstep) - if (output_bps == 8) - FORCC ppm [col*colors+c] = curve[image[soff][c]] >> 8; - else FORCC ppm2[col*colors+c] = curve[image[soff][c]]; - if (output_bps == 16 && !output_tiff && htons(0x55aa) != 0x55aa) - swab ((char*)ppm2, (char*)ppm2, width*colors*2); - fwrite (ppm, colors*output_bps/8, width, ofp); - } - free (ppm); -} - diff --git a/Source/LibRawLite/internal/dcraw_fileio.cpp b/Source/LibRawLite/internal/dcraw_fileio.cpp deleted file mode 100644 index 70c695c..0000000 --- a/Source/LibRawLite/internal/dcraw_fileio.cpp +++ /dev/null @@ -1,240 +0,0 @@ -/* - Copyright 2008-2010 LibRaw LLC (info@libraw.org) - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - This file is generated from Dave Coffin's dcraw.c - dcraw.c -- Dave Coffin's raw photo decoder - Copyright 1997-2010 by Dave Coffin, dcoffin a cybercom o net - - Look into dcraw homepage (probably http://cybercom.net/~dcoffin/dcraw/) - for more information -*/ - -#include -#define CLASS LibRaw:: -#include "libraw/libraw_types.h" -#define LIBRAW_LIBRARY_BUILD -#include "libraw/libraw.h" -#include "internal/defines.h" -#include "internal/var_defines.h" - -/* - Seach from the current directory up to the root looking for - a ".badpixels" file, and fix those pixels now. - */ -void CLASS bad_pixels (const char *cfname) -{ - FILE *fp=0; -#ifndef LIBRAW_LIBRARY_BUILD - char *fname, *cp, line[128]; - int len, time, row, col, r, c, rad, tot, n, fixed=0; -#else - char *cp, line[128]; - int time, row, col, r, c, rad, tot, n; -#ifdef DCRAW_VERBOSE - int fixed = 0; -#endif -#endif - - if (!filters) return; -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_BAD_PIXELS,0,2); -#endif - if (cfname) - fp = fopen (cfname, "r"); - if (!fp) - { -#ifdef LIBRAW_LIBRARY_BUILD - imgdata.process_warnings |= LIBRAW_WARN_NO_BADPIXELMAP; -#endif - return; - } - while (fgets (line, 128, fp)) { - cp = strchr (line, '#'); - if (cp) *cp = 0; - if (sscanf (line, "%d %d %d", &col, &row, &time) != 3) continue; - if ((unsigned) col >= width || (unsigned) row >= height) continue; - if (time > timestamp) continue; - for (tot=n=0, rad=1; rad < 3 && n==0; rad++) - for (r = row-rad; r <= row+rad; r++) - for (c = col-rad; c <= col+rad; c++) - if ((unsigned) r < height && (unsigned) c < width && - (r != row || c != col) && fc(r,c) == fc(row,col)) { - tot += BAYER2(r,c); - n++; - } - BAYER2(row,col) = tot/n; -#ifdef DCRAW_VERBOSE - if (verbose) { - if (!fixed++) - fprintf (stderr,_("Fixed dead pixels at:")); - fprintf (stderr, " %d,%d", col, row); - } -#endif - } -#ifdef DCRAW_VERBOSE - if (fixed) fputc ('\n', stderr); -#endif - fclose (fp); -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_BAD_PIXELS,1,2); -#endif -} - -void CLASS subtract (const char *fname) -{ - FILE *fp; - int dim[3]={0,0,0}, comment=0, number=0, error=0, nd=0, c, row, col; - ushort *pixel; -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_DARK_FRAME,0,2); -#endif - - if (!(fp = fopen (fname, "rb"))) { -#ifdef DCRAW_VERBOSE - perror (fname); -#endif -#ifdef LIBRAW_LIBRARY_BUILD - imgdata.process_warnings |= LIBRAW_WARN_BAD_DARKFRAME_FILE; -#endif - return; - } - if (fgetc(fp) != 'P' || fgetc(fp) != '5') error = 1; - while (!error && nd < 3 && (c = fgetc(fp)) != EOF) { - if (c == '#') comment = 1; - if (c == '\n') comment = 0; - if (comment) continue; - if (isdigit(c)) number = 1; - if (number) { - if (isdigit(c)) dim[nd] = dim[nd]*10 + c -'0'; - else if (isspace(c)) { - number = 0; nd++; - } else error = 1; - } - } - if (error || nd < 3) { - fprintf (stderr,_("%s is not a valid PGM file!\n"), fname); - fclose (fp); return; - } else if (dim[0] != width || dim[1] != height || dim[2] != 65535) { -#ifdef DCRAW_VERBOSE - fprintf (stderr,_("%s has the wrong dimensions!\n"), fname); -#endif -#ifdef LIBRAW_LIBRARY_BUILD - imgdata.process_warnings |= LIBRAW_WARN_BAD_DARKFRAME_DIM; -#endif - fclose (fp); return; - } - pixel = (ushort *) calloc (width, sizeof *pixel); - merror (pixel, "subtract()"); - for (row=0; row < height; row++) { - fread (pixel, 2, width, fp); - for (col=0; col < width; col++) - BAYER(row,col) = MAX (BAYER(row,col) - ntohs(pixel[col]), 0); - } - free (pixel); - fclose (fp); - memset (cblack, 0, sizeof cblack); - black = 0; -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_DARK_FRAME,1,2); -#endif -} - -#ifndef NO_LCMS -void CLASS apply_profile (const char *input, const char *output) -{ - char *prof; - cmsHPROFILE hInProfile=0, hOutProfile=0; - cmsHTRANSFORM hTransform; - FILE *fp; - unsigned size; - -#ifndef USE_LCMS2 - cmsErrorAction (LCMS_ERROR_SHOW); -#endif - if (strcmp (input, "embed")) - hInProfile = cmsOpenProfileFromFile (input, "r"); - else if (profile_length) { -#ifndef LIBRAW_LIBRARY_BUILD - prof = (char *) malloc (profile_length); - merror (prof, "apply_profile()"); - fseek (ifp, profile_offset, SEEK_SET); - fread (prof, 1, profile_length, ifp); - hInProfile = cmsOpenProfileFromMem (prof, profile_length); - free (prof); -#else - hInProfile = cmsOpenProfileFromMem (imgdata.color.profile, profile_length); -#endif - } else - { -#ifdef LIBRAW_LIBRARY_BUILD - imgdata.process_warnings |= LIBRAW_WARN_NO_EMBEDDED_PROFILE; -#endif -#ifdef DCRAW_VERBOSE - fprintf (stderr,_("%s has no embedded profile.\n"), ifname); -#endif - } - if (!hInProfile) - { -#ifdef LIBRAW_LIBRARY_BUILD - imgdata.process_warnings |= LIBRAW_WARN_NO_INPUT_PROFILE; -#endif - return; - } - if (!output) - hOutProfile = cmsCreate_sRGBProfile(); - else if ((fp = fopen (output, "rb"))) { - fread (&size, 4, 1, fp); - fseek (fp, 0, SEEK_SET); - oprof = (unsigned *) malloc (size = ntohl(size)); - merror (oprof, "apply_profile()"); - fread (oprof, 1, size, fp); - fclose (fp); - if (!(hOutProfile = cmsOpenProfileFromMem (oprof, size))) { - free (oprof); - oprof = 0; - } -#ifdef DCRAW_VERBOSE - } else - fprintf (stderr,_("Cannot open file %s!\n"), output); -#else -} -#endif - if (!hOutProfile) - { -#ifdef LIBRAW_LIBRARY_BUILD - imgdata.process_warnings |= LIBRAW_WARN_BAD_OUTPUT_PROFILE; -#endif - goto quit; - } -#ifdef DCRAW_VERBOSE - if (verbose) - fprintf (stderr,_("Applying color profile...\n")); -#endif -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_APPLY_PROFILE,0,2); -#endif - hTransform = cmsCreateTransform (hInProfile, TYPE_RGBA_16, - hOutProfile, TYPE_RGBA_16, INTENT_PERCEPTUAL, 0); - cmsDoTransform (hTransform, image, image, width*height); - raw_color = 1; /* Don't use rgb_cam with a profile */ - cmsDeleteTransform (hTransform); - cmsCloseProfile (hOutProfile); -quit: - cmsCloseProfile (hInProfile); -#ifdef LIBRAW_LIBRARY_BUILD - RUN_CALLBACK(LIBRAW_PROGRESS_APPLY_PROFILE,1,2); -#endif -} -#endif diff --git a/Source/LibRawLite/internal/defines.h b/Source/LibRawLite/internal/defines.h deleted file mode 100644 index 71e0c9d..0000000 --- a/Source/LibRawLite/internal/defines.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - Copyright 2008-2010 LibRaw LLC (info@libraw.org) - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - This file is generated from Dave Coffin's dcraw.c - dcraw.c -- Dave Coffin's raw photo decoder - Copyright 1997-2010 by Dave Coffin, dcoffin a cybercom o net - - Look into dcraw homepage (probably http://cybercom.net/~dcoffin/dcraw/) - for more information -*/ - -#define NO_JPEG -#ifndef USE_JASPER -#define NO_JASPER -#endif -#define DCRAW_VERSION "9.12" - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif -#define _USE_MATH_DEFINES -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - NO_JPEG disables decoding of compressed Kodak DC120 files. - NO_LCMS disables the "-p" option. - */ -#ifdef NODEPS -#define NO_JASPER -#define NO_JPEG -#define NO_LCMS -#endif -#ifndef NO_JASPER -#undef PACKAGE_BUGREPORT -#undef PACKAGE_NAME -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION -#include /* Decode RED camera movies */ -#endif -#ifndef NO_JPEG -#include /* Decode compressed Kodak DC120 photos */ -#endif -#ifdef LOCALEDIR -#include -#define _(String) gettext(String) -#else -#define _(String) (String) -#endif -#ifdef __CYGWIN__ -#include -#endif -#ifdef WIN32 -#include -#include -#pragma comment(lib, "ws2_32.lib") -#define snprintf _snprintf -#define strcasecmp _stricmp -#define strncasecmp strnicmp -#else -#include -#include -#include -#endif - -#ifdef LJPEG_DECODE -#error Please compile dcraw.c by itself. -#error Do not link it with ljpeg_decode. -#endif - -#ifndef LONG_BIT -#define LONG_BIT (8 * sizeof (long)) -#endif -#define FORC(cnt) for (c=0; c < cnt; c++) -#define FORC3 FORC(3) -#define FORC4 FORC(4) -#define FORCC FORC(colors) - -#define SQR(x) ((x)*(x)) -#define ABS(x) (((int)(x) ^ ((int)(x) >> 31)) - ((int)(x) >> 31)) -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#define LIM(x,min,max) MAX(min,MIN(x,max)) -#define ULIM(x,y,z) ((y) < (z) ? LIM(x,y,z) : LIM(x,z,y)) -#define CLIP(x) LIM(x,0,65535) -#define SWAP(a,b) { a=a+b; b=a-b; a=a-b; } - -/* - In order to inline this calculation, I make the risky - assumption that all filter patterns can be described - by a repeating pattern of eight rows and two columns - - Do not use the FC or BAYER macros with the Leaf CatchLight, - because its pattern is 16x16, not 2x8. - - Return values are either 0/1/2/3 = G/M/C/Y or 0/1/2/3 = R/G1/B/G2 - - PowerShot 600 PowerShot A50 PowerShot Pro70 Pro90 & G1 - 0xe1e4e1e4: 0x1b4e4b1e: 0x1e4b4e1b: 0xb4b4b4b4: - - 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 - 0 G M G M G M 0 C Y C Y C Y 0 Y C Y C Y C 0 G M G M G M - 1 C Y C Y C Y 1 M G M G M G 1 M G M G M G 1 Y C Y C Y C - 2 M G M G M G 2 Y C Y C Y C 2 C Y C Y C Y - 3 C Y C Y C Y 3 G M G M G M 3 G M G M G M - 4 C Y C Y C Y 4 Y C Y C Y C - PowerShot A5 5 G M G M G M 5 G M G M G M - 0x1e4e1e4e: 6 Y C Y C Y C 6 C Y C Y C Y - 7 M G M G M G 7 M G M G M G - 0 1 2 3 4 5 - 0 C Y C Y C Y - 1 G M G M G M - 2 C Y C Y C Y - 3 M G M G M G - - All RGB cameras use one of these Bayer grids: - - 0x16161616: 0x61616161: 0x49494949: 0x94949494: - - 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 - 0 B G B G B G 0 G R G R G R 0 G B G B G B 0 R G R G R G - 1 G R G R G R 1 B G B G B G 1 R G R G R G 1 G B G B G B - 2 B G B G B G 2 G R G R G R 2 G B G B G B 2 R G R G R G - 3 G R G R G R 3 B G B G B G 3 R G R G R G 3 G B G B G B - */ - -#define BAYER(row,col) \ - image[((row) >> shrink)*iwidth + ((col) >> shrink)][FC(row,col)] -#define BAYER2(row,col) \ - image[((row) >> shrink)*iwidth + ((col) >> shrink)][fc(row,col)] diff --git a/Source/LibRawLite/internal/demosaic_packs.cpp b/Source/LibRawLite/internal/demosaic_packs.cpp deleted file mode 100644 index dccdf78..0000000 --- a/Source/LibRawLite/internal/demosaic_packs.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - Copyright 2008-2010 LibRaw LLC (info@libraw.org) - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - This file is generated from Dave Coffin's dcraw.c - dcraw.c -- Dave Coffin's raw photo decoder - Copyright 1997-2010 by Dave Coffin, dcoffin a cybercom o net - - Look into dcraw homepage (probably http://cybercom.net/~dcoffin/dcraw/) - for more information -*/ - -#include - -#define CLASS LibRaw:: - -#include "libraw/libraw_types.h" -#define LIBRAW_LIBRARY_BUILD -#define LIBRAW_IO_REDEFINED -#include "libraw/libraw.h" -#include "internal/defines.h" -#define SRC_USES_SHRINK -#define SRC_USES_BLACK -#define SRC_USES_CURVE - -#include "internal/var_defines.h" - - -#ifdef LIBRAW_DEMOSAIC_PACK_GPL2 -/*AHD-Mod*/ -#include -/*LMMSE*/ -#include -/*AFD*/ -#include -#include -/* VCD*/ -#include -#include -#include -#include -#else -// fake implementations of all GPL2 demosaics - -void CLASS ahd_interpolate_mod() {ahd_interpolate();} -void CLASS afd_interpolate_pl(int, int) {ahd_interpolate();} -void CLASS vcd_interpolate(int) {ahd_interpolate();} -void CLASS lmmse_interpolate(int) {ahd_interpolate();} -void CLASS es_median_filter() {} -void CLASS median_filter_new() {} -void CLASS refinement() {} - -#endif - -/* DCB is BSD licensed, so include it */ -#include "./dcb_demosaicing.c" - -#ifdef LIBRAW_DEMOSAIC_PACK_GPL3 -/*AMaZE*/ -#include -#include -#include -#include -#include -#else -// fallback to AHD and no correction -void CLASS CA_correct_RT(float,float){} -void CLASS amaze_demosaic_RT() { ahd_interpolate();} -void CLASS green_equilibrate(float thresh) {} -void CLASS cfa_linedn(float linenoise){} -void CLASS cfa_impulse_gauss(float lclean, float cclean){} -#endif - -#define sget4(s) sget4((uchar *)s) -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif -#ifdef LIBRAW_DEMOSAIC_PACK_GPL2 -#include -#else -void CLASS foveon_interpolate(){} -void CLASS foveon_load_raw(){} -void CLASS parse_foveon(){} -void CLASS foveon_thumb_loader(){} -void CLASS foveon_thumb(){} -#endif diff --git a/Source/LibRawLite/internal/libraw_bytebuffer.h b/Source/LibRawLite/internal/libraw_bytebuffer.h deleted file mode 100644 index 487173a..0000000 --- a/Source/LibRawLite/internal/libraw_bytebuffer.h +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- C -*- - * File: libraw_bytebuffer.h - * - * Created: Fri Aug 12 14:41:45 2011 - - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - */ -class LibRaw_byte_buffer -{ - public: - LibRaw_byte_buffer(unsigned sz=0); - void set_buffer(void *bb, unsigned int sz); - virtual ~LibRaw_byte_buffer(); - // fast inlines - int get_byte() { if(offt>=size) return EOF; return buf[offt++];} - void unseek2() { if(offt>=2) offt-=2;} - void *get_buffer() { return buf; } - int get_ljpeg_byte() { - if(offt>=size) return 0; - unsigned char val = buf[offt++]; - if(val!=0xFF || offt >=size || buf[offt++]==0) - return val; - offt -=2; - return 0; - } - - private: - unsigned char *buf; - unsigned int size,offt, do_free; -}; - -class LibRaw_bit_buffer -{ - unsigned bitbuf; - int vbits, rst; - public: - LibRaw_bit_buffer() : bitbuf(0),vbits(0),rst(0) {} - - void reset() { bitbuf=vbits=rst=0;} -#ifndef LIBRAW_LIBRARY_BUILD - void fill_lj(LibRaw_byte_buffer* buf,int nbits); - unsigned _getbits_lj(LibRaw_byte_buffer* buf, int nbits); - unsigned _gethuff_lj(LibRaw_byte_buffer* buf, int nbits, unsigned short* huff); - void fill(LibRaw_byte_buffer* buf,int nbits,int zer0_ff); - unsigned _getbits(LibRaw_byte_buffer* buf, int nbits,int zer0_ff); - unsigned _gethuff(LibRaw_byte_buffer* buf, int nbits, unsigned short* huff, int zer0_ff); -#else - void fill_lj(LibRaw_byte_buffer* buf,int nbits) - { - unsigned c1,c2,c3; - if(rst || nbits < vbits) return; - int m = vbits >> 3; - switch(m) - { - case 2: - c1 = buf->get_ljpeg_byte(); - bitbuf = (bitbuf <<8) | (c1); - vbits+=8; - break; - case 1: - c1 = buf->get_ljpeg_byte(); - c2 = buf->get_ljpeg_byte(); - bitbuf = (bitbuf <<16) | (c1<<8) | c2; - vbits+=16; - break; - case 0: - c1 = buf->get_ljpeg_byte(); - c2 = buf->get_ljpeg_byte(); - c3 = buf->get_ljpeg_byte(); - bitbuf = (bitbuf <<24) | (c1<<16) | (c2<<8)|c3; - vbits+=24; - break; - } - } - - unsigned _getbits_lj(LibRaw_byte_buffer* buf, int nbits) - { - unsigned c; - if(nbits==0 || vbits < 0) return 0; - fill_lj(buf,nbits); - c = bitbuf << (32-vbits) >> (32-nbits); - vbits-=nbits; - if(vbits<0)throw LIBRAW_EXCEPTION_IO_EOF; - return c; - } - unsigned _gethuff_lj(LibRaw_byte_buffer* buf, int nbits, unsigned short* huff) - { - unsigned c; - if(nbits==0 || vbits < 0) return 0; - fill_lj(buf,nbits); - c = bitbuf << (32-vbits) >> (32-nbits); - vbits -= huff[c] >> 8; - c = (uchar) huff[c]; - if(vbits<0)throw LIBRAW_EXCEPTION_IO_EOF; - return c; - } - void fill(LibRaw_byte_buffer* buf,int nbits,int zer0_ff) - { - unsigned c; - while (!rst && vbits < nbits && (c = buf->get_byte()) != EOF && - !(rst = zer0_ff && c == 0xff && buf->get_byte())) { - bitbuf = (bitbuf << 8) + (uchar) c; - vbits += 8; - } - } - unsigned _getbits(LibRaw_byte_buffer* buf, int nbits,int zer0_ff) - { - unsigned c; - if(nbits==0 || vbits < 0) return 0; - fill(buf,nbits,zer0_ff); - c = bitbuf << (32-vbits) >> (32-nbits); - vbits-=nbits; - if(vbits<0)throw LIBRAW_EXCEPTION_IO_EOF; - return c; - } - unsigned _gethuff(LibRaw_byte_buffer* buf, int nbits, unsigned short* huff, int zer0_ff) - { - unsigned c; - if(nbits==0 || vbits < 0) return 0; - fill(buf,nbits,zer0_ff); - c = bitbuf << (32-vbits) >> (32-nbits); - vbits -= huff[c] >> 8; - c = (uchar) huff[c]; - if(vbits<0)throw LIBRAW_EXCEPTION_IO_EOF; - return c; - } -#endif -}; diff --git a/Source/LibRawLite/internal/libraw_internal_funcs.h b/Source/LibRawLite/internal/libraw_internal_funcs.h deleted file mode 100644 index 88ce5da..0000000 --- a/Source/LibRawLite/internal/libraw_internal_funcs.h +++ /dev/null @@ -1,241 +0,0 @@ -/* -*- C++ -*- - * File: libraw_internal_funcs.h - * Copyright 2008-2009 LibRaw LLC (info@libraw.org) - * Created: Sat Mar 14, 2008 - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - */ - -#ifndef _LIBRAW_INTERNAL_FUNCS_H -#define _LIBRAW_INTERNAL_FUNCS_H - -#ifndef LIBRAW_LIBRARY_BUILD -#error "This file should be used only for libraw library build" -#else -// inline functions - ushort sget2 (uchar *s); - ushort get2(); - unsigned sget4 (uchar *s); - unsigned getint (int type); - float int_to_float (int i); - double getreal (int type); - void read_shorts (ushort *pixel, int count); - -// Canon P&S cameras - void canon_600_fixed_wb (int temp); - int canon_600_color (int ratio[2], int mar); - void canon_600_auto_wb(); - void canon_600_coeff(); - void canon_600_load_raw(); - int canon_s2is(); - void parse_ciff (int offset, int length); - void ciff_block_1030(); - -// LJPEG decoder - unsigned getbithuff (int nbits, ushort *huff); - ushort* make_decoder_ref (const uchar **source); - ushort* make_decoder (const uchar *source); - int ljpeg_start (struct jhead *jh, int info_only); - void ljpeg_end(struct jhead *jh); - int ljpeg_diff (ushort *huff); - int ljpeg_diff_new (LibRaw_bit_buffer& bits, LibRaw_byte_buffer* buf,ushort *huff); - int ljpeg_diff_pef (LibRaw_bit_buffer& bits, LibRaw_byte_buffer* buf,ushort *huff); - ushort * ljpeg_row (int jrow, struct jhead *jh); - ushort * ljpeg_row_new (int jrow, struct jhead *jh, LibRaw_bit_buffer& bits,LibRaw_byte_buffer* bytes); - - unsigned ph1_bithuff (int nbits, ushort *huff); - -// Canon DSLRs -void crw_init_tables (unsigned table, ushort *huff[2]); - int canon_has_lowbits(); - void canon_compressed_load_raw(); - void lossless_jpeg_load_raw(); - void canon_sraw_load_raw(); -// Adobe DNG - void adobe_copy_pixel (int row, int col, ushort **rp); - void adobe_dng_load_raw_lj(); - void adobe_dng_load_raw_nc(); - -// Pentax - void pentax_load_raw(); - void pentax_tree(); - -// Nikon (and Minolta Z2) - void nikon_compressed_load_raw(); - void nikon_load_raw(); - int nikon_is_compressed(); - int nikon_e995(); - int nikon_e2100(); - void nikon_3700(); - int minolta_z2(); - void nikon_e2100_load_raw(); - -// Fuji - void fuji_load_raw(); - void parse_fuji (int offset); - -// RedCine - void parse_redcine(); - void redcine_load_raw(); - -// Rollei - void rollei_load_raw(); - void parse_rollei(); - -// MF backs - int bayer (unsigned row, unsigned col); - void phase_one_flat_field (int is_float, int nc); - void phase_one_correct(); - void phase_one_load_raw(); - unsigned ph1_bits (int nbits); - void phase_one_load_raw_c(); - void hasselblad_load_raw(); - void leaf_hdr_load_raw(); - void sinar_4shot_load_raw(); - void imacon_full_load_raw(); - void packed_load_raw(); - float find_green(int,int,int,int); - void unpacked_load_raw(); - void parse_sinar_ia(); - void parse_phase_one (int base); - -// Misc P&S cameras - void nokia_load_raw(); - unsigned pana_bits (int nbits); - void panasonic_load_raw(); - void olympus_load_raw(); - void olympus_cseries_load_raw(); - void minolta_rd175_load_raw(); - void quicktake_100_load_raw(); - const int* make_decoder_int (const int *source, int level); - int radc_token (int tree); - void kodak_radc_load_raw(); - void kodak_jpeg_load_raw(); - void kodak_dc120_load_raw(); - void eight_bit_load_raw(); - void smal_decode_segment (unsigned seg[2][2], int holes); - void smal_v6_load_raw(); - int median4 (int *p); - void fill_holes (int holes); - void smal_v9_load_raw(); - void parse_riff(); - void parse_cine(); - void parse_smal (int offset, int fsize); - int parse_jpeg (int offset); - -// Kodak - void kodak_262_load_raw(); - int kodak_65000_decode (short *out, int bsize); - void kodak_65000_load_raw(); - void kodak_rgb_load_raw(); - void kodak_yrgb_load_raw(); - void kodak_ycbcr_load_raw(); - void kodak_rgb_load_thumb(); - void kodak_ycbcr_load_thumb(); - -// It's a Sony (and K&M) - void sony_decrypt (unsigned *data, int len, int start, int key); - void sony_load_raw(); - void sony_arw_load_raw(); - void sony_arw2_load_raw(); - void parse_minolta (int base); - -// Foveon/Sigma - void foveon_load_camf(); - void foveon_load_raw(); - const char* foveon_camf_param (const char *block, const char *param); - void * foveon_camf_matrix (unsigned dim[3], const char *name); - int foveon_fixed (void *ptr, int size, const char *name); - float foveon_avg (short *pix, int range[2], float cfilt); - short * foveon_make_curve (double max, double mul, double filt); - void foveon_make_curves(short **curvep, float dq[3], float div[3], float filt); - int foveon_apply_curve (short *curve, int i); - void foveon_interpolate(); - char * foveon_gets (int offset, char *str, int len); - void parse_foveon(); - -// CAM/RGB - void pseudoinverse (double (*in)[3], double (*out)[3], int size); - void cam_xyz_coeff (double cam_xyz[4][3]); - void adobe_coeff (const char *, const char *); - void simple_coeff (int index); - - -// Tiff/Exif parsers - void tiff_get (unsigned base,unsigned *tag, unsigned *type, unsigned *len, unsigned *save); - void parse_thumb_note (int base, unsigned toff, unsigned tlen); - void parse_makernote (int base, int uptag); - void parse_exif (int base); - void linear_table (unsigned len); - void parse_kodak_ifd (int base); - int parse_tiff_ifd (int base); - int parse_tiff (int base); - void apply_tiff(void); - void parse_gps (int base); - void romm_coeff (float romm_cam[3][3]); - void parse_mos (int offset); - void get_timestamp (int reversed); - -// External JPEGs, what cameras uses it ? - void parse_external_jpeg(); - -// The identify - short guess_byte_order (int words); - -// Tiff writer - void tiff_set (ushort *ntag, ushort tag, ushort type, int count, int val); - void tiff_head (struct tiff_hdr *th, int full); - -// splitted AHD code -#define TS 256 - void ahd_interpolate_green_h_and_v(int top, int left, ushort (*out_rgb)[TS][TS][3]); - void ahd_interpolate_r_and_b_in_rgb_and_convert_to_cielab(int top, int left, ushort (*inout_rgb)[TS][3], short (*out_lab)[TS][3], const float (&xyz_cam)[3][4]); - void ahd_interpolate_r_and_b_and_convert_to_cielab(int top, int left, ushort (*inout_rgb)[TS][TS][3], short (*out_lab)[TS][TS][3], const float (&xyz_cam)[3][4]); - void ahd_interpolate_build_homogeneity_map(int top, int left, short (*lab)[TS][TS][3], char (*out_homogeneity_map)[TS][2]); - void ahd_interpolate_combine_homogeneous_pixels(int top, int left, ushort (*rgb)[TS][TS][3], char (*homogeneity_map)[TS][2]); - -#undef TS - -// LibRaw demosaic packs functions -// AMaZe - int LinEqSolve(int, float*, float*, float*); -// DCB - void dcb_pp(); - void dcb_copy_to_buffer(float (*image2)[3]); - void dcb_restore_from_buffer(float (*image2)[3]); - void dcb_color(); - void dcb_color_full(); - void dcb_map(); - void dcb_correction(); - void dcb_correction2(); - void dcb_refinement(); - void rgb_to_lch(double (*image3)[3]); - void lch_to_rgb(double (*image3)[3]); - void fbdd_correction(); - void fbdd_correction2(double (*image3)[3]); - void fbdd_green(); - void dcb_ver(float (*image3)[3]); - void dcb_hor(float (*image2)[3]); - void dcb_color2(float (*image2)[3]); - void dcb_color3(float (*image3)[3]); - void dcb_decide(float (*image2)[3], float (*image3)[3]); - void dcb_nyquist(); -// VCD/modified dcraw - void refinement(); - void ahd_partial_interpolate(int threshold_value); - void es_median_filter(); - void median_filter_new(); -#endif - -#endif diff --git a/Source/LibRawLite/internal/var_defines.h b/Source/LibRawLite/internal/var_defines.h deleted file mode 100644 index ba60b2f..0000000 --- a/Source/LibRawLite/internal/var_defines.h +++ /dev/null @@ -1,206 +0,0 @@ -/* -*- C++ -*- - * File: var_defines.h - * Copyright 2008-2009 LibRaw LLC (info@libraw.org) - * Created: Sat Mar 8, 2008 - * - * LibRaw redefinitions of dcraw internal variables - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - */ - -#ifndef VAR_DEFINES_H -#define VAR_DEFINES_H - -// imgdata.idata -#define make (imgdata.idata.make) -#define model (imgdata.idata.model) -#define is_raw (imgdata.idata.raw_count) -#define dng_version (imgdata.idata.dng_version) -#define is_foveon (imgdata.idata.is_foveon) -#define colors (imgdata.idata.colors) -#define cdesc (imgdata.idata.cdesc) -#define filters (imgdata.idata.filters) - -//imgdata image -#define image (imgdata.image) -#define raw_image (imgdata.rawdata.raw_image) -#define color_image (imgdata.rawdata.color_image) - -// imgdata.sizes -#define raw_height (imgdata.sizes.raw_height) -#define raw_width (imgdata.sizes.raw_width) -#define height (imgdata.sizes.height) -#define width (imgdata.sizes.width) -#define top_margin (imgdata.sizes.top_margin) -#define left_margin (imgdata.sizes.left_margin) -#define bottom_margin (imgdata.sizes.bottom_margin) -#define right_margin (imgdata.sizes.right_margin) -#define iheight (imgdata.sizes.iheight) -#define iwidth (imgdata.sizes.iwidth) -#define pixel_aspect (imgdata.sizes.pixel_aspect) -#define flip (imgdata.sizes.flip) - -//imgdata.color -#define white (imgdata.color.white) -#define cam_mul (imgdata.color.cam_mul) -#define pre_mul (imgdata.color.pre_mul) -#define cmatrix (imgdata.color.cmatrix) -#define rgb_cam (imgdata.color.rgb_cam) -#ifndef SRC_USES_CURVE -#define curve (imgdata.color.curve) -#endif -#ifndef SRC_USES_BLACK -#define black (imgdata.color.black) -#define cblack (imgdata.color.cblack) -#endif -#define maximum (imgdata.color.maximum) -#define channel_maximum (imgdata.color.channel_maximum) -#define profile_length (imgdata.color.profile_length) -#define color_flags (imgdata.color.color_flags) -#define ph1 (imgdata.color.phase_one_data) -#define flash_used (imgdata.color.flash_used) -#define canon_ev (imgdata.color.canon_ev) -#define model2 (imgdata.color.model2) - -//imgdata.thumbnail - -#define thumb_width (imgdata.thumbnail.twidth) -#define thumb_height (imgdata.thumbnail.theight) -#define thumb_length (imgdata.thumbnail.tlength) - - -//imgdata.others -#define iso_speed (imgdata.other.iso_speed) -#define shutter (imgdata.other.shutter) -#define aperture (imgdata.other.aperture) -#define focal_len (imgdata.other.focal_len) -#define timestamp (imgdata.other.timestamp) -#define shot_order (imgdata.other.shot_order) -#define gpsdata (imgdata.other.gpsdata) -#define desc (imgdata.other.desc) -#define artist (imgdata.other.artist) - -//imgdata.output -#define greybox (imgdata.params.greybox) -#define cropbox (imgdata.params.cropbox) -#define aber (imgdata.params.aber) -#define gamm (imgdata.params.gamm) -#define user_mul (imgdata.params.user_mul) -#define shot_select (imgdata.params.shot_select) -#define bright (imgdata.params.bright) -#define threshold (imgdata.params.threshold) -#define half_size (imgdata.params.half_size) -#define four_color_rgb (imgdata.params.four_color_rgb) -#define document_mode (imgdata.params.document_mode) -#define highlight (imgdata.params.highlight) -//#define verbose (imgdata.params.verbose) -#define use_auto_wb (imgdata.params.use_auto_wb) -#define use_camera_wb (imgdata.params.use_camera_wb) -#define use_camera_matrix (imgdata.params.use_camera_matrix) -#define output_color (imgdata.params.output_color) -#define output_bps (imgdata.params.output_bps) -#define gamma_16bit (imgdata.params.gamma_16bit) -#define output_tiff (imgdata.params.output_tiff) -#define med_passes (imgdata.params.med_passes) -#define no_auto_bright (imgdata.params.no_auto_bright) -#define use_fuji_rotate (imgdata.params.use_fuji_rotate) -#define filtering_mode (imgdata.params.filtering_mode) - -// Demosaic packs -//AFD -//#define afd_noise_att (imgdata.params.afd_noise_att) -//#define afd_noise_thres (imgdata.params.afd_noise_thres) -//#define afd_luminance_passes (imgdata.params.afd_luminance_passes) -//#define afd_chrominance_method (imgdata.params.afd_chrominance_method) -//#define afd_luminance_only (imgdata.params.afd_luminance_only) -// DCB -#define dcb_iterations (imgdata.params.iterations) -#define dcb_enhance_fl (imgdata.params.dcb_enhance) -#define fbdd_noiserd (imgdata.params.fbdd_noiserd) -// VCD -#define eeci_refine (imgdata.params.eeci_refine) -#define es_med_passes (imgdata.params.es_med_passes) - - - -//rgb_constants -#define xyz_rgb (rgb_constants.xyz_rgb) -#define d65_white (rgb_constants.d65_white) - -//libraw_internal_data.internal_data -#define meta_data (libraw_internal_data.internal_data.meta_data) -#define ifp libraw_internal_data.internal_data.input -#define ifname ((char*)libraw_internal_data.internal_data.input->fname()) -#define ofp libraw_internal_data.internal_data.output -#define profile_offset (libraw_internal_data.internal_data.profile_offset) -#define thumb_offset (libraw_internal_data.internal_data.toffset) - -//libraw_internal_data.internal_output_params -#define mix_green (libraw_internal_data.internal_output_params.mix_green) -#define raw_color (libraw_internal_data.internal_output_params.raw_color) -#define use_gamma (libraw_internal_data.internal_output_params.use_gamma) -#define zero_is_bad (libraw_internal_data.internal_output_params.zero_is_bad) -#ifndef SRC_USES_SHRINK -#define shrink (libraw_internal_data.internal_output_params.shrink) -#endif -#define fuji_width (libraw_internal_data.internal_output_params.fuji_width) - - -//libraw_internal_data.output_data -#define histogram (libraw_internal_data.output_data.histogram) -#define oprof (libraw_internal_data.output_data.oprof) - -//libraw_internal_data.identify_data -#define exif_cfa (libraw_internal_data.identify_data.olympus_exif_cfa) -#define unique_id (libraw_internal_data.identify_data.unique_id) -#define tiff_nifds (libraw_internal_data.identify_data.tiff_nifds) -#define tiff_flip (libraw_internal_data.identify_data.tiff_flip) - -//libraw_internal_data.unpacker_data -#define order (libraw_internal_data.unpacker_data.order) -#define data_error (libraw_internal_data.unpacker_data.data_error) -#define cr2_slice (libraw_internal_data.unpacker_data.cr2_slice) -#define sraw_mul (libraw_internal_data.unpacker_data.sraw_mul) -#define kodak_cbpp (libraw_internal_data.unpacker_data.kodak_cbpp) -#define strip_offset (libraw_internal_data.unpacker_data.strip_offset) -#define data_offset (libraw_internal_data.unpacker_data.data_offset) -#define data_size (libraw_internal_data.unpacker_data.data_size) -#define meta_offset (libraw_internal_data.unpacker_data.meta_offset) -#define meta_length (libraw_internal_data.unpacker_data.meta_length) -#define thumb_misc (libraw_internal_data.unpacker_data.thumb_misc) -#define fuji_layout (libraw_internal_data.unpacker_data.fuji_layout) -#define tiff_samples (libraw_internal_data.unpacker_data.tiff_samples) -#define tiff_bps (libraw_internal_data.unpacker_data.tiff_bps) -#define tiff_compress (libraw_internal_data.unpacker_data.tiff_compress) -#define zero_after_ff (libraw_internal_data.unpacker_data.zero_after_ff) -#define tile_width (libraw_internal_data.unpacker_data.tile_width) -#define tile_length (libraw_internal_data.unpacker_data.tile_length) -#define load_flags (libraw_internal_data.unpacker_data.load_flags) - -#ifdef LIBRAW_IO_REDEFINED -#define fread(ptr,size,n,stream) stream->read(ptr,size,n) -#define fseek(stream,o,w) stream->seek(o,w) -#define fseeko(stream,o,w) stream->seek(o,w) -#define ftell(stream) stream->tell() -#define ftello(stream) stream->tell() -#ifdef getc -#undef getc -#endif -#define getc(stream) stream->get_char() -#define fgetc(stream) stream->get_char() -#define fgetcb(stream) stream->get_char_buf() -#define fgets(str,n,stream) stream->gets(str,n) -#define fscanf(stream,fmt,ptr) stream->scanf_one(fmt,ptr) -#endif - -#endif diff --git a/Source/LibRawLite/libraw/libraw.h b/Source/LibRawLite/libraw/libraw.h deleted file mode 100644 index bf9df7e..0000000 --- a/Source/LibRawLite/libraw/libraw.h +++ /dev/null @@ -1,269 +0,0 @@ -/* -*- C++ -*- - * File: libraw.h - * Copyright 2008-2010 LibRaw LLC (info@libraw.org) - * Created: Sat Mar 8, 2008 - * - * LibRaw C++ interface - * - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - -*/ - -#ifndef _LIBRAW_CLASS_H -#define _LIBRAW_CLASS_H - -#ifdef __linux__ -#define _FILE_OFFSET_BITS 64 -#endif - -/* maximum file size to use LibRaw_file_datastream (fully buffered) I/O */ -#define LIBRAW_USE_STREAMS_DATASTREAM_MAXSIZE (250*1024L*1024L) - - -#include -#include -#include -#include - - -#include "libraw_datastream.h" -#include "libraw_types.h" -#include "libraw_const.h" -#include "libraw_internal.h" -#include "libraw_alloc.h" - -#ifdef __cplusplus -extern "C" -{ -#endif -DllDef const char *libraw_strerror(int errorcode); -DllDef const char *libraw_strprogress(enum LibRaw_progress); - /* LibRaw C API */ -DllDef libraw_data_t *libraw_init(unsigned int flags); -DllDef int libraw_open_file(libraw_data_t*, const char *); -DllDef int libraw_open_file_ex(libraw_data_t*, const char *, INT64 max_buff_sz); -DllDef int libraw_open_buffer(libraw_data_t*, void * buffer, size_t size); -DllDef int libraw_unpack(libraw_data_t*); -DllDef int libraw_unpack_thumb(libraw_data_t*); -DllDef void libraw_recycle(libraw_data_t*); -DllDef void libraw_close(libraw_data_t*); -DllDef void libraw_subtract_black(libraw_data_t*); -DllDef int libraw_raw2image(libraw_data_t*); -DllDef void libraw_free_image(libraw_data_t*); - /* version helpers */ -DllDef const char* libraw_version(); -DllDef int libraw_versionNumber(); - /* Camera list */ -DllDef const char** libraw_cameraList(); -DllDef int libraw_cameraCount(); - -DllDef void libraw_set_memerror_handler(libraw_data_t*, memory_callback cb, void *datap); -DllDef void libraw_set_dataerror_handler(libraw_data_t*,data_callback func,void *datap); -DllDef void libraw_set_progress_handler(libraw_data_t*,progress_callback cb,void *datap); -DllDef const char * libraw_unpack_function_name(libraw_data_t* lr); -DllDef int libraw_get_decoder_info(libraw_data_t* lr,libraw_decoder_info_t* d); - - /* DCRAW compatibility */ -DllDef int libraw_adjust_sizes_info_only(libraw_data_t*); -DllDef int libraw_dcraw_document_mode_processing(libraw_data_t*); -DllDef int libraw_dcraw_ppm_tiff_writer(libraw_data_t* lr,const char *filename); -DllDef int libraw_dcraw_thumb_writer(libraw_data_t* lr,const char *fname); -DllDef int libraw_dcraw_process(libraw_data_t* lr); -DllDef libraw_processed_image_t* libraw_dcraw_make_mem_image(libraw_data_t* lr, int *errc); -DllDef libraw_processed_image_t* libraw_dcraw_make_mem_thumb(libraw_data_t* lr, int *errc); -DllDef void libraw_dcraw_clear_mem(libraw_processed_image_t*); -#ifdef __cplusplus -} -#endif - - -#ifdef __cplusplus - -class DllDef LibRaw -{ - public: - libraw_data_t imgdata; - int verbose; - - LibRaw(unsigned int flags = LIBRAW_OPTIONS_NONE); - - libraw_output_params_t* output_params_ptr() { return &imgdata.params;} - int open_file(const char *fname, INT64 max_buffered_sz=LIBRAW_USE_STREAMS_DATASTREAM_MAXSIZE); - int open_buffer(void *buffer, size_t size); - int open_datastream(LibRaw_abstract_datastream *); - int unpack(void); - int unpack_thumb(void); - - int adjust_sizes_info_only(void); - void subtract_black(); - int raw2image(); - int raw2image_ex(); - void raw2image_start(); - void free_image(); - int adjust_maximum(); - void set_memerror_handler( memory_callback cb,void *data) {callbacks.memcb_data = data; callbacks.mem_cb = cb; } - void set_dataerror_handler(data_callback func, void *data) { callbacks.datacb_data = data; callbacks.data_cb = func;} - void set_progress_handler(progress_callback pcb, void *data) { callbacks.progresscb_data = data; callbacks.progress_cb = pcb;} - - /* helpers */ - static const char* version(); - static int versionNumber(); - static const char** cameraList(); - static int cameraCount(); - static const char* strprogress(enum LibRaw_progress); - static const char* strerror(int p); - /* dcraw emulation */ - int dcraw_document_mode_processing(); - int dcraw_ppm_tiff_writer(const char *filename); - int dcraw_thumb_writer(const char *fname); - int dcraw_process(void); - /* memory writers */ - libraw_processed_image_t* dcraw_make_mem_image(int *errcode=NULL); - libraw_processed_image_t* dcraw_make_mem_thumb(int *errcode=NULL); - static void dcraw_clear_mem(libraw_processed_image_t*); - - /* Additional calls for make_mem_image */ - void get_mem_image_format(int* width, int* height, int* colors, int* bps) const; - int copy_mem_image(void* scan0, int stride, int bgr); - - /* free all internal data structures */ - void recycle(); - ~LibRaw(void) { recycle(); delete tls; } - - int COLOR(int row, int col) { return libraw_internal_data.internal_output_params.fuji_width? FCF(row,col):FC(row,col);} - - int FC(int row,int col) { return (imgdata.idata.filters >> (((row << 1 & 14) | (col & 1)) << 1) & 3);} - int fc (int row, int col); - - const char *unpack_function_name(); - int get_decoder_info(libraw_decoder_info_t* d_info); - libraw_internal_data_t * get_internal_data_pointer(){ return &libraw_internal_data; } - - private: - - int FCF(int row,int col) { - int rr,cc; - if (libraw_internal_data.unpacker_data.fuji_layout) { - rr = libraw_internal_data.internal_output_params.fuji_width - 1 - col + (row >> 1); - cc = col + ((row+1) >> 1); - } else { - rr = libraw_internal_data.internal_output_params.fuji_width - 1 + row - (col >> 1); - cc = row + ((col+1) >> 1); - } - return FC(rr,cc); - } - - void* malloc(size_t t); - void* calloc(size_t n,size_t t); - void* realloc(void *p, size_t s); - void free(void *p); - void merror (void *ptr, const char *where); - void derror(); - - LibRaw_TLS *tls; - libraw_internal_data_t libraw_internal_data; - decode first_decode[2048], *second_decode, *free_decode; - tiff_ifd_t tiff_ifd[10]; - libraw_memmgr memmgr; - libraw_callbacks_t callbacks; - - LibRaw_constants rgb_constants; - void (LibRaw:: *write_thumb)(); - void (LibRaw:: *write_fun)(); - void (LibRaw:: *load_raw)(); - void (LibRaw:: *thumb_load_raw)(); - - void kodak_thumb_loader(); - void write_thumb_ppm_tiff(FILE *); - void foveon_thumb_loader (void); - - int own_filtering_supported(){ return 0;} - void identify(); - void identify2(unsigned, unsigned, char*); - void write_ppm_tiff (); - void convert_to_rgb(); - void remove_zeroes(); -#ifndef NO_LCMS - void apply_profile(const char*,const char*); -#endif - void pre_interpolate(); - void border_interpolate (int border); - void lin_interpolate(); - void vng_interpolate(); - void ppg_interpolate(); - void ahd_interpolate(); - - /* from demosaic pack */ - void ahd_interpolate_mod(); - void afd_interpolate_pl(int afd_passes, int clip_on); - void afd_noise_filter_pl(); - void lmmse_interpolate(int gamma_apply); - void dcb(int iterations, int dcb_enhance); - void fbdd(int noiserd); - void vcd_interpolate(int ahd_cutoff); - void amaze_demosaic_RT(); - void exp_bef(float expos, float preser); - void CA_correct_RT(float cared, float cablue); - void cfa_linedn(float linenoise); - void cfa_impulse_gauss(float lclean, float cclean); - void green_equilibrate(float thresh); - - /* demosaic pack end */ - - void bad_pixels(const char*); - void subtract(const char*); - void hat_transform (float *temp, float *base, int st, int size, int sc); - void wavelet_denoise(); - void scale_colors(); - void median_filter (); - void blend_highlights(); - void recover_highlights(); - void green_matching(); - - void fuji_rotate(); - void stretch(); - - void foveon_thumb (); - void jpeg_thumb_writer (FILE *tfp,char *thumb,int thumb_length); - void jpeg_thumb (); - void ppm_thumb (); - void layer_thumb (); - void rollei_thumb (); - void kodak_thumb_load_raw(); - - void foveon_decoder (unsigned size, unsigned code); - unsigned get4(); - - int flip_index (int row, int col); - void gamma_curve (double pwr, double ts, int mode, int imax); - - -#ifdef LIBRAW_LIBRARY_BUILD -#include "internal/libraw_internal_funcs.h" -#endif - -}; - -#ifdef LIBRAW_LIBRARY_BUILD -#define RUN_CALLBACK(stage,iter,expect) if(callbacks.progress_cb) { \ - int rr = (*callbacks.progress_cb)(callbacks.progresscb_data,stage,iter,expect); \ - if(rr!=0) throw LIBRAW_EXCEPTION_CANCELLED_BY_CALLBACK; \ - } -#endif - - -#endif /* __cplusplus */ - - -#endif /* _LIBRAW_CLASS_H */ diff --git a/Source/LibRawLite/libraw/libraw_alloc.h b/Source/LibRawLite/libraw/libraw_alloc.h deleted file mode 100644 index 1407d47..0000000 --- a/Source/LibRawLite/libraw/libraw_alloc.h +++ /dev/null @@ -1,99 +0,0 @@ -/* -*- C++ -*- - * File: libraw_alloc.h - * Copyright 2008-2010 LibRaw LLC (info@libraw.org) - * Created: Sat Mar 22, 2008 - * - * LibRaw C++ interface - * -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - */ - -#ifndef __LIBRAW_ALLOC_H -#define __LIBRAW_ALLOC_H - -#include -#include - -#ifdef __cplusplus - -#define MSIZE 32 - -class DllDef libraw_memmgr -{ - public: - libraw_memmgr() - { - memset(mems,0,sizeof(mems)); - calloc_cnt=0; - } - void *malloc(size_t sz) - { - void *ptr = ::malloc(sz); - mem_ptr(ptr); - return ptr; - } - void *calloc(size_t n, size_t sz) - { - void *ptr = ::calloc(n,sz); - mem_ptr(ptr); - return ptr; - } - void *realloc(void *ptr,size_t newsz) - { - void *ret = ::realloc(ptr,newsz); - forget_ptr(ptr); - mem_ptr(ret); - return ret; - } - void free(void *ptr) - { - forget_ptr(ptr); - ::free(ptr); - } - void cleanup(void) - { - for(int i = 0; i< MSIZE; i++) - if(mems[i]) - { - free(mems[i]); - mems[i] = NULL; - } - } - - private: - void *mems[MSIZE]; - int calloc_cnt; - void mem_ptr(void *ptr) - { - if(ptr) - for(int i=0;i < MSIZE; i++) - if(!mems[i]) - { - mems[i] = ptr; - break; - } - } - void forget_ptr(void *ptr) - { - if(ptr) - for(int i=0;i < MSIZE; i++) - if(mems[i] == ptr) - mems[i] = NULL; - } - -}; - -#endif /* C++ */ - -#endif diff --git a/Source/LibRawLite/libraw/libraw_const.h b/Source/LibRawLite/libraw/libraw_const.h deleted file mode 100644 index fb26cf9..0000000 --- a/Source/LibRawLite/libraw/libraw_const.h +++ /dev/null @@ -1,162 +0,0 @@ -/* -*- C++ -*- - * File: libraw_const.h - * Copyright 2008-2010 LibRaw LLC (info@libraw.org) - * Created: Sat Mar 8 , 2008 - * - * LibRaw error codes -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - */ - -#ifndef _LIBRAW_ERRORS_H -#define _LIBRAW_ERRORS_H - -#define LIBRAW_DEFAULT_ADJUST_MAXIMUM_THRESHOLD 0.75 -#define LIBRAW_DEFAULT_AUTO_BRIGHTNESS_THRESHOLD 0.01 - -enum LibRaw_decoder_flags -{ - LIBRAW_DECODER_LEGACY = 1, - LIBRAW_DECODER_FLATFIELD = 1<<1, - LIBRAW_DECODER_4COMPONENT = 1<<2, - LIBRAW_DECODER_USEBAYER2 = 1<<3, - LIBRAW_DECODER_HASCURVE = 1<<4, - LIBRAW_DECODER_NOTSET = 1<<15 -}; - - -enum LibRaw_constructor_flags -{ - LIBRAW_OPTIONS_NONE =0, - LIBRAW_OPIONS_NO_MEMERR_CALLBACK=1, - LIBRAW_OPIONS_NO_DATAERR_CALLBACK=1<<1 -}; - -enum LibRaw_warnings -{ - LIBRAW_WARN_NONE =0, - LIBRAW_WARN_FOVEON_NOMATRIX =1, - LIBRAW_WARN_FOVEON_INVALIDWB =1<<1, - LIBRAW_WARN_BAD_CAMERA_WB =1<<2, - LIBRAW_WARN_NO_METADATA =1<<3, - LIBRAW_WARN_NO_JPEGLIB = 1<<4, - LIBRAW_WARN_NO_EMBEDDED_PROFILE = 1<<5, - LIBRAW_WARN_NO_INPUT_PROFILE = 1<<6, - LIBRAW_WARN_BAD_OUTPUT_PROFILE= 1<<7, - LIBRAW_WARN_NO_BADPIXELMAP=1<<8, - LIBRAW_WARN_BAD_DARKFRAME_FILE=1<<9, - LIBRAW_WARN_BAD_DARKFRAME_DIM=1<<10, - LIBRAW_WARN_NO_JASPER = 1<<11 -}; - -enum LibRaw_exceptions -{ - LIBRAW_EXCEPTION_NONE =0, - LIBRAW_EXCEPTION_ALLOC =1, - LIBRAW_EXCEPTION_DECODE_RAW =2, - LIBRAW_EXCEPTION_DECODE_JPEG=3, - LIBRAW_EXCEPTION_IO_EOF =4, - LIBRAW_EXCEPTION_IO_CORRUPT =5, - LIBRAW_EXCEPTION_CANCELLED_BY_CALLBACK=6, - LIBRAW_EXCEPTION_BAD_CROP =7, - LIBRAW_EXCEPTION_IO_BADFILE =8, - LIBRAW_EXCEPTION_DECODE_JPEG2000=9 -}; - - -enum LibRaw_colorstate -{ - LIBRAW_COLORSTATE_UNKNOWN =0, - LIBRAW_COLORSTATE_INIT =1, - LIBRAW_COLORSTATE_CONST =2, - LIBRAW_COLORSTATE_LOADED =3, - LIBRAW_COLORSTATE_CALCULATED=4, - LIBRAW_COLORSTATE_RESERVED1 =5, - LIBRAW_COLORSTATE_RESERVED2 =6, - LIBRAW_COLORSTATE_RESERVED3 =7 -}; - -enum LibRaw_progress -{ - LIBRAW_PROGRESS_START = 0, - LIBRAW_PROGRESS_OPEN = 1, - LIBRAW_PROGRESS_IDENTIFY = 1<<1, - LIBRAW_PROGRESS_SIZE_ADJUST = 1<<2, - LIBRAW_PROGRESS_LOAD_RAW = 1<<3, - LIBRAW_PROGRESS_REMOVE_ZEROES = 1<<4, - LIBRAW_PROGRESS_BAD_PIXELS = 1<<5, - LIBRAW_PROGRESS_DARK_FRAME = 1<<6, - LIBRAW_PROGRESS_FOVEON_INTERPOLATE = 1<<7, - LIBRAW_PROGRESS_SCALE_COLORS = 1<<8, - LIBRAW_PROGRESS_PRE_INTERPOLATE = 1<<9, - LIBRAW_PROGRESS_INTERPOLATE = 1<<10, - LIBRAW_PROGRESS_MIX_GREEN = 1<<11, - LIBRAW_PROGRESS_MEDIAN_FILTER = 1<<12, - LIBRAW_PROGRESS_HIGHLIGHTS = 1<<13, - LIBRAW_PROGRESS_FUJI_ROTATE = 1<<14, - LIBRAW_PROGRESS_FLIP = 1<<15, - LIBRAW_PROGRESS_APPLY_PROFILE = 1<<16, - LIBRAW_PROGRESS_CONVERT_RGB = 1<<17, - LIBRAW_PROGRESS_STRETCH = 1<<18, -/* reserved */ - LIBRAW_PROGRESS_STAGE19 = 1<<19, - LIBRAW_PROGRESS_STAGE20 = 1<<20, - LIBRAW_PROGRESS_STAGE21 = 1<<21, - LIBRAW_PROGRESS_STAGE22 = 1<<22, - LIBRAW_PROGRESS_STAGE23 = 1<<23, - LIBRAW_PROGRESS_STAGE24 = 1<<24, - LIBRAW_PROGRESS_STAGE25 = 1<<25, - LIBRAW_PROGRESS_STAGE26 = 1<<26, - LIBRAW_PROGRESS_STAGE27 = 1<<27, - - LIBRAW_PROGRESS_THUMB_LOAD = 1<<28, - LIBRAW_PROGRESS_TRESERVED1 = 1<<29, - LIBRAW_PROGRESS_TRESERVED2 = 1<<30, - LIBRAW_PROGRESS_TRESERVED3 = 1<<31 -}; -#define LIBRAW_PROGRESS_THUMB_MASK 0x0fffffff - -enum LibRaw_errors -{ - LIBRAW_SUCCESS = 0, - LIBRAW_UNSPECIFIED_ERROR=-1, - LIBRAW_FILE_UNSUPPORTED = -2, - LIBRAW_REQUEST_FOR_NONEXISTENT_IMAGE=-3, - LIBRAW_OUT_OF_ORDER_CALL=-4, - LIBRAW_NO_THUMBNAIL=-5, - LIBRAW_UNSUPPORTED_THUMBNAIL=-6, - LIBRAW_UNSUFFICIENT_MEMORY=-100007, - LIBRAW_DATA_ERROR=-100008, - LIBRAW_IO_ERROR=-100009, - LIBRAW_CANCELLED_BY_CALLBACK=-100010, - LIBRAW_BAD_CROP=-100011 -}; - -#define LIBRAW_FATAL_ERROR(ec) ((ec)<-100000) - -enum LibRaw_thumbnail_formats -{ - LIBRAW_THUMBNAIL_UNKNOWN=0, - LIBRAW_THUMBNAIL_JPEG=1, - LIBRAW_THUMBNAIL_BITMAP=2, - LIBRAW_THUMBNAIL_LAYER=4, - LIBRAW_THUMBNAIL_ROLLEI=5 -}; - -enum LibRaw_image_formats -{ - LIBRAW_IMAGE_JPEG=1, - LIBRAW_IMAGE_BITMAP=2 -}; - -#endif diff --git a/Source/LibRawLite/libraw/libraw_datastream.h b/Source/LibRawLite/libraw/libraw_datastream.h deleted file mode 100644 index cab6cd7..0000000 --- a/Source/LibRawLite/libraw/libraw_datastream.h +++ /dev/null @@ -1,205 +0,0 @@ -/* -*- C -*- - * File: libraw_datastream.h - * Copyright 2008-2010 LibRaw LLC (info@libraw.org) - * Created: Sun Jan 18 13:07:35 2009 - * - * LibRaw Data stream interface - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - */ - -#ifndef __LIBRAW_DATASTREAM_H -#define __LIBRAW_DATASTREAM_H - -#include -#include -#include -#include - -#ifndef __cplusplus - - -#else /* __cplusplus */ - -#include "libraw_const.h" -#include "libraw_types.h" -#include -#include - -#if defined (WIN32) -#include - -/* MSVS 2008 and above... */ -#if _MSC_VER >= 1500 -#define WIN32SECURECALLS -#endif -#endif - -#define IOERROR() do { throw LIBRAW_EXCEPTION_IO_EOF; } while(0) - -class LibRaw_buffer_datastream; -class LibRaw_byte_buffer; -class LibRaw_bit_buffer; - -class DllDef LibRaw_abstract_datastream -{ - public: - LibRaw_abstract_datastream(){ substream=0;}; - virtual ~LibRaw_abstract_datastream(void){if(substream) delete substream;} - virtual int valid() = 0; - virtual int read(void *,size_t, size_t ) = 0; - virtual int seek(INT64 , int ) = 0; - virtual INT64 tell() = 0; - virtual int get_char() = 0; - virtual char* gets(char *, int) = 0; - virtual int scanf_one(const char *, void *) = 0; - virtual int eof() = 0; - virtual void * make_jas_stream() = 0; - /* Make buffer from current offset */ - virtual LibRaw_byte_buffer *make_byte_buffer(unsigned int sz); - - /* subfile parsing not implemented in base class */ - virtual const char* fname(){ return NULL;}; - virtual int subfile_open(const char*) { return -1;} - virtual void subfile_close() { } - - - virtual int tempbuffer_open(void*, size_t); - virtual void tempbuffer_close(); - - protected: - LibRaw_abstract_datastream *substream; -}; - -#ifdef WIN32 -template class DllDef std::auto_ptr; -#endif - -class DllDef LibRaw_file_datastream: public LibRaw_abstract_datastream -{ - protected: - std::auto_ptr f; /* will close() automatically through dtor */ - std::auto_ptr saved_f; /* when *f is a subfile, *saved_f is the master file */ - const char *filename; - - public: - virtual ~LibRaw_file_datastream(){} - LibRaw_file_datastream(const char *fname); - virtual void *make_jas_stream(); - virtual int valid(); - virtual int read(void * ptr,size_t size, size_t nmemb); - virtual int eof(); - virtual int seek(INT64 o, int whence); - virtual INT64 tell(); - virtual int get_char() - { - if(substream) return substream->get_char(); - return f->sbumpc(); - } - virtual char* gets(char *str, int sz); - virtual int scanf_one(const char *fmt, void*val); - virtual const char* fname(); - virtual int subfile_open(const char *fn); - virtual void subfile_close(); -}; - -class DllDef LibRaw_buffer_datastream : public LibRaw_abstract_datastream -{ - public: - LibRaw_buffer_datastream(void *buffer, size_t bsize); - virtual ~LibRaw_buffer_datastream(); - virtual int valid(); - virtual void *make_jas_stream(); - virtual LibRaw_byte_buffer *make_byte_buffer(unsigned int sz); - virtual int read(void * ptr,size_t sz, size_t nmemb); - virtual int eof(); - virtual int seek(INT64 o, int whence); - virtual INT64 tell(); - virtual char* gets(char *s, int sz); - virtual int scanf_one(const char *fmt, void* val); - virtual int get_char() - { - if(substream) return substream->get_char(); - if(streampos>=streamsize) - return -1; - return buf[streampos++]; - } - - private: - unsigned char *buf; - size_t streampos,streamsize; -}; - -class DllDef LibRaw_bigfile_datastream : public LibRaw_abstract_datastream -{ - public: - LibRaw_bigfile_datastream(const char *fname); - virtual ~LibRaw_bigfile_datastream(); - virtual int valid(); - virtual void *make_jas_stream(); - - virtual int read(void * ptr,size_t size, size_t nmemb); - virtual int eof(); - virtual int seek(INT64 o, int whence); - virtual INT64 tell(); - virtual char* gets(char *str, int sz); - virtual int scanf_one(const char *fmt, void*val); - virtual const char *fname(); - virtual int subfile_open(const char *fn); - virtual void subfile_close(); - virtual int get_char() - { -#ifndef WIN32 - return substream?substream->get_char():getc_unlocked(f); -#else - return substream?substream->get_char():fgetc(f); -#endif - } - - private: - FILE *f,*sav; - const char *filename; -}; - -#ifdef WIN32 -class DllDef LibRaw_windows_datastream : public LibRaw_buffer_datastream -{ -public: - /* ctor: high level constructor opens a file by name */ - LibRaw_windows_datastream(const TCHAR* sFile); - /* ctor: construct with a file handle - caller is responsible for closing the file handle */ - LibRaw_windows_datastream(HANDLE hFile); - /* dtor: unmap and close the mapping handle */ - virtual ~LibRaw_windows_datastream(); - -protected: - void Open(HANDLE hFile); - inline void reconstruct_base() - { - /* this subterfuge is to overcome the private-ness of LibRaw_buffer_datastream */ - (LibRaw_buffer_datastream&)*this = LibRaw_buffer_datastream(pView_, (size_t)cbView_); - } - - HANDLE hMap_; /* handle of the file mapping */ - void* pView_; /* pointer to the mapped memory */ - __int64 cbView_; /* size of the mapping in bytes */ -}; - -#endif - - -#endif /* cplusplus */ - -#endif - diff --git a/Source/LibRawLite/libraw/libraw_internal.h b/Source/LibRawLite/libraw/libraw_internal.h deleted file mode 100644 index 920f4c8..0000000 --- a/Source/LibRawLite/libraw/libraw_internal.h +++ /dev/null @@ -1,218 +0,0 @@ -/* -*- C++ -*- - * File: libraw_internal.h - * Copyright 2008-2010 LibRaw LLC (info@libraw.org) - * Created: Sat Mar 8 , 2008 - * - * LibRaw internal data structures (not visible outside) - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - */ - -#ifndef _LIBRAW_INTERNAL_TYPES_H -#define _LIBRAW_INTERNAL_TYPES_H - -#include -#ifdef __cplusplus - -#ifdef LIBRAW_LIBRARY_BUILD -#ifndef CLASS -#define CLASS LibRaw:: -#endif -#endif - -#else -#ifndef CLASS -#define CLASS -#endif -#endif - - -#ifdef __cplusplus - -#include "libraw_datastream.h" -#include "libraw_types.h" - -class LibRaw_TLS -{ -public: - struct - { - unsigned bitbuf; - int vbits, reset; - }getbits; - struct - { - UINT64 bitbuf; - int vbits; - - }ph1_bits; - struct - { - unsigned pad[128], p; - }sony_decrypt; - uchar jpeg_buffer[4096]; - struct - { - uchar buf[0x4000]; - int vbits, padding; - }pana_bits; - - void init() - { - getbits.bitbuf = 0; getbits.vbits = getbits.reset = 0; - ph1_bits.bitbuf = 0; ph1_bits.vbits = 0; - pana_bits.vbits = 0; - } -}; - - -class LibRaw_constants -{ - public: - static const float d65_white[3]; - static const double xyz_rgb[3][3]; -}; -#endif /* __cplusplus */ - - -typedef struct -{ -#ifndef __cplusplus - struct -#endif - LibRaw_abstract_datastream *input; - FILE *output; - int input_internal; - char *meta_data; - INT64 profile_offset; - INT64 toffset; - -} internal_data_t; - - -#define LIBRAW_HISTOGRAM_SIZE 0x2000 -typedef struct -{ - int (*histogram)[LIBRAW_HISTOGRAM_SIZE]; - unsigned *oprof; -} output_data_t; - -typedef struct -{ - unsigned olympus_exif_cfa; - unsigned unique_id; - unsigned tiff_nifds; - int tiff_flip; -}identify_data_t; - -typedef struct -{ - short order; - ushort sraw_mul[4],cr2_slice[3]; - unsigned kodak_cbpp; - INT64 strip_offset, data_offset; - INT64 meta_offset; - unsigned data_size; - unsigned meta_length; - unsigned thumb_misc; - unsigned fuji_layout; - unsigned tiff_samples; - unsigned tiff_bps; - unsigned tiff_compress; - unsigned zero_after_ff; - unsigned tile_width, tile_length,load_flags; - unsigned data_error; -}unpacker_data_t; - - - -typedef struct -{ - internal_data_t internal_data; - libraw_internal_output_params_t internal_output_params; - output_data_t output_data; - identify_data_t identify_data; - unpacker_data_t unpacker_data; -} libraw_internal_data_t; - - -struct decode -{ - struct decode *branch[2]; - int leaf; -}; - -struct tiff_ifd_t -{ - int t_width, t_height, bps, comp, phint, offset, t_flip, samples, bytes,tile_maxbytes; -}; - - -struct jhead { - int bits, high, wide, clrs, sraw, psv, restart, vpred[6]; - ushort *huff[6], *free[4], *row; -}; -struct tiff_tag { - ushort tag, type; - int count; - union { char c[4]; short s[2]; int i; } val; -}; - -struct tiff_hdr { - ushort t_order, magic; - int ifd; - ushort pad, ntag; - struct tiff_tag tag[23]; - int nextifd; - ushort pad2, nexif; - struct tiff_tag exif[4]; - ushort pad3, ngps; - struct tiff_tag gpst[10]; - short bps[4]; - int rat[10]; - unsigned gps[26]; - char t_desc[512], t_make[64], t_model[64], soft[32], date[20], t_artist[64]; -}; - - - -#ifdef DEBUG_STAGE_CHECKS -#define CHECK_ORDER_HIGH(expected_stage) \ - do { if((imgdata.progress_flags & LIBRAW_PROGRESS_THUMB_MASK) >= expected_stage) {fprintf(stderr,"CHECK_HIGH: check %d >= %d\n",imgdata.progress_flags & LIBRAW_PROGRESS_THUMB_MASK,expected_stage);return LIBRAW_OUT_OF_ORDER_CALL;} } while(0) - -#define CHECK_ORDER_LOW(expected_stage) \ - do { printf("Checking LOW %d/%d : %d\n",imgdata.progress_flags,expected_stage,imgdata.progress_flags= expected_stage) \ - {return LIBRAW_OUT_OF_ORDER_CALL;} } while(0) - -#define CHECK_ORDER_LOW(expected_stage) \ - do { if((imgdata.progress_flags&LIBRAW_PROGRESS_THUMB_MASK) < expected_stage) \ - return LIBRAW_OUT_OF_ORDER_CALL; } while(0) - -#define CHECK_ORDER_BIT(expected_stage) \ - do { if(imgdata.progress_flags & expected_stage) return LIBRAW_OUT_OF_ORDER_CALL; } while(0) - -#define SET_PROC_FLAG(stage) do {imgdata.progress_flags |= stage;} while (0) - -#endif - -#endif diff --git a/Source/LibRawLite/libraw/libraw_types.h b/Source/LibRawLite/libraw/libraw_types.h deleted file mode 100644 index 4185934..0000000 --- a/Source/LibRawLite/libraw/libraw_types.h +++ /dev/null @@ -1,352 +0,0 @@ -/* -*- C++ -*- - * File: libraw_types.h - * Copyright 2008-2010 LibRaw LLC (info@libraw.org) - * Created: Sat Mar 8 , 2008 - * - * LibRaw C data structures - * - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - */ - -#ifndef _LIBRAW_TYPES_H -#define _LIBRAW_TYPES_H - -#include -#ifndef WIN32 -#include -#endif -#include - -#if defined (_OPENMP) - -#if defined(WIN32) -# if defined (_MSC_VER) && (_MSC_VER >= 1600 || (_MSC_VER == 1500 && _MSC_FULL_VER >= 150030729) ) -/* VS2010+ : OpenMP works OK, VS2008: have tested by cgilles */ -# define LIBRAW_USE_OPENMP -#elif defined (__INTEL_COMPILER) && (__INTEL_COMPILER >=910) -/* Have not tested on 9.x and 10.x, but Intel documentation claims OpenMP 2.5 support in 9.1 */ -# define LIBRAW_USE_OPENMP -#else -# undef LIBRAW_USE_OPENMP -#endif -/* Not Win32 */ -# elif (defined(__APPLE__) || defined(__MACOSX__)) && defined(_REENTRANT) -# undef LIBRAW_USE_OPENMP -# else -# define LIBRAW_USE_OPENMP -# endif -#endif - -#ifdef LIBRAW_USE_OPENMP -#include -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(USE_LCMS) -#include -#elif defined(USE_LCMS2) -#include -#else -#define NO_LCMS -#endif - -#include "libraw_const.h" -#include "libraw_version.h" - -#ifndef _MSC_VER -// define portable types for 32-bit / 64-bit OS -#include -typedef int64_t INT64; -typedef uint64_t UINT64; -#else -// MS is not C99 ISO compliant -typedef signed __int64 INT64; -typedef unsigned __int64 UINT64; -#endif // _MSC_VER - -typedef unsigned char uchar; -typedef unsigned short ushort; - -#ifdef WIN32 -#ifdef LIBRAW_NODLL -# define DllDef -#else -# ifdef LIBRAW_BUILDLIB -# define DllDef __declspec( dllexport ) -# else -# define DllDef __declspec( dllimport ) -# endif -#endif -#else -# define DllDef -#endif - -typedef struct -{ - const char *decoder_name; - unsigned decoder_flags; -}libraw_decoder_info_t; - -typedef struct -{ - unsigned mix_green; - unsigned raw_color; - unsigned zero_is_bad; - ushort shrink; - ushort fuji_width; - ushort fwidth,fheight; -} libraw_internal_output_params_t; - - -typedef void (* memory_callback)(void * data, const char *file, const char *where); - -DllDef void default_memory_callback(void *data,const char *file, const char *where); - -typedef void (*data_callback)(void *data,const char *file, const int offset); - -DllDef void default_data_callback(void *data,const char *file, const int offset); - -typedef int (* progress_callback) (void *data,enum LibRaw_progress stage, int iteration,int expected); - -typedef struct -{ - memory_callback mem_cb; - void* memcb_data; - - data_callback data_cb; - void* datacb_data; - - progress_callback progress_cb; - void *progresscb_data; -} libraw_callbacks_t; - - -typedef struct -{ - enum LibRaw_image_formats type; - ushort height, - width, - colors, - bits; - unsigned int data_size; - unsigned char data[1]; -}libraw_processed_image_t; - - -typedef struct -{ - char make[64]; - char model[64]; - - unsigned raw_count; - unsigned dng_version; - unsigned is_foveon; - int colors; - - unsigned filters; - char cdesc[5]; - -}libraw_iparams_t; - -typedef struct -{ - ushort raw_height, - raw_width, - height, - width, - top_margin, - left_margin; - ushort iheight, - iwidth; - double pixel_aspect; - int flip; - -} libraw_image_sizes_t; - -struct ph1_t -{ - int format, key_off, t_black, black_off, split_col, tag_21a; - float tag_210; -}; - - -typedef struct -{ - unsigned curve_state : 3; - unsigned rgb_cam_state : 3; - unsigned cmatrix_state : 3; - unsigned pre_mul_state : 3; - unsigned cam_mul_state : 3; - unsigned filler : 17; -} color_data_state_t; - -typedef struct -{ - color_data_state_t color_flags; - ushort white[8][8]; - float cam_mul[4]; - float pre_mul[4]; - float cmatrix[3][4]; - float rgb_cam[3][4]; - float cam_xyz[4][3]; - ushort curve[0x10000]; - unsigned black; - unsigned cblack[8]; - unsigned maximum; - unsigned channel_maximum[4]; - struct ph1_t phase_one_data; - float flash_used; - float canon_ev; - char model2[64]; - void *profile; - unsigned profile_length; - short (*ph1_black)[2]; -}libraw_colordata_t; - -typedef struct -{ - enum LibRaw_thumbnail_formats tformat; - ushort twidth, - theight; - unsigned tlength; - int tcolors; - - char *thumb; -}libraw_thumbnail_t; - -typedef struct -{ - float iso_speed; - float shutter; - float aperture; - float focal_len; - time_t timestamp; - unsigned shot_order; - unsigned gpsdata[32]; - char desc[512], - artist[64]; -} libraw_imgother_t; - -typedef struct -{ - unsigned greybox[4]; /* -A x1 y1 x2 y2 */ - unsigned cropbox[4]; /* -B x1 y1 x2 y2 */ - double aber[4]; /* -C */ - double gamm[6]; /* -g */ - float user_mul[4]; /* -r mul0 mul1 mul2 mul3 */ - unsigned shot_select; /* -s */ - float bright; /* -b */ - float threshold; /* -n */ - int half_size; /* -h */ - int four_color_rgb; /* -f */ - int document_mode; /* -d/-D */ - int highlight; /* -H */ - int use_auto_wb; /* -a */ - int use_camera_wb; /* -w */ - int use_camera_matrix; /* +M/-M */ - int output_color; /* -o */ - char *output_profile; /* -o */ - char *camera_profile; /* -p */ - char *bad_pixels; /* -P */ - char *dark_frame; /* -K */ - int output_bps; /* -4 */ - int output_tiff; /* -T */ - int user_flip; /* -t */ - int user_qual; /* -q */ - int user_black; /* -k */ - int user_sat; /* -S */ - - int med_passes; /* -m */ - float auto_bright_thr; - float adjust_maximum_thr; - int no_auto_bright; /* -W */ - int use_fuji_rotate;/* -j */ - int green_matching; -#if 0 - /* AFD noise suppression parameters, disabled for now */ - int afd_noise_att; - int afd_noise_thres; - int afd_luminance_passes; - int afd_chrominance_method; - int afd_luminance_only; -#endif - /* DCB parameters */ - int dcb_iterations; - int dcb_enhance_fl; - int fbdd_noiserd; - /* VCD parameters */ - int eeci_refine; - int es_med_passes; - /* AMaZE*/ - int ca_correc; - float cared; - float cablue; - int cfaline; - float linenoise; - int cfa_clean; - float lclean; - float cclean; - int cfa_green; - float green_thresh; - int exp_correc; - float exp_shift; - float exp_preser; -}libraw_output_params_t; - -typedef struct -{ - /* really allocated bitmap */ - void *raw_alloc; - /* alias to single_channel variant */ - ushort *raw_image; - /* alias to 4-channel variant */ - ushort (*color_image)[4] ; - - /* Phase One black level data; */ - short (*ph1_black)[2]; - int use_ph1_correct; - /* save color and sizes here, too.... */ - libraw_iparams_t iparams; - libraw_image_sizes_t sizes; - libraw_internal_output_params_t ioparams; - libraw_colordata_t color; -} libraw_rawdata_t; - - -typedef struct -{ - unsigned int progress_flags; - unsigned int process_warnings; - libraw_iparams_t idata; - libraw_image_sizes_t sizes; - libraw_colordata_t color; - libraw_imgother_t other; - libraw_thumbnail_t thumbnail; - libraw_rawdata_t rawdata; - ushort (*image)[4] ; - libraw_output_params_t params; - void *parent_class; -} libraw_data_t; - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/Source/LibRawLite/libraw/libraw_version.h b/Source/LibRawLite/libraw/libraw_version.h deleted file mode 100644 index f3656a7..0000000 --- a/Source/LibRawLite/libraw/libraw_version.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- C++ -*- - * File: libraw_version.h - * Copyright 2008-2010 LibRaw LLC (info@libraw.org) - * Created: Mon Sept 8, 2008 - * - * LibRaw C++ interface - * - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 -(See the file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 -(See the file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See the file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - */ - -#ifndef __VERSION_H -#define __VERSION_H - -#define LIBRAW_MAJOR_VERSION 0 -#define LIBRAW_MINOR_VERSION 14 -#define LIBRAW_PATCH_VERSION 7 -#define LIBRAW_VERSION_TAIL Release - -#define LIBRAW_SHLIB_CURRENT 5 -#define LIBRAW_SHLIB_REVISION 0 -#define LIBRAW_SHLIB_AGE 0 - -#define _LIBRAW_VERSION_MAKE(a,b,c,d) #a"."#b"."#c"-"#d -#define LIBRAW_VERSION_MAKE(a,b,c,d) _LIBRAW_VERSION_MAKE(a,b,c,d) - -#define LIBRAW_VERSION_STR LIBRAW_VERSION_MAKE(LIBRAW_MAJOR_VERSION,LIBRAW_MINOR_VERSION,LIBRAW_PATCH_VERSION,LIBRAW_VERSION_TAIL) - -#define LIBRAW_MAKE_VERSION(major,minor,patch) \ - (((major) << 16) | ((minor) << 8) | (patch)) - -#define LIBRAW_VERSION \ - LIBRAW_MAKE_VERSION(LIBRAW_MAJOR_VERSION,LIBRAW_MINOR_VERSION,LIBRAW_PATCH_VERSION) - -#define LIBRAW_CHECK_VERSION(major,minor,patch) \ - ( LibRaw::versionNumber() >= LIBRAW_MAKE_VERSION(major,minor,patch) ) - -#define LIBRAW_RUNTIME_CHECK_VERSION_EXACT() \ - ( (LibRaw::versionNumber() & 0xffff00) == LIBRAW_MAKE_VERSION(LIBRAW_MAJOR_VERSION,LIBRAW_MINOR_VERSION,0) ) - -#define LIBRAW_RUNTIME_CHECK_VERSION_NOTLESS() \ - ( (LibRaw::versionNumber() & 0xffff00) >= LIBRAW_MAKE_VERSION(LIBRAW_MAJOR_VERSION,LIBRAW_MINOR_VERSION,0) ) - -#define LIBRAW_COMPILE_CHECK_VERSION(major,minor) \ - (LIBRAW_MAKE_VERSION(major,minor,0) == (LIBRAW_VERSION & 0xffff00)) - -#define LIBRAW_COMPILE_CHECK_VERSION_NOTLESS(major,minor) \ - (LIBRAW_MAKE_VERSION(major,minor,0) <= (LIBRAW_VERSION & 0xffff00)) - - -#endif diff --git a/Source/LibRawLite/src/libraw_c_api.cpp b/Source/LibRawLite/src/libraw_c_api.cpp deleted file mode 100644 index c795307..0000000 --- a/Source/LibRawLite/src/libraw_c_api.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/* -*- C++ -*- - * File: libraw_c_api.cpp - * Copyright 2008-2010 LibRaw LLC (info@libraw.org) - * Created: Sat Mar 8 , 2008 - * - * LibRaw C interface - - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - */ - -#include -#include -#include "libraw/libraw.h" - -#ifdef __cplusplus -#include -extern "C" -{ -#endif - - libraw_data_t *libraw_init(unsigned int flags) - { - LibRaw *ret; - try { - ret = new LibRaw(flags); - } - catch (std::bad_alloc) - { - return NULL; - } - return &(ret->imgdata); - } - - const char* libraw_version() { return LibRaw::version();} - const char* libraw_strprogress(enum LibRaw_progress p) { return LibRaw::strprogress(p);} - int libraw_versionNumber() { return LibRaw::versionNumber();} - const char** libraw_cameraList() { return LibRaw::cameraList();} - int libraw_cameraCount() { return LibRaw::cameraCount(); } - const char* libraw_unpack_function_name(libraw_data_t* lr) - { - if(!lr) return "NULL parameter passed"; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->unpack_function_name(); - } - - void libraw_subtract_black(libraw_data_t* lr) - { - if(!lr) return; - LibRaw *ip = (LibRaw*) lr->parent_class; - ip->subtract_black(); - } - - - int libraw_open_file(libraw_data_t* lr, const char *file) - { - if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->open_file(file); - } - int libraw_open_file_ex(libraw_data_t* lr, const char *file,INT64 sz) - { - if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->open_file(file,sz); - } - int libraw_open_buffer(libraw_data_t* lr, void *buffer, size_t size) - { - if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->open_buffer(buffer,size); - } - int libraw_unpack(libraw_data_t* lr) - { - if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->unpack(); - } - int libraw_unpack_thumb(libraw_data_t* lr) - { - if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->unpack_thumb(); - } - void libraw_recycle(libraw_data_t* lr) - { - if(!lr) return; - LibRaw *ip = (LibRaw*) lr->parent_class; - ip->recycle(); - } - void libraw_close(libraw_data_t* lr) - { - if(!lr) return; - LibRaw *ip = (LibRaw*) lr->parent_class; - delete ip; - } - - void libraw_set_memerror_handler(libraw_data_t* lr, memory_callback cb,void *data) - { - if(!lr) return; - LibRaw *ip = (LibRaw*) lr->parent_class; - ip->set_memerror_handler(cb,data); - - } - void libraw_set_dataerror_handler(libraw_data_t* lr,data_callback func,void *data) - { - if(!lr) return; - LibRaw *ip = (LibRaw*) lr->parent_class; - ip->set_dataerror_handler(func,data); - - } - void libraw_set_progress_handler(libraw_data_t* lr, progress_callback cb,void *data) - { - if(!lr) return; - LibRaw *ip = (LibRaw*) lr->parent_class; - ip->set_progress_handler(cb,data); - - } - - // DCRAW - int libraw_adjust_sizes_info_only(libraw_data_t* lr) - { - if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->adjust_sizes_info_only(); - } - int libraw_dcraw_document_mode_processing(libraw_data_t* lr) - { - if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->dcraw_document_mode_processing(); - - } - int libraw_dcraw_ppm_tiff_writer(libraw_data_t* lr,const char *filename) - { - if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->dcraw_ppm_tiff_writer(filename); - } - int libraw_dcraw_thumb_writer(libraw_data_t* lr,const char *fname) - { - if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->dcraw_thumb_writer(fname); - - } - int libraw_dcraw_process(libraw_data_t* lr) - { - if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->dcraw_process(); - } - libraw_processed_image_t *libraw_dcraw_make_mem_image(libraw_data_t* lr,int *errc) - { - if(!lr) { if(errc) *errc=EINVAL; return NULL;} - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->dcraw_make_mem_image(errc); - } - libraw_processed_image_t *libraw_dcraw_make_mem_thumb(libraw_data_t* lr,int *errc) - { - if(!lr) { if(errc) *errc=EINVAL; return NULL;} - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->dcraw_make_mem_thumb(errc); - } - - void libraw_dcraw_clear_mem(libraw_processed_image_t* p) - { - LibRaw::dcraw_clear_mem(p); - } - - int libraw_raw2image(libraw_data_t* lr) - { - if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->raw2image(); - } - void libraw_free_image(libraw_data_t* lr) - { - if(!lr) return; - LibRaw *ip = (LibRaw*) lr->parent_class; - ip->free_image(); - } - int libraw_get_decoder_info(libraw_data_t* lr,libraw_decoder_info_t *d) - { - if(!lr || !d) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->get_decoder_info(d); - } -#ifdef __cplusplus -} -#endif diff --git a/Source/LibRawLite/src/libraw_cxx.cpp b/Source/LibRawLite/src/libraw_cxx.cpp deleted file mode 100644 index 218460c..0000000 --- a/Source/LibRawLite/src/libraw_cxx.cpp +++ /dev/null @@ -1,2814 +0,0 @@ -/* -*- C++ -*- - * File: libraw_cxx.cpp - * Copyright 2008-2010 LibRaw LLC (info@libraw.org) - * Created: Sat Mar 8 , 2008 - * - * LibRaw C++ interface (implementation) - -LibRaw is free software; you can redistribute it and/or modify -it under the terms of the one of three licenses as you choose: - -1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 - (See file LICENSE.LGPL provided in LibRaw distribution archive for details). - -2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - (See file LICENSE.CDDL provided in LibRaw distribution archive for details). - -3. LibRaw Software License 27032010 - (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details). - - */ - -#include -#include -#include -#include -#include -#include -#include -#ifndef WIN32 -#include -#else -#include -#endif -#define LIBRAW_LIBRARY_BUILD -#include "libraw/libraw.h" -#include "internal/defines.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - void default_memory_callback(void *,const char *file,const char *where) - { - fprintf (stderr,"%s: Out of memory in %s\n", file?file:"unknown file", where); - } - - void default_data_callback(void*,const char *file, const int offset) - { - if(offset < 0) - fprintf (stderr,"%s: Unexpected end of file\n", file?file:"unknown file"); - else - fprintf (stderr,"%s: data corrupted at %d\n",file?file:"unknown file",offset); - } - const char *libraw_strerror(int e) - { - enum LibRaw_errors errorcode = (LibRaw_errors)e; - switch(errorcode) - { - case LIBRAW_SUCCESS: - return "No error"; - case LIBRAW_UNSPECIFIED_ERROR: - return "Unspecified error"; - case LIBRAW_FILE_UNSUPPORTED: - return "Unsupported file format or not RAW file"; - case LIBRAW_REQUEST_FOR_NONEXISTENT_IMAGE: - return "Request for nonexisting image number"; - case LIBRAW_OUT_OF_ORDER_CALL: - return "Out of order call of libraw function"; - case LIBRAW_NO_THUMBNAIL: - return "No thumbnail in file"; - case LIBRAW_UNSUPPORTED_THUMBNAIL: - return "Unsupported thumbnail format"; - case LIBRAW_UNSUFFICIENT_MEMORY: - return "Unsufficient memory"; - case LIBRAW_DATA_ERROR: - return "Corrupted data or unexpected EOF"; - case LIBRAW_IO_ERROR: - return "Input/output error"; - case LIBRAW_CANCELLED_BY_CALLBACK: - return "Cancelled by user callback"; - case LIBRAW_BAD_CROP: - return "Bad crop box"; - default: - return "Unknown error code"; - } - } - -#ifdef __cplusplus -} -#endif - - -const double LibRaw_constants::xyz_rgb[3][3] = -{ - { 0.412453, 0.357580, 0.180423 }, - { 0.212671, 0.715160, 0.072169 }, - { 0.019334, 0.119193, 0.950227 } -}; - -const float LibRaw_constants::d65_white[3] = { 0.950456f, 1.0f, 1.088754f }; - -#define P1 imgdata.idata -#define S imgdata.sizes -#define O imgdata.params -#define C imgdata.color -#define T imgdata.thumbnail -#define IO libraw_internal_data.internal_output_params -#define ID libraw_internal_data.internal_data - -#define EXCEPTION_HANDLER(e) do{ \ - /* fprintf(stderr,"Exception %d caught\n",e);*/ \ - switch(e) \ - { \ - case LIBRAW_EXCEPTION_ALLOC: \ - recycle(); \ - return LIBRAW_UNSUFFICIENT_MEMORY; \ - case LIBRAW_EXCEPTION_DECODE_RAW: \ - case LIBRAW_EXCEPTION_DECODE_JPEG: \ - recycle(); \ - return LIBRAW_DATA_ERROR; \ - case LIBRAW_EXCEPTION_DECODE_JPEG2000: \ - recycle(); \ - return LIBRAW_DATA_ERROR; \ - case LIBRAW_EXCEPTION_IO_EOF: \ - case LIBRAW_EXCEPTION_IO_CORRUPT: \ - recycle(); \ - return LIBRAW_IO_ERROR; \ - case LIBRAW_EXCEPTION_CANCELLED_BY_CALLBACK:\ - recycle(); \ - return LIBRAW_CANCELLED_BY_CALLBACK; \ - case LIBRAW_EXCEPTION_BAD_CROP: \ - recycle(); \ - return LIBRAW_BAD_CROP; \ - default: \ - return LIBRAW_UNSPECIFIED_ERROR; \ - } \ - }while(0) - -const char* LibRaw::version() { return LIBRAW_VERSION_STR;} -int LibRaw::versionNumber() { return LIBRAW_VERSION; } -const char* LibRaw::strerror(int p) { return libraw_strerror(p);} - - -void LibRaw::derror() -{ - if (!libraw_internal_data.unpacker_data.data_error && libraw_internal_data.internal_data.input) - { - if (libraw_internal_data.internal_data.input->eof()) - { - if(callbacks.data_cb)(*callbacks.data_cb)(callbacks.datacb_data, - libraw_internal_data.internal_data.input->fname(),-1); - throw LIBRAW_EXCEPTION_IO_EOF; - } - else - { - if(callbacks.data_cb)(*callbacks.data_cb)(callbacks.datacb_data, - libraw_internal_data.internal_data.input->fname(), - libraw_internal_data.internal_data.input->tell()); - throw LIBRAW_EXCEPTION_IO_CORRUPT; - } - } - libraw_internal_data.unpacker_data.data_error++; -} - -void LibRaw::dcraw_clear_mem(libraw_processed_image_t* p) -{ - if(p) ::free(p); -} - -#define ZERO(a) memset(&a,0,sizeof(a)) - - -LibRaw:: LibRaw(unsigned int flags) -{ - double aber[4] = {1,1,1,1}; - double gamm[6] = { 0.45,4.5,0,0,0,0 }; - unsigned greybox[4] = { 0, 0, UINT_MAX, UINT_MAX }; - unsigned cropbox[4] = { 0, 0, UINT_MAX, UINT_MAX }; -#ifdef DCRAW_VERBOSE - verbose = 1; -#else - verbose = 0; -#endif - ZERO(imgdata); - ZERO(libraw_internal_data); - ZERO(callbacks); - callbacks.mem_cb = (flags & LIBRAW_OPIONS_NO_MEMERR_CALLBACK) ? NULL: &default_memory_callback; - callbacks.data_cb = (flags & LIBRAW_OPIONS_NO_DATAERR_CALLBACK)? NULL : &default_data_callback; - memmove(&imgdata.params.aber,&aber,sizeof(aber)); - memmove(&imgdata.params.gamm,&gamm,sizeof(gamm)); - memmove(&imgdata.params.greybox,&greybox,sizeof(greybox)); - memmove(&imgdata.params.cropbox,&cropbox,sizeof(cropbox)); - - imgdata.params.bright=1; - imgdata.params.use_camera_matrix=-1; - imgdata.params.user_flip=-1; - imgdata.params.user_black=-1; - imgdata.params.user_sat=-1; - imgdata.params.user_qual=-1; - imgdata.params.output_color=1; - imgdata.params.output_bps=8; - imgdata.params.use_fuji_rotate=1; - imgdata.params.exp_shift = 1.0; - imgdata.params.auto_bright_thr = LIBRAW_DEFAULT_AUTO_BRIGHTNESS_THRESHOLD; - imgdata.params.adjust_maximum_thr= LIBRAW_DEFAULT_ADJUST_MAXIMUM_THRESHOLD; - imgdata.params.green_matching = 0; - imgdata.parent_class = this; - imgdata.progress_flags = 0; - tls = new LibRaw_TLS; - tls->init(); -} - - -void* LibRaw:: malloc(size_t t) -{ - void *p = memmgr.malloc(t); - return p; -} -void* LibRaw:: realloc(void *q,size_t t) -{ - void *p = memmgr.realloc(q,t); - return p; -} - - -void* LibRaw:: calloc(size_t n,size_t t) -{ - void *p = memmgr.calloc(n,t); - return p; -} -void LibRaw:: free(void *p) -{ - memmgr.free(p); -} - - -int LibRaw:: fc (int row, int col) -{ - static const char filter[16][16] = - { { 2,1,1,3,2,3,2,0,3,2,3,0,1,2,1,0 }, - { 0,3,0,2,0,1,3,1,0,1,1,2,0,3,3,2 }, - { 2,3,3,2,3,1,1,3,3,1,2,1,2,0,0,3 }, - { 0,1,0,1,0,2,0,2,2,0,3,0,1,3,2,1 }, - { 3,1,1,2,0,1,0,2,1,3,1,3,0,1,3,0 }, - { 2,0,0,3,3,2,3,1,2,0,2,0,3,2,2,1 }, - { 2,3,3,1,2,1,2,1,2,1,1,2,3,0,0,1 }, - { 1,0,0,2,3,0,0,3,0,3,0,3,2,1,2,3 }, - { 2,3,3,1,1,2,1,0,3,2,3,0,2,3,1,3 }, - { 1,0,2,0,3,0,3,2,0,1,1,2,0,1,0,2 }, - { 0,1,1,3,3,2,2,1,1,3,3,0,2,1,3,2 }, - { 2,3,2,0,0,1,3,0,2,0,1,2,3,0,1,0 }, - { 1,3,1,2,3,2,3,2,0,2,0,1,1,0,3,0 }, - { 0,2,0,3,1,0,0,1,1,3,3,2,3,2,2,1 }, - { 2,1,3,2,3,1,2,1,0,3,0,2,0,2,0,2 }, - { 0,3,1,0,0,2,0,3,2,1,3,1,1,3,1,3 } }; - - if (imgdata.idata.filters != 1) return FC(row,col); - return filter[(row+imgdata.sizes.top_margin) & 15][(col+imgdata.sizes.left_margin) & 15]; -} - -void LibRaw:: recycle() -{ - if(libraw_internal_data.internal_data.input && libraw_internal_data.internal_data.input_internal) - { - delete libraw_internal_data.internal_data.input; - libraw_internal_data.internal_data.input = NULL; - } - libraw_internal_data.internal_data.input_internal = 0; -#define FREE(a) do { if(a) { free(a); a = NULL;} }while(0) - - FREE(imgdata.image); - FREE(imgdata.thumbnail.thumb); - FREE(libraw_internal_data.internal_data.meta_data); - FREE(libraw_internal_data.output_data.histogram); - FREE(libraw_internal_data.output_data.oprof); - FREE(imgdata.color.profile); - FREE(imgdata.rawdata.ph1_black); - FREE(imgdata.rawdata.raw_alloc); -#undef FREE - ZERO(imgdata.rawdata); - ZERO(imgdata.sizes); - ZERO(imgdata.color); - ZERO(libraw_internal_data); - memmgr.cleanup(); - imgdata.thumbnail.tformat = LIBRAW_THUMBNAIL_UNKNOWN; - imgdata.progress_flags = 0; - - tls->init(); -} - -const char * LibRaw::unpack_function_name() -{ - libraw_decoder_info_t decoder_info; - get_decoder_info(&decoder_info); - return decoder_info.decoder_name; -} - -int LibRaw::get_decoder_info(libraw_decoder_info_t* d_info) -{ - if(!d_info) return LIBRAW_UNSPECIFIED_ERROR; - if(!load_raw) return LIBRAW_OUT_OF_ORDER_CALL; - - d_info->decoder_flags = LIBRAW_DECODER_NOTSET; - - // sorted names order - if (load_raw == &LibRaw::adobe_dng_load_raw_lj) - { - // Check rbayer - d_info->decoder_name = "adobe_dng_load_raw_lj()"; - d_info->decoder_flags = imgdata.idata.filters ? LIBRAW_DECODER_FLATFIELD : LIBRAW_DECODER_4COMPONENT ; - d_info->decoder_flags |= LIBRAW_DECODER_HASCURVE; - } - else if (load_raw == &LibRaw::adobe_dng_load_raw_nc) - { - // Check rbayer - d_info->decoder_name = "adobe_dng_load_raw_nc()"; - d_info->decoder_flags = imgdata.idata.filters ? LIBRAW_DECODER_FLATFIELD : LIBRAW_DECODER_4COMPONENT; - d_info->decoder_flags |= LIBRAW_DECODER_HASCURVE; - } - else if (load_raw == &LibRaw::canon_600_load_raw) - { - d_info->decoder_name = "canon_600_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; // WB set within decoder, no need to load raw - } - else if (load_raw == &LibRaw::canon_compressed_load_raw) - { - d_info->decoder_name = "canon_compressed_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::canon_sraw_load_raw) - { - d_info->decoder_name = "canon_sraw_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_LEGACY; - } - else if (load_raw == &LibRaw::eight_bit_load_raw ) - { - d_info->decoder_name = "eight_bit_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - d_info->decoder_flags |= LIBRAW_DECODER_HASCURVE; - } - else if (load_raw == &LibRaw::foveon_load_raw ) - { - d_info->decoder_name = "foveon_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_LEGACY; - } - else if (load_raw == &LibRaw::fuji_load_raw ) - { - d_info->decoder_name = "fuji_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::hasselblad_load_raw ) - { - d_info->decoder_name = "hasselblad_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::imacon_full_load_raw ) - { - d_info->decoder_name = "imacon_full_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_4COMPONENT; - } - else if (load_raw == &LibRaw::kodak_262_load_raw ) - { - d_info->decoder_name = "kodak_262_load_raw()"; // UNTESTED! - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - d_info->decoder_flags |= LIBRAW_DECODER_HASCURVE; - } - else if (load_raw == &LibRaw::kodak_65000_load_raw ) - { - d_info->decoder_name = "kodak_65000_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - d_info->decoder_flags |= LIBRAW_DECODER_HASCURVE; - } - else if (load_raw == &LibRaw::kodak_dc120_load_raw ) - { - d_info->decoder_name = "kodak_dc120_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::kodak_jpeg_load_raw ) - { - // UNTESTED + RBAYER - d_info->decoder_name = "kodak_jpeg_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::kodak_radc_load_raw ) - { - d_info->decoder_name = "kodak_radc_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_4COMPONENT; - } - else if (load_raw == &LibRaw::kodak_rgb_load_raw ) - { - // UNTESTED - d_info->decoder_name = "kodak_rgb_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_4COMPONENT; - } - else if (load_raw == &LibRaw::kodak_yrgb_load_raw ) - { - d_info->decoder_name = "kodak_yrgb_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_4COMPONENT; - d_info->decoder_flags |= LIBRAW_DECODER_HASCURVE; - } - else if (load_raw == &LibRaw::kodak_ycbcr_load_raw ) - { - // UNTESTED - d_info->decoder_name = "kodak_ycbcr_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_4COMPONENT; - d_info->decoder_flags |= LIBRAW_DECODER_HASCURVE; - } - else if (load_raw == &LibRaw::leaf_hdr_load_raw ) - { - d_info->decoder_name = "leaf_hdr_load_raw()"; - d_info->decoder_flags = imgdata.idata.filters ? LIBRAW_DECODER_FLATFIELD : LIBRAW_DECODER_4COMPONENT; - } - else if (load_raw == &LibRaw::lossless_jpeg_load_raw) - { - // Check rbayer - d_info->decoder_name = "lossless_jpeg_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD | LIBRAW_DECODER_HASCURVE; - } - else if (load_raw == &LibRaw::minolta_rd175_load_raw ) - { - // UNTESTED - d_info->decoder_name = "minolta_rd175_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::nikon_compressed_load_raw) - { - // Check rbayer - d_info->decoder_name = "nikon_compressed_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::nokia_load_raw ) - { - // UNTESTED - d_info->decoder_name = "nokia_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::olympus_load_raw ) - { - d_info->decoder_name = "olympus_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::packed_load_raw ) - { - d_info->decoder_name = "packed_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::panasonic_load_raw ) - { - d_info->decoder_name = "panasonic_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::pentax_load_raw ) - { - d_info->decoder_name = "pentax_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::phase_one_load_raw ) - { - d_info->decoder_name = "phase_one_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::phase_one_load_raw_c ) - { - d_info->decoder_name = "phase_one_load_raw_c()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::quicktake_100_load_raw ) - { - // UNTESTED - d_info->decoder_name = "quicktake_100_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::rollei_load_raw ) - { - // UNTESTED - d_info->decoder_name = "rollei_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::sinar_4shot_load_raw ) - { - // UNTESTED - d_info->decoder_name = "sinar_4shot_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_4COMPONENT; - } - else if (load_raw == &LibRaw::smal_v6_load_raw ) - { - // UNTESTED - d_info->decoder_name = "smal_v6_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::smal_v9_load_raw ) - { - // UNTESTED - d_info->decoder_name = "smal_v9_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::sony_load_raw ) - { - d_info->decoder_name = "sony_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::sony_arw_load_raw ) - { - d_info->decoder_name = "sony_arw_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - } - else if (load_raw == &LibRaw::sony_arw2_load_raw ) - { - d_info->decoder_name = "sony_arw2_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - d_info->decoder_flags |= LIBRAW_DECODER_HASCURVE; - } - else if (load_raw == &LibRaw::unpacked_load_raw ) - { - d_info->decoder_name = "unpacked_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD | LIBRAW_DECODER_USEBAYER2; - } - else if (load_raw == &LibRaw::redcine_load_raw) - { - d_info->decoder_name = "redcine_load_raw()"; - d_info->decoder_flags = LIBRAW_DECODER_FLATFIELD; - d_info->decoder_flags |= LIBRAW_DECODER_HASCURVE; - } - else - { - d_info->decoder_name = "Unknown unpack function"; - d_info->decoder_flags = LIBRAW_DECODER_NOTSET; - } - return LIBRAW_SUCCESS; -} - -int LibRaw::adjust_maximum() -{ - int i; - ushort real_max; - float auto_threshold; - - if(O.adjust_maximum_thr < 0.00001) - return LIBRAW_SUCCESS; - else if (O.adjust_maximum_thr > 0.99999) - auto_threshold = LIBRAW_DEFAULT_ADJUST_MAXIMUM_THRESHOLD; - else - auto_threshold = O.adjust_maximum_thr; - - - real_max = C.channel_maximum[0]; - for(i = 1; i< 4; i++) - if(real_max < C.channel_maximum[i]) - real_max = C.channel_maximum[i]; - - if (real_max > 0 && real_max < C.maximum && real_max > C.maximum* auto_threshold) - { - C.maximum = real_max; - } - return LIBRAW_SUCCESS; -} - - -void LibRaw:: merror (void *ptr, const char *where) -{ - if (ptr) return; - if(callbacks.mem_cb)(*callbacks.mem_cb)(callbacks.memcb_data, - libraw_internal_data.internal_data.input - ?libraw_internal_data.internal_data.input->fname() - :NULL, - where); - throw LIBRAW_EXCEPTION_ALLOC; -} - - - -int LibRaw::open_file(const char *fname, INT64 max_buf_size) -{ -#ifndef WIN32 - struct stat st; - if(stat(fname,&st)) - return LIBRAW_IO_ERROR; - int big = (st.st_size > max_buf_size)?1:0; -#else - struct _stati64 st; - if(_stati64(fname,&st)) - return LIBRAW_IO_ERROR; - int big = (st.st_size > max_buf_size)?1:0; -#endif - - LibRaw_abstract_datastream *stream; - try { - if(big) - stream = new LibRaw_bigfile_datastream(fname); - else - stream = new LibRaw_file_datastream(fname); - } - - catch (std::bad_alloc) - { - recycle(); - return LIBRAW_UNSUFFICIENT_MEMORY; - } - if(!stream->valid()) - { - delete stream; - return LIBRAW_IO_ERROR; - } - ID.input_internal = 0; // preserve from deletion on error - int ret = open_datastream(stream); - if (ret == LIBRAW_SUCCESS) - { - ID.input_internal =1 ; // flag to delete datastream on recycle - } - else - { - delete stream; - ID.input_internal = 0; - } - return ret; -} - -int LibRaw::open_buffer(void *buffer, size_t size) -{ - // this stream will close on recycle() - if(!buffer || buffer==(void*)-1) - return LIBRAW_IO_ERROR; - - LibRaw_buffer_datastream *stream; - try { - stream = new LibRaw_buffer_datastream(buffer,size); - } - catch (std::bad_alloc) - { - recycle(); - return LIBRAW_UNSUFFICIENT_MEMORY; - } - if(!stream->valid()) - { - delete stream; - return LIBRAW_IO_ERROR; - } - ID.input_internal = 0; // preserve from deletion on error - int ret = open_datastream(stream); - if (ret == LIBRAW_SUCCESS) - { - ID.input_internal =1 ; // flag to delete datastream on recycle - } - else - { - delete stream; - ID.input_internal = 0; - } - return ret; -} - - -int LibRaw::open_datastream(LibRaw_abstract_datastream *stream) -{ - - if(!stream) - return ENOENT; - if(!stream->valid()) - return LIBRAW_IO_ERROR; - recycle(); - - try { - ID.input = stream; - SET_PROC_FLAG(LIBRAW_PROGRESS_OPEN); - - if (O.use_camera_matrix < 0) - O.use_camera_matrix = O.use_camera_wb; - - identify(); - - if(IO.fuji_width) - { - IO.fwidth = S.width; - IO.fheight = S.height; - S.iwidth = S.width = IO.fuji_width << (int)(!libraw_internal_data.unpacker_data.fuji_layout); - S.iheight = S.height = S.raw_height; - S.raw_height += 2*S.top_margin; - } - - if(C.profile_length) - { - if(C.profile) free(C.profile); - C.profile = malloc(C.profile_length); - merror(C.profile,"LibRaw::open_file()"); - ID.input->seek(ID.profile_offset,SEEK_SET); - ID.input->read(C.profile,C.profile_length,1); - } - - SET_PROC_FLAG(LIBRAW_PROGRESS_IDENTIFY); - } - catch ( LibRaw_exceptions err) { - EXCEPTION_HANDLER(err); - } - catch (std::exception ee) { - EXCEPTION_HANDLER(LIBRAW_EXCEPTION_IO_CORRUPT); - } - - if(P1.raw_count < 1) - return LIBRAW_FILE_UNSUPPORTED; - - - write_fun = &LibRaw::write_ppm_tiff; - - if (load_raw == &LibRaw::kodak_ycbcr_load_raw) - { - S.height += S.height & 1; - S.width += S.width & 1; - } - - IO.shrink = P1.filters && (O.half_size || - ((O.threshold || O.aber[0] != 1 || O.aber[2] != 1) )); - - S.iheight = (S.height + IO.shrink) >> IO.shrink; - S.iwidth = (S.width + IO.shrink) >> IO.shrink; - - // Save color,sizes and internal data into raw_image fields - memmove(&imgdata.rawdata.color,&imgdata.color,sizeof(imgdata.color)); - memmove(&imgdata.rawdata.sizes,&imgdata.sizes,sizeof(imgdata.sizes)); - memmove(&imgdata.rawdata.iparams,&imgdata.idata,sizeof(imgdata.idata)); - memmove(&imgdata.rawdata.ioparams,&libraw_internal_data.internal_output_params,sizeof(libraw_internal_data.internal_output_params)); - - SET_PROC_FLAG(LIBRAW_PROGRESS_SIZE_ADJUST); - - - return LIBRAW_SUCCESS; -} - -int LibRaw::unpack(void) -{ - CHECK_ORDER_HIGH(LIBRAW_PROGRESS_LOAD_RAW); - CHECK_ORDER_LOW(LIBRAW_PROGRESS_IDENTIFY); - try { - - RUN_CALLBACK(LIBRAW_PROGRESS_LOAD_RAW,0,2); - if (O.shot_select >= P1.raw_count) - return LIBRAW_REQUEST_FOR_NONEXISTENT_IMAGE; - - if(!load_raw) - return LIBRAW_UNSPECIFIED_ERROR; - - if (O.use_camera_matrix && C.cmatrix[0][0] > 0.25) - { - memcpy (C.rgb_cam, C.cmatrix, sizeof (C.cmatrix)); - IO.raw_color = 0; - } - // already allocated ? - if(imgdata.image) - { - free(imgdata.image); - imgdata.image = 0; - } - - if (libraw_internal_data.unpacker_data.meta_length) - { - libraw_internal_data.internal_data.meta_data = - (char *) malloc (libraw_internal_data.unpacker_data.meta_length); - merror (libraw_internal_data.internal_data.meta_data, "LibRaw::unpack()"); - } - ID.input->seek(libraw_internal_data.unpacker_data.data_offset, SEEK_SET); - int save_document_mode = O.document_mode; - O.document_mode = 0; - - libraw_decoder_info_t decoder_info; - get_decoder_info(&decoder_info); - - int save_iwidth = S.iwidth, save_iheight = S.iheight, save_shrink = IO.shrink; - - int rwidth = S.raw_width, rheight = S.raw_height; - if( !IO.fuji_width) - { - // adjust non-Fuji allocation - if(rwidth < S.width + S.left_margin) - rwidth = S.width + S.left_margin; - if(rheight < S.height + S.top_margin) - rheight = S.height + S.top_margin; - } - - if(decoder_info.decoder_flags & LIBRAW_DECODER_FLATFIELD) - { - imgdata.rawdata.raw_alloc = malloc(rwidth*rheight*sizeof(imgdata.rawdata.raw_image[0])); - imgdata.rawdata.raw_image = (ushort*) imgdata.rawdata.raw_alloc; - } - else if (decoder_info.decoder_flags & LIBRAW_DECODER_4COMPONENT) - { - S.iwidth = S.width; - S.iheight= S.height; - IO.shrink = 0; - imgdata.rawdata.raw_alloc = calloc(rwidth*rheight,sizeof(*imgdata.rawdata.color_image)); - imgdata.rawdata.color_image = (ushort(*)[4]) imgdata.rawdata.raw_alloc; - } - else if (decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY) - { - // sRAW and Foveon only, so extra buffer size is just 1/4 - // Legacy converters does not supports half mode! - S.iwidth = S.width; - S.iheight= S.height; - IO.shrink = 0; - // allocate image as temporary buffer, size - imgdata.rawdata.raw_alloc = calloc(S.iwidth*S.iheight,sizeof(*imgdata.image)); - imgdata.image = (ushort (*)[4]) imgdata.rawdata.raw_alloc; - } - - - (this->*load_raw)(); - - - // recover saved - if( decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY) - { - imgdata.image = 0; - imgdata.rawdata.color_image = (ushort (*)[4]) imgdata.rawdata.raw_alloc; - } - - // calculate channel maximum - { - for(int c=0;c<4;c++) C.channel_maximum[c] = 0; - if(decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY) - { - for(int rc = 0; rc < S.iwidth*S.iheight; rc++) - { - if(C.channel_maximum[0] C.cblack[c]) i = C.cblack[c]; - for (c=0;c<4;c++) - C.cblack[c] -= i; - C.black += i; - - - // Save color,sizes and internal data into raw_image fields - memmove(&imgdata.rawdata.color,&imgdata.color,sizeof(imgdata.color)); - memmove(&imgdata.rawdata.sizes,&imgdata.sizes,sizeof(imgdata.sizes)); - memmove(&imgdata.rawdata.iparams,&imgdata.idata,sizeof(imgdata.idata)); - memmove(&imgdata.rawdata.ioparams,&libraw_internal_data.internal_output_params,sizeof(libraw_internal_data.internal_output_params)); - - SET_PROC_FLAG(LIBRAW_PROGRESS_LOAD_RAW); - RUN_CALLBACK(LIBRAW_PROGRESS_LOAD_RAW,1,2); - - return 0; - } - catch ( LibRaw_exceptions err) { - EXCEPTION_HANDLER(err); - } - catch (std::exception ee) { - EXCEPTION_HANDLER(LIBRAW_EXCEPTION_IO_CORRUPT); - } -} - -void LibRaw::free_image(void) -{ - if(imgdata.image) - { - free(imgdata.image); - imgdata.image = 0; - imgdata.progress_flags - = LIBRAW_PROGRESS_START|LIBRAW_PROGRESS_OPEN - |LIBRAW_PROGRESS_IDENTIFY|LIBRAW_PROGRESS_SIZE_ADJUST|LIBRAW_PROGRESS_LOAD_RAW; - } -} - - -void LibRaw::raw2image_start() -{ - // restore color,sizes and internal data into raw_image fields - memmove(&imgdata.color,&imgdata.rawdata.color,sizeof(imgdata.color)); - memmove(&imgdata.sizes,&imgdata.rawdata.sizes,sizeof(imgdata.sizes)); - memmove(&imgdata.idata,&imgdata.rawdata.iparams,sizeof(imgdata.idata)); - memmove(&libraw_internal_data.internal_output_params,&imgdata.rawdata.ioparams,sizeof(libraw_internal_data.internal_output_params)); - - if (O.user_flip >= 0) - S.flip = O.user_flip; - - switch ((S.flip+3600) % 360) - { - case 270: S.flip = 5; break; - case 180: S.flip = 3; break; - case 90: S.flip = 6; break; - } - - // adjust for half mode! - IO.shrink = P1.filters && (O.half_size || - ((O.threshold || O.aber[0] != 1 || O.aber[2] != 1) )); - - S.iheight = (S.height + IO.shrink) >> IO.shrink; - S.iwidth = (S.width + IO.shrink) >> IO.shrink; - - if (O.user_black >= 0) - C.black = O.user_black; -} - -// Same as raw2image, but -// 1) Do raw2image and rotate_fuji_raw in one pass -// 2) Do raw2image and cropping in one pass -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif -int LibRaw::raw2image_ex(void) -{ - CHECK_ORDER_LOW(LIBRAW_PROGRESS_LOAD_RAW); - - raw2image_start(); - - // process cropping - int do_crop = 0; - unsigned save_filters = imgdata.idata.filters; - unsigned save_width = S.width; - if (~O.cropbox[2] && ~O.cropbox[3]) - { - int crop[4],c,filt; - for(int c=0;c<4;c++) - { - crop[c] = O.cropbox[c]; - if(crop[c]<0) - crop[c]=0; - } - if(IO.fwidth) - { - crop[0] = (crop[0]/4)*4; - crop[1] = (crop[1]/4)*4; - } - do_crop = 1; - crop[2] = MIN (crop[2], (signed) S.width-crop[0]); - crop[3] = MIN (crop[3], (signed) S.height-crop[1]); - if (crop[2] <= 0 || crop[3] <= 0) - throw LIBRAW_EXCEPTION_BAD_CROP; - - // adjust sizes! - S.left_margin+=crop[0]; - S.top_margin+=crop[1]; - S.width=crop[2]; - S.height=crop[3]; - - S.iheight = (S.height + IO.shrink) >> IO.shrink; - S.iwidth = (S.width + IO.shrink) >> IO.shrink; - if(!IO.fwidth && imgdata.idata.filters) - { - for (filt=c=0; c < 16; c++) - filt |= FC((c >> 1)+(crop[1]), - (c & 1)+(crop[0])) << c*2; - imgdata.idata.filters = filt; - } - } - - if(IO.fwidth) - { - ushort fiwidth,fiheight; - if(do_crop) - { - IO.fuji_width = S.width >> !libraw_internal_data.unpacker_data.fuji_layout; - IO.fwidth = (S.height >> libraw_internal_data.unpacker_data.fuji_layout) + IO.fuji_width; - IO.fheight = IO.fwidth - 1; - } - - fiheight = (IO.fheight + IO.shrink) >> IO.shrink; - fiwidth = (IO.fwidth + IO.shrink) >> IO.shrink; - if(imgdata.image) - { - imgdata.image = (ushort (*)[4])realloc(imgdata.image,fiheight*fiwidth*sizeof (*imgdata.image)); - memset(imgdata.image,0,fiheight*fiwidth *sizeof (*imgdata.image)); - } - else - imgdata.image = (ushort (*)[4]) calloc (fiheight*fiwidth, sizeof (*imgdata.image)); - merror (imgdata.image, "raw2image_ex()"); - - int cblk[4],i; - for(i=0;i<4;i++) - cblk[i] = C.cblack[i]+C.black; - ZERO(C.channel_maximum); - - int row,col; - for(row=0;row> 1); - c = col + ((row+1) >> 1); - } else { - r = IO.fuji_width - 1 + row - (col >> 1); - c = row + ((col+1) >> 1); - } - - int val = imgdata.rawdata.raw_image[(row+S.top_margin)*S.raw_width - +(col+S.left_margin)]; - int cc = FCF(row,col); - if(val > cblk[cc]) - val -= cblk[cc]; - else - val = 0; - imgdata.image[((r) >> IO.shrink)*fiwidth + ((c) >> IO.shrink)][cc] = val; - if(C.channel_maximum[cc] < val) C.channel_maximum[cc] = val; - } - } - C.maximum -= C.black; - ZERO(C.cblack); - C.black = 0; - - // restore fuji sizes! - S.height = IO.fheight; - S.width = IO.fwidth; - S.iheight = (S.height + IO.shrink) >> IO.shrink; - S.iwidth = (S.width + IO.shrink) >> IO.shrink; - S.raw_height -= 2*S.top_margin; - } - else - { - - if(imgdata.image) - { - imgdata.image = (ushort (*)[4]) realloc (imgdata.image,S.iheight*S.iwidth - *sizeof (*imgdata.image)); - memset(imgdata.image,0,S.iheight*S.iwidth *sizeof (*imgdata.image)); - } - else - imgdata.image = (ushort (*)[4]) calloc (S.iheight*S.iwidth, sizeof (*imgdata.image)); - - merror (imgdata.image, "raw2image_ex()"); - - libraw_decoder_info_t decoder_info; - get_decoder_info(&decoder_info); - - - if(decoder_info.decoder_flags & LIBRAW_DECODER_FLATFIELD) - { - if(decoder_info.decoder_flags & LIBRAW_DECODER_USEBAYER2) -#if defined(LIBRAW_USE_OPENMP) -#pragma omp parallel for default(shared) -#endif - for(int row = 0; row < S.height; row++) - for(int col = 0; col < S.width; col++) - imgdata.image[(row >> IO.shrink)*S.iwidth + (col>>IO.shrink)][fc(row,col)] - = imgdata.rawdata.raw_image[(row+S.top_margin)*S.raw_width - +(col+S.left_margin)]; - else -#if defined(LIBRAW_USE_OPENMP) -#pragma omp parallel for default(shared) -#endif - for(int row = 0; row < S.height; row++) - { - int colors[2]; - for (int xx=0;xx<2;xx++) - colors[xx] = COLOR(row,xx); - for(int col = 0; col < S.width; col++) - { - int cc = colors[col&1]; - imgdata.image[(row >> IO.shrink)*S.iwidth + (col>>IO.shrink)][cc] = - imgdata.rawdata.raw_image[(row+S.top_margin)*S.raw_width - +(col+S.left_margin)]; - } - } - } - else if (decoder_info.decoder_flags & LIBRAW_DECODER_4COMPONENT) - { -#define FC0(row,col) (save_filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3) - if(IO.shrink) -#if defined(LIBRAW_USE_OPENMP) -#pragma omp parallel for default(shared) -#endif - for(int row = 0; row < S.height; row++) - for(int col = 0; col < S.width; col++) - imgdata.image[(row >> IO.shrink)*S.iwidth + (col>>IO.shrink)][FC(row,col)] - = imgdata.rawdata.color_image[(row+S.top_margin)*S.raw_width - +S.left_margin+col] - [FC0(row+S.top_margin,col+S.left_margin)]; -#undef FC0 - else -#if defined(LIBRAW_USE_OPENMP) -#pragma omp parallel for default(shared) -#endif - for(int row = 0; row < S.height; row++) - memmove(&imgdata.image[row*S.width], - &imgdata.rawdata.color_image[(row+S.top_margin)*S.raw_width+S.left_margin], - S.width*sizeof(*imgdata.image)); - } - else if(decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY) - { - if(do_crop) -#if defined(LIBRAW_USE_OPENMP) -#pragma omp parallel for default(shared) -#endif - for(int row = 0; row < S.height; row++) - memmove(&imgdata.image[row*S.width], - &imgdata.rawdata.color_image[(row+S.top_margin)*save_width+S.left_margin], - S.width*sizeof(*imgdata.image)); - - else - memmove(imgdata.image,imgdata.rawdata.color_image, - S.width*S.height*sizeof(*imgdata.image)); - } - - if(imgdata.rawdata.use_ph1_correct) // Phase one unpacked! - phase_one_correct(); - } - return LIBRAW_SUCCESS; -} - -#undef MIN - - - - -int LibRaw::raw2image(void) -{ - - CHECK_ORDER_LOW(LIBRAW_PROGRESS_LOAD_RAW); - - try { - raw2image_start(); - - // free and re-allocate image bitmap - if(imgdata.image) - { - imgdata.image = (ushort (*)[4]) realloc (imgdata.image,S.iheight*S.iwidth *sizeof (*imgdata.image)); - memset(imgdata.image,0,S.iheight*S.iwidth *sizeof (*imgdata.image)); - } - else - imgdata.image = (ushort (*)[4]) calloc (S.iheight*S.iwidth, sizeof (*imgdata.image)); - - merror (imgdata.image, "raw2image()"); - - libraw_decoder_info_t decoder_info; - get_decoder_info(&decoder_info); - - // Move saved bitmap to imgdata.image - if(decoder_info.decoder_flags & LIBRAW_DECODER_FLATFIELD) - { - if(decoder_info.decoder_flags & LIBRAW_DECODER_USEBAYER2) - { - for(int row = 0; row < S.height; row++) - for(int col = 0; col < S.width; col++) - imgdata.image[(row >> IO.shrink)*S.iwidth + (col>>IO.shrink)][fc(row,col)] - = imgdata.rawdata.raw_image[(row+S.top_margin)*S.raw_width - +(col+S.left_margin)]; - } - else - { - for(int row = 0; row < S.height; row++) - { - int colors[4]; - for (int xx=0;xx<4;xx++) - colors[xx] = COLOR(row,xx); - for(int col = 0; col < S.width; col++) - { - int cc = colors[col&3]; - imgdata.image[(row >> IO.shrink)*S.iwidth + (col>>IO.shrink)][cc] = - imgdata.rawdata.raw_image[(row+S.top_margin)*S.raw_width+(col - +S.left_margin)]; - } - } - } - } - else if (decoder_info.decoder_flags & LIBRAW_DECODER_4COMPONENT) - { - if(IO.shrink) - { - for(int row = 0; row < S.height; row++) - for(int col = 0; col < S.width; col++) - { - int cc = FC(row,col); - imgdata.image[(row >> IO.shrink)*S.iwidth + (col>>IO.shrink)][cc] - = imgdata.rawdata.color_image[(row+S.top_margin)*S.raw_width - +S.left_margin+col][cc]; - } - } - else - for(int row = 0; row < S.height; row++) - memmove(&imgdata.image[row*S.width], - &imgdata.rawdata.color_image[(row+S.top_margin)*S.raw_width+S.left_margin], - S.width*sizeof(*imgdata.image)); - } - else if(decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY) - { - // legacy is always 4channel and not shrinked! - memmove(imgdata.image,imgdata.rawdata.color_image,S.width*S.height*sizeof(*imgdata.image)); - } - - if(imgdata.rawdata.use_ph1_correct) // Phase one unpacked! - phase_one_correct(); - - // hack - clear later flags! - imgdata.progress_flags - = LIBRAW_PROGRESS_START|LIBRAW_PROGRESS_OPEN - |LIBRAW_PROGRESS_IDENTIFY|LIBRAW_PROGRESS_SIZE_ADJUST|LIBRAW_PROGRESS_LOAD_RAW; - return 0; - } - catch ( LibRaw_exceptions err) { - EXCEPTION_HANDLER(err); - } -} - - -int LibRaw::dcraw_document_mode_processing(void) -{ -// CHECK_ORDER_HIGH(LIBRAW_PROGRESS_PRE_INTERPOLATE); - CHECK_ORDER_LOW(LIBRAW_PROGRESS_LOAD_RAW); - - try { - - int no_crop = 1; - - if (~O.cropbox[2] && ~O.cropbox[3]) - no_crop=0; - - raw2image_ex(); // raw2image+crop+rotate_fuji_raw - - if (IO.zero_is_bad) - { - remove_zeroes(); - SET_PROC_FLAG(LIBRAW_PROGRESS_REMOVE_ZEROES); - } - - if(!IO.fuji_width) - subtract_black(); - - O.document_mode = 2; - - if(P1.is_foveon) - { - // filter image data for foveon document mode - short *iptr = (short *)imgdata.image; - for (int i=0; i < S.height*S.width*4; i++) - { - if ((short) iptr[i] < 0) - iptr[i] = 0; - } - SET_PROC_FLAG(LIBRAW_PROGRESS_FOVEON_INTERPOLATE); - } - - O.use_fuji_rotate = 0; - - if(O.bad_pixels && no_crop) - { - bad_pixels(O.bad_pixels); - SET_PROC_FLAG(LIBRAW_PROGRESS_BAD_PIXELS); - } - if (O.dark_frame && no_crop) - { - subtract (O.dark_frame); - SET_PROC_FLAG(LIBRAW_PROGRESS_DARK_FRAME); - } - - - adjust_maximum(); - - if (O.user_sat > 0) - C.maximum = O.user_sat; - - pre_interpolate(); - SET_PROC_FLAG(LIBRAW_PROGRESS_PRE_INTERPOLATE); - - if (libraw_internal_data.internal_output_params.mix_green) - { - int i; - for (P1.colors=3, i=0; i < S.height*S.width; i++) - imgdata.image[i][1] = (imgdata.image[i][1] + imgdata.image[i][3]) >> 1; - } - SET_PROC_FLAG(LIBRAW_PROGRESS_MIX_GREEN); - - if (!P1.is_foveon && P1.colors == 3) - median_filter(); - SET_PROC_FLAG(LIBRAW_PROGRESS_MEDIAN_FILTER); - - if (!P1.is_foveon && O.highlight == 2) - blend_highlights(); - - if (!P1.is_foveon && O.highlight > 2) - recover_highlights(); - SET_PROC_FLAG(LIBRAW_PROGRESS_HIGHLIGHTS); - - if (O.use_fuji_rotate) - fuji_rotate(); - SET_PROC_FLAG(LIBRAW_PROGRESS_FUJI_ROTATE); -#ifndef NO_LCMS - if(O.camera_profile) - { - apply_profile(O.camera_profile,O.output_profile); - SET_PROC_FLAG(LIBRAW_PROGRESS_APPLY_PROFILE); - } -#endif - if(!libraw_internal_data.output_data.histogram) - { - libraw_internal_data.output_data.histogram = (int (*)[LIBRAW_HISTOGRAM_SIZE]) malloc(sizeof(*libraw_internal_data.output_data.histogram)*4); - merror(libraw_internal_data.output_data.histogram,"LibRaw::dcraw_document_mode_processing()"); - } - convert_to_rgb(); - SET_PROC_FLAG(LIBRAW_PROGRESS_CONVERT_RGB); - - if (O.use_fuji_rotate) - stretch(); - SET_PROC_FLAG(LIBRAW_PROGRESS_STRETCH); - - return 0; - } - catch ( LibRaw_exceptions err) { - EXCEPTION_HANDLER(err); - } - -} - -#if 1 - -libraw_processed_image_t * LibRaw::dcraw_make_mem_thumb(int *errcode) -{ - if(!T.thumb) - { - if ( !ID.toffset) - { - if(errcode) *errcode= LIBRAW_NO_THUMBNAIL; - } - else - { - if(errcode) *errcode= LIBRAW_OUT_OF_ORDER_CALL; - } - return NULL; - } - - if (T.tformat == LIBRAW_THUMBNAIL_BITMAP) - { - libraw_processed_image_t * ret = - (libraw_processed_image_t *)::malloc(sizeof(libraw_processed_image_t)+T.tlength); - - if(!ret) - { - if(errcode) *errcode= ENOMEM; - return NULL; - } - - memset(ret,0,sizeof(libraw_processed_image_t)); - ret->type = LIBRAW_IMAGE_BITMAP; - ret->height = T.theight; - ret->width = T.twidth; - ret->colors = 3; - ret->bits = 8; - ret->data_size = T.tlength; - memmove(ret->data,T.thumb,T.tlength); - if(errcode) *errcode= 0; - return ret; - } - else if (T.tformat == LIBRAW_THUMBNAIL_JPEG) - { - ushort exif[5]; - int mk_exif = 0; - if(strcmp(T.thumb+6,"Exif")) mk_exif = 1; - - int dsize = T.tlength + mk_exif * (sizeof(exif)+sizeof(tiff_hdr)); - - libraw_processed_image_t * ret = - (libraw_processed_image_t *)::malloc(sizeof(libraw_processed_image_t)+dsize); - - if(!ret) - { - if(errcode) *errcode= ENOMEM; - return NULL; - } - - memset(ret,0,sizeof(libraw_processed_image_t)); - - ret->type = LIBRAW_IMAGE_JPEG; - ret->data_size = dsize; - - ret->data[0] = 0xff; - ret->data[1] = 0xd8; - if(mk_exif) - { - struct tiff_hdr th; - memcpy (exif, "\xff\xe1 Exif\0\0", 10); - exif[1] = htons (8 + sizeof th); - memmove(ret->data+2,exif,sizeof(exif)); - tiff_head (&th, 0); - memmove(ret->data+(2+sizeof(exif)),&th,sizeof(th)); - memmove(ret->data+(2+sizeof(exif)+sizeof(th)),T.thumb+2,T.tlength-2); - } - else - { - memmove(ret->data+2,T.thumb+2,T.tlength-2); - } - if(errcode) *errcode= 0; - return ret; - - } - else - { - if(errcode) *errcode= LIBRAW_UNSUPPORTED_THUMBNAIL; - return NULL; - - } -} - - - -// jlb -// macros for copying pixels to either BGR or RGB formats -#define FORBGR for(c=P1.colors-1; c >=0 ; c--) -#define FORRGB for(c=0; c < P1.colors ; c++) - -void LibRaw::get_mem_image_format(int* width, int* height, int* colors, int* bps) const - -{ - if (S.flip & 4) { - *width = S.height; - *height = S.width; - } - else { - *width = S.width; - *height = S.height; - } - *colors = P1.colors; - *bps = O.output_bps; -} - -int LibRaw::copy_mem_image(void* scan0, int stride, int bgr) - -{ - // the image memory pointed to by scan0 is assumed to be in the format returned by get_mem_image_format - if((imgdata.progress_flags & LIBRAW_PROGRESS_THUMB_MASK) < LIBRAW_PROGRESS_PRE_INTERPOLATE) - return LIBRAW_OUT_OF_ORDER_CALL; - - if(libraw_internal_data.output_data.histogram) - { - int perc, val, total, t_white=0x2000,c; - perc = S.width * S.height * 0.01; /* 99th percentile white level */ - if (IO.fuji_width) perc /= 2; - if (!((O.highlight & ~2) || O.no_auto_bright)) - for (t_white=c=0; c < P1.colors; c++) { - for (val=0x2000, total=0; --val > 32; ) - if ((total += libraw_internal_data.output_data.histogram[c][val]) > perc) break; - if (t_white < val) t_white = val; - } - gamma_curve (O.gamm[0], O.gamm[1], 2, (t_white << 3)/O.bright); - } - - int s_iheight = S.iheight; - int s_iwidth = S.iwidth; - int s_width = S.width; - int s_hwight = S.height; - - S.iheight = S.height; - S.iwidth = S.width; - - if (S.flip & 4) SWAP(S.height,S.width); - uchar *ppm; - ushort *ppm2; - int c, row, col, soff, rstep, cstep; - - soff = flip_index (0, 0); - cstep = flip_index (0, 1) - soff; - rstep = flip_index (1, 0) - flip_index (0, S.width); - - for (row=0; row < S.height; row++, soff += rstep) - { - uchar *bufp = ((uchar*)scan0)+row*stride; - ppm2 = (ushort*) (ppm = bufp); - // keep trivial decisions in the outer loop for speed - if (bgr) { - if (O.output_bps == 8) { - for (col=0; col < S.width; col++, soff += cstep) - FORBGR *ppm++ = imgdata.color.curve[imgdata.image[soff][c]]>>8; - } - else { - for (col=0; col < S.width; col++, soff += cstep) - FORBGR *ppm2++ = imgdata.color.curve[imgdata.image[soff][c]]; - } - } - else { - if (O.output_bps == 8) { - for (col=0; col < S.width; col++, soff += cstep) - FORRGB *ppm++ = imgdata.color.curve[imgdata.image[soff][c]]>>8; - } - else { - for (col=0; col < S.width; col++, soff += cstep) - FORRGB *ppm2++ = imgdata.color.curve[imgdata.image[soff][c]]; - } - } - -// bufp += stride; // go to the next line - } - - S.iheight = s_iheight; - S.iwidth = s_iwidth; - S.width = s_width; - S.height = s_hwight; - - return 0; - - -} -#undef FORBGR -#undef FORRGB - - - -libraw_processed_image_t *LibRaw::dcraw_make_mem_image(int *errcode) - -{ - int width, height, colors, bps; - get_mem_image_format(&width, &height, &colors, &bps); - int stride = width * (bps/8) * colors; - unsigned ds = height * stride; - libraw_processed_image_t *ret = (libraw_processed_image_t*)::malloc(sizeof(libraw_processed_image_t)+ds); - if(!ret) - { - if(errcode) *errcode= ENOMEM; - return NULL; - } - memset(ret,0,sizeof(libraw_processed_image_t)); - - // metadata init - ret->type = LIBRAW_IMAGE_BITMAP; - ret->height = height; - ret->width = width; - ret->colors = colors; - ret->bits = bps; - ret->data_size = ds; - copy_mem_image(ret->data, stride, 0); - - return ret; -} - -#undef FORC -#undef FORCC -#undef SWAP -#endif - - -int LibRaw::dcraw_ppm_tiff_writer(const char *filename) -{ - CHECK_ORDER_LOW(LIBRAW_PROGRESS_LOAD_RAW); - - if(!imgdata.image) - return LIBRAW_OUT_OF_ORDER_CALL; - - if(!filename) - return ENOENT; - FILE *f = fopen(filename,"wb"); - - if(!f) - return errno; - - try { - if(!libraw_internal_data.output_data.histogram) - { - libraw_internal_data.output_data.histogram = - (int (*)[LIBRAW_HISTOGRAM_SIZE]) malloc(sizeof(*libraw_internal_data.output_data.histogram)*4); - merror(libraw_internal_data.output_data.histogram,"LibRaw::dcraw_ppm_tiff_writer()"); - } - libraw_internal_data.internal_data.output = f; - write_ppm_tiff(); - SET_PROC_FLAG(LIBRAW_PROGRESS_FLIP); - libraw_internal_data.internal_data.output = NULL; - fclose(f); - return 0; - } - catch ( LibRaw_exceptions err) { - fclose(f); - EXCEPTION_HANDLER(err); - } -} - -void LibRaw::kodak_thumb_loader() -{ - // some kodak cameras - ushort s_height = S.height, s_width = S.width,s_iwidth = S.iwidth,s_iheight=S.iheight; - int s_colors = P1.colors; - unsigned s_filters = P1.filters; - ushort (*s_image)[4] = imgdata.image; - - - S.height = T.theight; - S.width = T.twidth; - P1.filters = 0; - - if (thumb_load_raw == &CLASS kodak_ycbcr_load_thumb) - { - S.height += S.height & 1; - S.width += S.width & 1; - } - - imgdata.image = (ushort (*)[4]) calloc (S.iheight*S.iwidth, sizeof (*imgdata.image)); - merror (imgdata.image, "LibRaw::kodak_thumb_loader()"); - - ID.input->seek(ID.toffset, SEEK_SET); - // read kodak thumbnail into T.image[] - (this->*thumb_load_raw)(); - - // copy-n-paste from image pipe -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#define LIM(x,min,max) MAX(min,MIN(x,max)) -#define CLIP(x) LIM(x,0,65535) -#define SWAP(a,b) { a ^= b; a ^= (b ^= a); } - - // from scale_colors - { - double dmax; - float scale_mul[4]; - int c,val; - for (dmax=DBL_MAX, c=0; c < 3; c++) - if (dmax > C.pre_mul[c]) - dmax = C.pre_mul[c]; - - for( c=0; c< 3; c++) - scale_mul[c] = (C.pre_mul[c] / dmax) * 65535.0 / C.maximum; - scale_mul[3] = scale_mul[1]; - - size_t size = S.height * S.width; - for (unsigned i=0; i < size*4 ; i++) - { - val = imgdata.image[0][i]; - if(!val) continue; - val *= scale_mul[i & 3]; - imgdata.image[0][i] = CLIP(val); - } - } - - // from convert_to_rgb - ushort *img; - int row,col; - - int (*t_hist)[LIBRAW_HISTOGRAM_SIZE] = (int (*)[LIBRAW_HISTOGRAM_SIZE]) calloc(sizeof(*t_hist),4); - merror (t_hist, "LibRaw::kodak_thumb_loader()"); - - float out[3], - out_cam[3][4] = - { - {2.81761312, -1.98369181, 0.166078627, 0}, - {-0.111855984, 1.73688626, -0.625030339, 0}, - {-0.0379119813, -0.891268849, 1.92918086, 0} - }; - - for (img=imgdata.image[0], row=0; row < S.height; row++) - for (col=0; col < S.width; col++, img+=4) - { - out[0] = out[1] = out[2] = 0; - int c; - for(c=0;c<3;c++) - { - out[0] += out_cam[0][c] * img[c]; - out[1] += out_cam[1][c] * img[c]; - out[2] += out_cam[2][c] * img[c]; - } - for(c=0; c<3; c++) - img[c] = CLIP((int) out[c]); - for(c=0; c> 3]++; - - } - - // from gamma_lut - int (*save_hist)[LIBRAW_HISTOGRAM_SIZE] = libraw_internal_data.output_data.histogram; - libraw_internal_data.output_data.histogram = t_hist; - - // make curve output curve! - ushort (*t_curve) = (ushort*) calloc(sizeof(C.curve),1); - merror (t_curve, "LibRaw::kodak_thumb_loader()"); - memmove(t_curve,C.curve,sizeof(C.curve)); - memset(C.curve,0,sizeof(C.curve)); - { - int perc, val, total, t_white=0x2000,c; - - perc = S.width * S.height * 0.01; /* 99th percentile white level */ - if (IO.fuji_width) perc /= 2; - if (!((O.highlight & ~2) || O.no_auto_bright)) - for (t_white=c=0; c < P1.colors; c++) { - for (val=0x2000, total=0; --val > 32; ) - if ((total += libraw_internal_data.output_data.histogram[c][val]) > perc) break; - if (t_white < val) t_white = val; - } - gamma_curve (O.gamm[0], O.gamm[1], 2, (t_white << 3)/O.bright); - } - - libraw_internal_data.output_data.histogram = save_hist; - free(t_hist); - - // from write_ppm_tiff - copy pixels into bitmap - - S.iheight = S.height; - S.iwidth = S.width; - if (S.flip & 4) SWAP(S.height,S.width); - - if(T.thumb) free(T.thumb); - T.thumb = (char*) calloc (S.width * S.height, P1.colors); - merror (T.thumb, "LibRaw::kodak_thumb_loader()"); - T.tlength = S.width * S.height * P1.colors; - - // from write_tiff_ppm - { - int soff = flip_index (0, 0); - int cstep = flip_index (0, 1) - soff; - int rstep = flip_index (1, 0) - flip_index (0, S.width); - - for (int row=0; row < S.height; row++, soff += rstep) - { - char *ppm = T.thumb + row*S.width*P1.colors; - for (int col=0; col < S.width; col++, soff += cstep) - for(int c = 0; c < P1.colors; c++) - ppm [col*P1.colors+c] = imgdata.color.curve[imgdata.image[soff][c]]>>8; - } - } - - memmove(C.curve,t_curve,sizeof(C.curve)); - free(t_curve); - - // restore variables - free(imgdata.image); - imgdata.image = s_image; - - T.twidth = S.width; - S.width = s_width; - - S.iwidth = s_iwidth; - S.iheight = s_iheight; - - T.theight = S.height; - S.height = s_height; - - T.tcolors = P1.colors; - P1.colors = s_colors; - - P1.filters = s_filters; -} -#undef MIN -#undef MAX -#undef LIM -#undef CLIP -#undef SWAP - - - - -// Äîñòàåò thumbnail èç ôàéëà, ñòàâèò thumb_format â ñîîòâåòñòâèè ñ ôîðìàòîì -int LibRaw::unpack_thumb(void) -{ - CHECK_ORDER_LOW(LIBRAW_PROGRESS_IDENTIFY); - CHECK_ORDER_BIT(LIBRAW_PROGRESS_THUMB_LOAD); - - try { - if ( !ID.toffset) - { - return LIBRAW_NO_THUMBNAIL; - } - else if (thumb_load_raw) - { - kodak_thumb_loader(); - T.tformat = LIBRAW_THUMBNAIL_BITMAP; - SET_PROC_FLAG(LIBRAW_PROGRESS_THUMB_LOAD); - return 0; - } - else - { - ID.input->seek(ID.toffset, SEEK_SET); - if ( write_thumb == &LibRaw::jpeg_thumb) - { - if(T.thumb) free(T.thumb); - T.thumb = (char *) malloc (T.tlength); - merror (T.thumb, "jpeg_thumb()"); - ID.input->read (T.thumb, 1, T.tlength); - T.tcolors = 3; - T.tformat = LIBRAW_THUMBNAIL_JPEG; - SET_PROC_FLAG(LIBRAW_PROGRESS_THUMB_LOAD); - return 0; - } - else if (write_thumb == &LibRaw::ppm_thumb) - { - T.tlength = T.twidth * T.theight*3; - if(T.thumb) free(T.thumb); - - T.thumb = (char *) malloc (T.tlength); - merror (T.thumb, "ppm_thumb()"); - - ID.input->read(T.thumb, 1, T.tlength); - - T.tformat = LIBRAW_THUMBNAIL_BITMAP; - SET_PROC_FLAG(LIBRAW_PROGRESS_THUMB_LOAD); - return 0; - - } - else if (write_thumb == &LibRaw::foveon_thumb) - { - foveon_thumb_loader(); - // may return with error, so format is set in - // foveon thumb loader itself - SET_PROC_FLAG(LIBRAW_PROGRESS_THUMB_LOAD); - return 0; - } - // else if -- all other write_thumb cases! - else - { - return LIBRAW_UNSUPPORTED_THUMBNAIL; - } - } - // last resort - return LIBRAW_UNSUPPORTED_THUMBNAIL; - } - catch ( LibRaw_exceptions err) { - EXCEPTION_HANDLER(err); - } - -} - -int LibRaw::dcraw_thumb_writer(const char *fname) -{ -// CHECK_ORDER_LOW(LIBRAW_PROGRESS_THUMB_LOAD); - - if(!fname) - return ENOENT; - - FILE *tfp = fopen(fname,"wb"); - - if(!tfp) - return errno; - - if(!T.thumb) - { - fclose(tfp); - return LIBRAW_OUT_OF_ORDER_CALL; - } - - try { - switch (T.tformat) - { - case LIBRAW_THUMBNAIL_JPEG: - jpeg_thumb_writer (tfp,T.thumb,T.tlength); - break; - case LIBRAW_THUMBNAIL_BITMAP: - fprintf (tfp, "P6\n%d %d\n255\n", T.twidth, T.theight); - fwrite (T.thumb, 1, T.tlength, tfp); - break; - default: - fclose(tfp); - return LIBRAW_UNSUPPORTED_THUMBNAIL; - } - fclose(tfp); - return 0; - } - catch ( LibRaw_exceptions err) { - fclose(tfp); - EXCEPTION_HANDLER(err); - } -} - -int LibRaw::adjust_sizes_info_only(void) -{ - CHECK_ORDER_LOW(LIBRAW_PROGRESS_IDENTIFY); - - raw2image_start(); - if (O.use_fuji_rotate) - { - if (IO.fuji_width) - { - // restore saved values - if(IO.fheight) - { - S.height = IO.fheight; - S.width = IO.fwidth; - S.iheight = (S.height + IO.shrink) >> IO.shrink; - S.iwidth = (S.width + IO.shrink) >> IO.shrink; - S.raw_height -= 2*S.top_margin; - IO.fheight = IO.fwidth = 0; // prevent repeated calls - } - // dcraw code - IO.fuji_width = (IO.fuji_width - 1 + IO.shrink) >> IO.shrink; - S.iwidth = (ushort)(IO.fuji_width / sqrt(0.5)); - S.iheight = (ushort)( (S.iheight - IO.fuji_width) / sqrt(0.5)); - } - else - { - if (S.pixel_aspect < 1) S.iheight = (ushort)( S.iheight / S.pixel_aspect + 0.5); - if (S.pixel_aspect > 1) S.iwidth = (ushort) (S.iwidth * S.pixel_aspect + 0.5); - } - } - SET_PROC_FLAG(LIBRAW_PROGRESS_FUJI_ROTATE); - if ( S.flip & 4) - { - unsigned short t = S.iheight; - S.iheight=S.iwidth; - S.iwidth = t; - SET_PROC_FLAG(LIBRAW_PROGRESS_FLIP); - } - return 0; -} - - -void LibRaw::subtract_black() -{ - -#define BAYERC(row,col,c) imgdata.image[((row) >> IO.shrink)*S.iwidth + ((col) >> IO.shrink)][c] - - if(C.ph1_black) - { - // Phase One compressed format - int row,col,val,cc; - for(row=0;row=C.phase_one_data.split_col]; - if(val<0) val = 0; - BAYERC(row,col,cc) = val; - } - C.maximum -= C.black; - phase_one_correct(); - // recalculate channel maximum - ZERO(C.channel_maximum); - for(row=0;row val) C.channel_maximum[cc] = val; - } - // clear P1 black level data - imgdata.color.phase_one_data.t_black = 0; - C.ph1_black = 0; - ZERO(C.cblack); - C.black = 0; - } - else if((C.black || C.cblack[0] || C.cblack[1] || C.cblack[2] || C.cblack[3])) - { - int cblk[4],i,row,col,val,cc; - for(i=0;i<4;i++) - cblk[i] = C.cblack[i]+C.black; - ZERO(C.channel_maximum); - - for(row=0;row cblk[cc]) - val -= cblk[cc]; - else - val = 0; - if(C.channel_maximum[cc] < val) C.channel_maximum[cc] = val; - BAYERC(row,col,cc) = val; - } - C.maximum -= C.black; - ZERO(C.cblack); - C.black = 0; - } - else - { - // only calculate channel maximum; - int row,col,cc,val; - ZERO(C.channel_maximum); - for(row=0;row8) shift = 8; - if(shift<0.25) shift = 0.25; - if(smooth < 0.0) smooth = 0.0; - if(smooth > 1.0) smooth = 1.0; - - unsigned short *lut = (ushort*)malloc((TBLN+1)*sizeof(unsigned short)); - - if(shift <=1.0) - { - for(int i=0;i<=TBLN;i++) - lut[i] = (unsigned short)((float)i*shift); - } - else - { - float x1,x2,y1,y2; - - float cstops = log(shift)/log(2.0f); - float room = cstops*2; - float roomlin = powf(2.0f,room); - x2 = (float)TBLN; - x1 = (x2+1)/roomlin-1; - y1 = x1*shift; - y2 = x2*(1+(1-smooth)*(shift-1)); - float sq3x=powf(x1*x1*x2,1.0f/3.0f); - float B = (y2-y1+shift*(3*x1-3.0f*sq3x)) / (x2+2.0f*x1-3.0f*sq3x); - float A = (shift - B)*3.0f*powf(x1*x1,1.0f/3.0f); - float CC = y2 - A*powf(x2,1.0f/3.0f)-B*x2; - for(int i=0;i<=TBLN;i++) - { - float X = (float)i; - float Y = A*powf(X,1.0f/3.0f)+B*X+CC; - if(iTBLN?TBLN:(unsigned short)(Y)); - } - } - for(int i=0; i< S.height*S.width; i++) - { - imgdata.image[i][0] = lut[imgdata.image[i][0]]; - imgdata.image[i][1] = lut[imgdata.image[i][1]]; - imgdata.image[i][2] = lut[imgdata.image[i][2]]; - imgdata.image[i][3] = lut[imgdata.image[i][3]]; - } - for(int i=0;i<4;i++) - C.channel_maximum[i] = lut[C.channel_maximum[i]]; - C.maximum = lut[C.maximum]; - // no need to adjust the minumum, black is already subtracted - free(lut); -} -int LibRaw::dcraw_process(void) -{ - int quality,i; - - int iterations=-1, dcb_enhance=1, noiserd=0; - int eeci_refine_fl=0, es_med_passes_fl=0; - float cared=0,cablue=0; - float linenoise=0; - float lclean=0,cclean=0; - float thresh=0; - float preser=0; - float expos=1.0; - - - CHECK_ORDER_LOW(LIBRAW_PROGRESS_LOAD_RAW); -// CHECK_ORDER_HIGH(LIBRAW_PROGRESS_PRE_INTERPOLATE); - - try { - - int no_crop = 1; - - if (~O.cropbox[2] && ~O.cropbox[3]) - no_crop=0; - - raw2image_ex(); // raw2image+crop+rotate_fuji_raw + subtract_black for fuji - - int save_4color = O.four_color_rgb; - - if (IO.zero_is_bad) - { - remove_zeroes(); - SET_PROC_FLAG(LIBRAW_PROGRESS_REMOVE_ZEROES); - } - - if(!IO.fuji_width) // PhaseOne only, all other cases handled at raw2image_ex() - subtract_black(); - - if(O.half_size) - O.four_color_rgb = 1; - - if(O.bad_pixels && no_crop) - { - bad_pixels(O.bad_pixels); - SET_PROC_FLAG(LIBRAW_PROGRESS_BAD_PIXELS); - } - - if (O.dark_frame && no_crop) - { - subtract (O.dark_frame); - SET_PROC_FLAG(LIBRAW_PROGRESS_DARK_FRAME); - } - - - quality = 2 + !IO.fuji_width; - - if (O.user_qual >= 0) quality = O.user_qual; - - adjust_maximum(); - - if (O.user_sat > 0) C.maximum = O.user_sat; - - if (P1.is_foveon && !O.document_mode) - { - foveon_interpolate(); - SET_PROC_FLAG(LIBRAW_PROGRESS_FOVEON_INTERPOLATE); - } - - if (O.green_matching && !O.half_size) - { - green_matching(); - } - - if (!P1.is_foveon && O.document_mode < 2) - { - scale_colors(); - SET_PROC_FLAG(LIBRAW_PROGRESS_SCALE_COLORS); - } - - pre_interpolate(); - - SET_PROC_FLAG(LIBRAW_PROGRESS_PRE_INTERPOLATE); - - if (O.dcb_iterations >= 0) iterations = O.dcb_iterations; - if (O.dcb_enhance_fl >=0 ) dcb_enhance = O.dcb_enhance_fl; - if (O.fbdd_noiserd >=0 ) noiserd = O.fbdd_noiserd; - if (O.eeci_refine >=0 ) eeci_refine_fl = O.eeci_refine; - if (O.es_med_passes >0 ) es_med_passes_fl = O.es_med_passes; - -// LIBRAW_DEMOSAIC_PACK_GPL3 - - if (!O.half_size && O.cfa_green >0) {thresh=O.green_thresh ;green_equilibrate(thresh);} - if (O.exp_correc >0) {expos=O.exp_shift ; preser=O.exp_preser; exp_bef(expos,preser);} - if (O.ca_correc >0 ) {cablue=O.cablue; cared=O.cared; CA_correct_RT(cablue, cared);} - if (O.cfaline >0 ) {linenoise=O.linenoise; cfa_linedn(linenoise);} - if (O.cfa_clean >0 ) {lclean=O.lclean; cclean=O.cclean; cfa_impulse_gauss(lclean,cclean);} - - if (P1.filters && !O.document_mode) - { - if (noiserd>0 && P1.colors==3 && P1.filters) fbdd(noiserd); - - if (quality == 0) - lin_interpolate(); - else if (quality == 1 || P1.colors > 3) - vng_interpolate(); - else if (quality == 2) - ppg_interpolate(); - - else if (quality == 3) - ahd_interpolate(); // really don't need it here due to fallback op - - else if (quality == 4) - dcb(iterations, dcb_enhance); - -// LIBRAW_DEMOSAIC_PACK_GPL2 - else if (quality == 5) - ahd_interpolate_mod(); - else if (quality == 6) - afd_interpolate_pl(2,1); - else if (quality == 7) - vcd_interpolate(0); - else if (quality == 8) - vcd_interpolate(12); - else if (quality == 9) - lmmse_interpolate(1); - -// LIBRAW_DEMOSAIC_PACK_GPL3 - else if (quality == 10) - amaze_demosaic_RT(); - // fallback to AHD - else - ahd_interpolate(); - - SET_PROC_FLAG(LIBRAW_PROGRESS_INTERPOLATE); - } - if (IO.mix_green) - { - for (P1.colors=3, i=0; i < S.height * S.width; i++) - imgdata.image[i][1] = (imgdata.image[i][1] + imgdata.image[i][3]) >> 1; - SET_PROC_FLAG(LIBRAW_PROGRESS_MIX_GREEN); - } - - if(!P1.is_foveon) - { - if (P1.colors == 3) - { - - if (quality == 8) - { - if (eeci_refine_fl == 1) refinement(); - if (O.med_passes > 0) median_filter_new(); - if (es_med_passes_fl > 0) es_median_filter(); - } - else { - median_filter(); - } - SET_PROC_FLAG(LIBRAW_PROGRESS_MEDIAN_FILTER); - } - } - - if (O.highlight == 2) - { - blend_highlights(); - SET_PROC_FLAG(LIBRAW_PROGRESS_HIGHLIGHTS); - } - - if (O.highlight > 2) - { - recover_highlights(); - SET_PROC_FLAG(LIBRAW_PROGRESS_HIGHLIGHTS); - } - - if (O.use_fuji_rotate) - { - fuji_rotate(); - SET_PROC_FLAG(LIBRAW_PROGRESS_FUJI_ROTATE); - } - - if(!libraw_internal_data.output_data.histogram) - { - libraw_internal_data.output_data.histogram = (int (*)[LIBRAW_HISTOGRAM_SIZE]) malloc(sizeof(*libraw_internal_data.output_data.histogram)*4); - merror(libraw_internal_data.output_data.histogram,"LibRaw::dcraw_process()"); - } -#ifndef NO_LCMS - if(O.camera_profile) - { - apply_profile(O.camera_profile,O.output_profile); - SET_PROC_FLAG(LIBRAW_PROGRESS_APPLY_PROFILE); - } -#endif - - convert_to_rgb(); - SET_PROC_FLAG(LIBRAW_PROGRESS_CONVERT_RGB); - - if (O.use_fuji_rotate) - { - stretch(); - SET_PROC_FLAG(LIBRAW_PROGRESS_STRETCH); - } - O.four_color_rgb = save_4color; // also, restore - - return 0; - } - catch ( LibRaw_exceptions err) { - EXCEPTION_HANDLER(err); - } -} - -// Supported cameras: -static const char *static_camera_list[] = -{ -"Adobe Digital Negative (DNG)", -"AgfaPhoto DC-833m", -"Apple QuickTake 100", -"Apple QuickTake 150", -"Apple QuickTake 200", -"ARRIRAW format", -"AVT F-080C", -"AVT F-145C", -"AVT F-201C", -"AVT F-510C", -"AVT F-810C", -"Canon PowerShot 600", -"Canon PowerShot A5", -"Canon PowerShot A5 Zoom", -"Canon PowerShot A50", -"Canon PowerShot A460 (CHDK hack)", -"Canon PowerShot A470 (CHDK hack)", -"Canon PowerShot A530 (CHDK hack)", -"Canon PowerShot A570 (CHDK hack)", -"Canon PowerShot A590 (CHDK hack)", -"Canon PowerShot A610 (CHDK hack)", -"Canon PowerShot A620 (CHDK hack)", -"Canon PowerShot A630 (CHDK hack)", -"Canon PowerShot A640 (CHDK hack)", -"Canon PowerShot A650 (CHDK hack)", -"Canon PowerShot A710 IS (CHDK hack)", -"Canon PowerShot A720 IS (CHDK hack)", -"Canon PowerShot Pro70", -"Canon PowerShot Pro90 IS", -"Canon PowerShot Pro1", -"Canon PowerShot G1", -"Canon PowerShot G1 X", -"Canon PowerShot G2", -"Canon PowerShot G3", -"Canon PowerShot G5", -"Canon PowerShot G6", -"Canon PowerShot G7 (CHDK hack)", -"Canon PowerShot G9", -"Canon PowerShot G10", -"Canon PowerShot G11", -"Canon PowerShot G12", -"Canon PowerShot S2 IS (CHDK hack)", -"Canon PowerShot S3 IS (CHDK hack)", -"Canon PowerShot S5 IS (CHDK hack)", -"Canon PowerShot SD300 (CHDK hack)", -"Canon PowerShot S30", -"Canon PowerShot S40", -"Canon PowerShot S45", -"Canon PowerShot S50", -"Canon PowerShot S60", -"Canon PowerShot S70", -"Canon PowerShot S90", -"Canon PowerShot S95", -"Canon PowerShot S100", -"Canon PowerShot SX1 IS", -"Canon PowerShot SX110 IS (CHDK hack)", -"Canon PowerShot SX120 IS (CHDK hack)", -"Canon PowerShot SX20 IS (CHDK hack)", -"Canon PowerShot SX220 HS (CHDK hack)", -"Canon PowerShot SX30 IS (CHDK hack)", -"Canon EOS D30", -"Canon EOS D60", -"Canon EOS 5D", -"Canon EOS 5D Mark II", -"Canon EOS 5D Mark III", -"Canon EOS 7D", -"Canon EOS 10D", -"Canon EOS 20D", -"Canon EOS 30D", -"Canon EOS 40D", -"Canon EOS 50D", -"Canon EOS 60D", -"Canon EOS 300D / Digital Rebel / Kiss Digital", -"Canon EOS 350D / Digital Rebel XT / Kiss Digital N", -"Canon EOS 400D / Digital Rebel XTi / Kiss Digital X", -"Canon EOS 450D / Digital Rebel XSi / Kiss Digital X2", -"Canon EOS 500D / Digital Rebel T1i / Kiss Digital X3", -"Canon EOS 550D / Digital Rebel T2i / Kiss Digital X4", -"Canon EOS 600D / Digital Rebel T3i / Kiss Digital X5", -"Canon EOS 1000D / Digital Rebel XS / Kiss Digital F", -"Canon EOS 1100D / Digital Rebel T3 / Kiss Digital X50", -"Canon EOS D2000C", -"Canon EOS-1D", -"Canon EOS-1DS", -"Canon EOS-1D X", -"Canon EOS-1D Mark II", -"Canon EOS-1D Mark II N", -"Canon EOS-1D Mark III", -"Canon EOS-1D Mark IV", -"Canon EOS-1Ds Mark II", -"Canon EOS-1Ds Mark III", -"Casio QV-2000UX", -"Casio QV-3000EX", -"Casio QV-3500EX", -"Casio QV-4000", -"Casio QV-5700", -"Casio QV-R41", -"Casio QV-R51", -"Casio QV-R61", -"Casio EX-S20", -"Casio EX-S100", -"Casio EX-Z4", -"Casio EX-Z50", -"Casio EX-Z500", -"Casio EX-Z55", -"Casio EX-Z60", -"Casio EX-Z75", -"Casio EX-Z750", -"Casio EX-Z8", -"Casio EX-Z850", -"Casio EX-Z1050", -"Casio EX-Z1080", -"Casio Exlim Pro 505", -"Casio Exlim Pro 600", -"Casio Exlim Pro 700", -"Contax N Digital", -"Creative PC-CAM 600", -"Epson R-D1", -"Foculus 531C", -"Fuji FinePix E550", -"Fuji FinePix E900", -"Fuji FinePix F700", -"Fuji FinePix F710", -"Fuji FinePix F800", -"Fuji FinePix F810", -"Fuji FinePix S2Pro", -"Fuji FinePix S3Pro", -"Fuji FinePix S5Pro", -"Fuji FinePix S20Pro", -"Fuji FinePix S100FS", -"Fuji FinePix S5000", -"Fuji FinePix S5100/S5500", -"Fuji FinePix S5200/S5600", -"Fuji FinePix S6000fd", -"Fuji FinePix S7000", -"Fuji FinePix S9000/S9500", -"Fuji FinePix S9100/S9600", -"Fuji FinePix S200EXR", -"Fuji FinePix HS10/HS11", -"Fuji FinePix HS20EXR", -"Fuji FinePix HS30EXR", -"Fuji FinePix F550EXR", -"Fuji FinePix F600EXR", -"Fuji FinePix X-S1", -"Fuji FinePix X100", -"Fuji FinePix X10", -"Fuji IS-1", -"Hasselblad CFV", -"Hasselblad H3D", -"Hasselblad H4D", -"Hasselblad V96C", -"Imacon Ixpress 16-megapixel", -"Imacon Ixpress 22-megapixel", -"Imacon Ixpress 39-megapixel", -"ISG 2020x1520", -"Kodak DC20", -"Kodak DC25", -"Kodak DC40", -"Kodak DC50", -"Kodak DC120 (also try kdc2tiff)", -"Kodak DCS200", -"Kodak DCS315C", -"Kodak DCS330C", -"Kodak DCS420", -"Kodak DCS460", -"Kodak DCS460A", -"Kodak DCS520C", -"Kodak DCS560C", -"Kodak DCS620C", -"Kodak DCS620X", -"Kodak DCS660C", -"Kodak DCS660M", -"Kodak DCS720X", -"Kodak DCS760C", -"Kodak DCS760M", -"Kodak EOSDCS1", -"Kodak EOSDCS3B", -"Kodak NC2000F", -"Kodak ProBack", -"Kodak PB645C", -"Kodak PB645H", -"Kodak PB645M", -"Kodak DCS Pro 14n", -"Kodak DCS Pro 14nx", -"Kodak DCS Pro SLR/c", -"Kodak DCS Pro SLR/n", -"Kodak C330", -"Kodak C603", -"Kodak P850", -"Kodak P880", -"Kodak Z980", -"Kodak Z981", -"Kodak Z990", -"Kodak Z1015", -"Kodak KAI-0340", -"Konica KD-400Z", -"Konica KD-510Z", -"Leaf AFi 7", -"Leaf AFi-II 5", -"Leaf AFi-II 6", -"Leaf AFi-II 7", -"Leaf AFi-II 8", -"Leaf AFi-II 10", -"Leaf AFi-II 10R", -"Leaf AFi-II 12", -"Leaf AFi-II 12R", -"Leaf Aptus 17", -"Leaf Aptus 22", -"Leaf Aptus 54S", -"Leaf Aptus 65", -"Leaf Aptus 75", -"Leaf Aptus 75S", -"Leaf Cantare", -"Leaf CatchLight", -"Leaf CMost", -"Leaf DCB2", -"Leaf Valeo 6", -"Leaf Valeo 11", -"Leaf Valeo 17", -"Leaf Valeo 22", -"Leaf Volare", -"Leica Digilux 2", -"Leica Digilux 3", -"Leica D-LUX2", -"Leica D-LUX3", -"Leica D-LUX4", -"Leica D-LUX5", -"Leica V-LUX1", -"Leica V-LUX2", -"Logitech Fotoman Pixtura", -"Mamiya ZD", -"Micron 2010", -"Minolta RD175", -"Minolta DiMAGE 5", -"Minolta DiMAGE 7", -"Minolta DiMAGE 7i", -"Minolta DiMAGE 7Hi", -"Minolta DiMAGE A1", -"Minolta DiMAGE A2", -"Minolta DiMAGE A200", -"Minolta DiMAGE G400", -"Minolta DiMAGE G500", -"Minolta DiMAGE G530", -"Minolta DiMAGE G600", -"Minolta DiMAGE Z2", -"Minolta Alpha/Dynax/Maxxum 5D", -"Minolta Alpha/Dynax/Maxxum 7D", -"Motorola PIXL", -"Nikon D1", -"Nikon D1H", -"Nikon D1X", -"Nikon D2H", -"Nikon D2Hs", -"Nikon D2X", -"Nikon D2Xs", -"Nikon D3", -"Nikon D3s", -"Nikon D3X", -"Nikon D4", -"Nikon D40", -"Nikon D40X", -"Nikon D50", -"Nikon D60", -"Nikon D70", -"Nikon D70s", -"Nikon D80", -"Nikon D90", -"Nikon D100", -"Nikon D200", -"Nikon D300", -"Nikon D300s", -"Nikon D700", -"Nikon D3000", -"Nikon D3100", -"Nikon D3200", -"Nikon D5000", -"Nikon D5100", -"Nikon D7000", -"Nikon D800", -"Nikon 1 J1", -"Nikon 1 V1", -"Nikon E700 (\"DIAG RAW\" hack)", -"Nikon E800 (\"DIAG RAW\" hack)", -"Nikon E880 (\"DIAG RAW\" hack)", -"Nikon E900 (\"DIAG RAW\" hack)", -"Nikon E950 (\"DIAG RAW\" hack)", -"Nikon E990 (\"DIAG RAW\" hack)", -"Nikon E995 (\"DIAG RAW\" hack)", -"Nikon E2100 (\"DIAG RAW\" hack)", -"Nikon E2500 (\"DIAG RAW\" hack)", -"Nikon E3200 (\"DIAG RAW\" hack)", -"Nikon E3700 (\"DIAG RAW\" hack)", -"Nikon E4300 (\"DIAG RAW\" hack)", -"Nikon E4500 (\"DIAG RAW\" hack)", -"Nikon E5000", -"Nikon E5400", -"Nikon E5700", -"Nikon E8400", -"Nikon E8700", -"Nikon E8800", -"Nikon Coolpix P6000", -"Nikon Coolpix P7000", -"Nikon Coolpix P7100", -"Nikon Coolpix S6 (\"DIAG RAW\" hack)", -"Nokia N95", -"Nokia X2", -"Olympus C3030Z", -"Olympus C5050Z", -"Olympus C5060WZ", -"Olympus C7070WZ", -"Olympus C70Z,C7000Z", -"Olympus C740UZ", -"Olympus C770UZ", -"Olympus C8080WZ", -"Olympus X200,D560Z,C350Z", -"Olympus E-1", -"Olympus E-3", -"Olympus E-5", -"Olympus E-10", -"Olympus E-20", -"Olympus E-30", -"Olympus E-300", -"Olympus E-330", -"Olympus E-400", -"Olympus E-410", -"Olympus E-420", -"Olympus E-500", -"Olympus E-510", -"Olympus E-520", -"Olympus E-620", -"Olympus E-P1", -"Olympus E-P2", -"Olympus E-P3", -"Olympus E-PL1", -"Olympus E-PL1s", -"Olympus E-PL2", -"Olympus E-PL3", -"Olympus E-PM1", -"Olympus E-M5", -"Olympus SP310", -"Olympus SP320", -"Olympus SP350", -"Olympus SP500UZ", -"Olympus SP510UZ", -"Olympus SP550UZ", -"Olympus SP560UZ", -"Olympus SP570UZ", -"Olympus XZ-1", -"Panasonic DMC-FZ8", -"Panasonic DMC-FZ18", -"Panasonic DMC-FZ28", -"Panasonic DMC-FZ30", -"Panasonic DMC-FZ35/FZ38", -"Panasonic DMC-FZ40", -"Panasonic DMC-FZ50", -"Panasonic DMC-FZ100", -"Panasonic DMC-FZ150", -"Panasonic DMC-FX150", -"Panasonic DMC-G1", -"Panasonic DMC-G10", -"Panasonic DMC-G2", -"Panasonic DMC-G3", -"Panasonic DMC-GF1", -"Panasonic DMC-GF2", -"Panasonic DMC-GF3", -"Panasonic DMC-GF5", -"Panasonic DMC-GH1", -"Panasonic DMC-GH2", -"Panasonic DMC-GX1", -"Panasonic DMC-L1", -"Panasonic DMC-L10", -"Panasonic DMC-LC1", -"Panasonic DMC-LX1", -"Panasonic DMC-LX2", -"Panasonic DMC-LX3", -"Panasonic DMC-LX5", -"Pentax *ist D", -"Pentax *ist DL", -"Pentax *ist DL2", -"Pentax *ist DS", -"Pentax *ist DS2", -"Pentax K10D", -"Pentax K20D", -"Pentax K100D", -"Pentax K100D Super", -"Pentax K200D", -"Pentax K2000/K-m", -"Pentax K-x", -"Pentax K-r", -"Pentax K-5", -"Pentax K-7", -"Pentax Optio S", -"Pentax Optio S4", -"Pentax Optio 33WR", -"Pentax Optio 750Z", -"Pentax 645D", -"Phase One LightPhase", -"Phase One H 10", -"Phase One H 20", -"Phase One H 25", -"Phase One P 20", -"Phase One P 25", -"Phase One P 30", -"Phase One P 45", -"Phase One P 45+", -"Phase One P 65", -"Pixelink A782", -#ifdef LIBRAW_DEMOSAIC_PACK_GPL2 -"Polaroid x530", -#endif -#ifndef NO_JASPER -"Redcode R3D format", -#endif -"Rollei d530flex", -"RoverShot 3320af", -"Samsung EX1", -"Samsung GX-1S", -"Samsung GX10", -"Samsung GX20", -"Samsung NX10", -"Samsung NX11", -"Samsung NX100", -"Samsung NX20", -"Samsung NX200", -"Samsung NX210", -"Samsung WB550", -"Samsung WB2000", -"Samsung S85 (hacked)", -"Samsung S850 (hacked)", -"Sarnoff 4096x5440", -#ifdef LIBRAW_DEMOSAIC_PACK_GPL2 -"Sigma SD9", -"Sigma SD10", -"Sigma SD14", -#endif -"Sinar 3072x2048", -"Sinar 4080x4080", -"Sinar 4080x5440", -"Sinar STI format", -"SMaL Ultra-Pocket 3", -"SMaL Ultra-Pocket 4", -"SMaL Ultra-Pocket 5", -"Sony DSC-F828", -"Sony DSC-R1", -"Sony DSC-V3", -"Sony DSLR-A100", -"Sony DSLR-A200", -"Sony DSLR-A230", -"Sony DSLR-A290", -"Sony DSLR-A300", -"Sony DSLR-A330", -"Sony DSLR-A350", -"Sony DSLR-A380", -"Sony DSLR-A390", -"Sony DSLR-A450", -"Sony DSLR-A500", -"Sony DSLR-A550", -"Sony DSLR-A580", -"Sony DSLR-A700", -"Sony DSLR-A850", -"Sony DSLR-A900", -"Sony NEX-3", -"Sony NEX-5", -"Sony NEX-5N", -"Sony NEX-7", -"Sony NEX-C3", -"Sony NEX-F3", -"Sony SLT-A33", -"Sony SLT-A35", -"Sony SLT-A37", -"Sony SLT-A55V", -"Sony SLT-A57", -"Sony SLT-A65V", -"Sony SLT-A77V", -"Sony XCD-SX910CR", -"STV680 VGA", - NULL -}; - -const char** LibRaw::cameraList() { return static_camera_list;} -int LibRaw::cameraCount() { return (sizeof(static_camera_list)/sizeof(static_camera_list[0]))-1; } - - -const char * LibRaw::strprogress(enum LibRaw_progress p) -{ - switch(p) - { - case LIBRAW_PROGRESS_START: - return "Starting"; - case LIBRAW_PROGRESS_OPEN : - return "Opening file"; - case LIBRAW_PROGRESS_IDENTIFY : - return "Reading metadata"; - case LIBRAW_PROGRESS_SIZE_ADJUST: - return "Adjusting size"; - case LIBRAW_PROGRESS_LOAD_RAW: - return "Reading RAW data"; - case LIBRAW_PROGRESS_REMOVE_ZEROES: - return "Clearing zero values"; - case LIBRAW_PROGRESS_BAD_PIXELS : - return "Removing dead pixels"; - case LIBRAW_PROGRESS_DARK_FRAME: - return "Subtracting dark frame data"; - case LIBRAW_PROGRESS_FOVEON_INTERPOLATE: - return "Interpolating Foveon sensor data"; - case LIBRAW_PROGRESS_SCALE_COLORS: - return "Scaling colors"; - case LIBRAW_PROGRESS_PRE_INTERPOLATE: - return "Pre-interpolating"; - case LIBRAW_PROGRESS_INTERPOLATE: - return "Interpolating"; - case LIBRAW_PROGRESS_MIX_GREEN : - return "Mixing green channels"; - case LIBRAW_PROGRESS_MEDIAN_FILTER : - return "Median filter"; - case LIBRAW_PROGRESS_HIGHLIGHTS: - return "Highlight recovery"; - case LIBRAW_PROGRESS_FUJI_ROTATE : - return "Rotating Fuji diagonal data"; - case LIBRAW_PROGRESS_FLIP : - return "Flipping image"; - case LIBRAW_PROGRESS_APPLY_PROFILE: - return "ICC conversion"; - case LIBRAW_PROGRESS_CONVERT_RGB: - return "Converting to RGB"; - case LIBRAW_PROGRESS_STRETCH: - return "Stretching image"; - case LIBRAW_PROGRESS_THUMB_LOAD: - return "Loading thumbnail"; - default: - return "Some strange things"; - } -} diff --git a/Source/LibRawLite/src/libraw_datastream.cpp b/Source/LibRawLite/src/libraw_datastream.cpp deleted file mode 100644 index b42d18e..0000000 --- a/Source/LibRawLite/src/libraw_datastream.cpp +++ /dev/null @@ -1,526 +0,0 @@ -#ifdef WIN32 -#ifdef __MINGW32__ - #define _WIN32_WINNT 0x0500 - #include -#endif -#endif - -#define LIBRAW_LIBRARY_BUILD -#include "libraw/libraw_types.h" -#include "libraw/libraw.h" -#include "libraw/libraw_datastream.h" -#include "internal/libraw_bytebuffer.h" -#ifdef USE_JASPER -#include /* Decode RED camera movies */ -#else -#define NO_JASPER -#endif - - -LibRaw_byte_buffer::LibRaw_byte_buffer(unsigned sz) -{ - buf=0; size=sz; offt=0; do_free=0; - if(size) - { - buf = (unsigned char*)malloc(size); do_free=1; - } -} - -void LibRaw_byte_buffer::set_buffer(void *bb, unsigned int sz) -{ - buf = (unsigned char*)bb; size = sz; offt=0; do_free=0; -} - -LibRaw_byte_buffer::~LibRaw_byte_buffer() -{ - if(do_free) free(buf); -} - -LibRaw_byte_buffer *LibRaw_abstract_datastream::make_byte_buffer(unsigned int sz) -{ - LibRaw_byte_buffer *ret = new LibRaw_byte_buffer(sz); - read(ret->get_buffer(),sz,1); - return ret; -} - -int LibRaw_abstract_datastream::tempbuffer_open(void *buf, size_t size) -{ - if(substream) return EBUSY; - substream = new LibRaw_buffer_datastream(buf,size); - return substream?0:EINVAL; -} - - -void LibRaw_abstract_datastream::tempbuffer_close() -{ - if(substream) delete substream; - substream = NULL; -} - -// == LibRaw_file_datastream == - -LibRaw_file_datastream::LibRaw_file_datastream(const char *fname) - :filename(fname) -{ - if (filename) { - std::auto_ptr buf(new std::filebuf()); - buf->open(filename, std::ios_base::in | std::ios_base::binary); - if (buf->is_open()) { - f = buf; - } - } -} - int LibRaw_file_datastream::valid() -{ - return f.get() ? 1 : 0; -} - -#define LR_STREAM_CHK() do {if(!f.get()) throw LIBRAW_EXCEPTION_IO_EOF;}while(0) - -int LibRaw_file_datastream::read(void * ptr,size_t size, size_t nmemb) -{ - if(substream) return substream->read(ptr,size,nmemb); - -/* Visual Studio 2008 marks sgetn as insecure, but VS2010 does not. */ -#if defined(WIN32SECURECALLS) && (_MSC_VER < 1600) - LR_STREAM_CHK(); return int(f->_Sgetn_s(static_cast(ptr), nmemb * size,nmemb * size) / size); -#else - LR_STREAM_CHK(); return int(f->sgetn(static_cast(ptr), std::streamsize(nmemb * size)) / size); -#endif -} - -int LibRaw_file_datastream::eof() -{ - if(substream) return substream->eof(); - LR_STREAM_CHK(); return f->sgetc() == EOF; -} - -int LibRaw_file_datastream::seek(INT64 o, int whence) -{ - if(substream) return substream->seek(o,whence); - LR_STREAM_CHK(); - std::ios_base::seekdir dir; - switch (whence) - { - case SEEK_SET: dir = std::ios_base::beg; break; - case SEEK_CUR: dir = std::ios_base::cur; break; - case SEEK_END: dir = std::ios_base::end; break; - default: dir = std::ios_base::beg; - } - return (int)f->pubseekoff((long)o, dir); -} - -INT64 LibRaw_file_datastream::tell() -{ - if(substream) return substream->tell(); - LR_STREAM_CHK(); return f->pubseekoff(0, std::ios_base::cur); -} - -char* LibRaw_file_datastream::gets(char *str, int sz) -{ - if(substream) return substream->gets(str,sz); - LR_STREAM_CHK(); - std::istream is(f.get()); - is.getline(str, sz); - if (is.fail()) return 0; - return str; -} - -int LibRaw_file_datastream::scanf_one(const char *fmt, void*val) -{ - if(substream) return substream->scanf_one(fmt,val); - LR_STREAM_CHK(); - - std::istream is(f.get()); - - /* HUGE ASSUMPTION: *fmt is either "%d" or "%f" */ - if (strcmp(fmt, "%d") == 0) { - int d; - is >> d; - if (is.fail()) return EOF; - *(static_cast(val)) = d; - } else { - float f; - is >> f; - if (is.fail()) return EOF; - *(static_cast(val)) = f; - } - - return 1; -} - -const char* LibRaw_file_datastream::fname() -{ - return filename; -} - -/* You can't have a "subfile" and a "tempfile" at the same time. */ -int LibRaw_file_datastream::subfile_open(const char *fn) -{ - LR_STREAM_CHK(); - if (saved_f.get()) return EBUSY; - saved_f = f; - std::auto_ptr buf(new std::filebuf()); - - buf->open(fn, std::ios_base::in | std::ios_base::binary); - if (!buf->is_open()) { - f = saved_f; - return ENOENT; - } else { - f = buf; - } - - return 0; -} - - -void LibRaw_file_datastream::subfile_close() -{ - if (!saved_f.get()) return; - f = saved_f; -} - -#undef LR_STREAM_CHK - -void * LibRaw_file_datastream::make_jas_stream() -{ -#ifdef NO_JASPER - return NULL; -#else - return jas_stream_fopen(fname(),"rb"); -#endif -} - -// == LibRaw_buffer_datastream -LibRaw_buffer_datastream::LibRaw_buffer_datastream(void *buffer, size_t bsize) -{ - buf = (unsigned char*)buffer; streampos = 0; streamsize = bsize; -} - -LibRaw_buffer_datastream::~LibRaw_buffer_datastream(){} - -int LibRaw_buffer_datastream::read(void * ptr,size_t sz, size_t nmemb) -{ - if(substream) return substream->read(ptr,sz,nmemb); - size_t to_read = sz*nmemb; - if(to_read > streamsize - streampos) - to_read = streamsize-streampos; - if(to_read<1) - return 0; - memmove(ptr,buf+streampos,to_read); - streampos+=to_read; - return int((to_read+sz-1)/sz); -} - -int LibRaw_buffer_datastream::seek(INT64 o, int whence) -{ - if(substream) return substream->seek(o,whence); - switch(whence) - { - case SEEK_SET: - if(o<0) - streampos = 0; - else if (size_t(o) > streamsize) - streampos = streamsize; - else - streampos = size_t(o); - return 0; - case SEEK_CUR: - if(o<0) - { - if(size_t(-o) >= streampos) - streampos = 0; - else - streampos += (size_t)o; - } - else if (o>0) - { - if(o+streampos> streamsize) - streampos = streamsize; - else - streampos += (size_t)o; - } - return 0; - case SEEK_END: - if(o>0) - streampos = streamsize; - else if ( size_t(-o) > streamsize) - streampos = 0; - else - streampos = streamsize+(size_t)o; - return 0; - default: - return 0; - } -} - -INT64 LibRaw_buffer_datastream::tell() -{ - if(substream) return substream->tell(); - return INT64(streampos); -} - -char* LibRaw_buffer_datastream::gets(char *s, int sz) -{ - if (substream) return substream->gets(s,sz); - unsigned char *psrc,*pdest,*str; - str = (unsigned char *)s; - psrc = buf+streampos; - pdest = str; - while ( (size_t(psrc - buf) < streamsize) - && - ((pdest-str)scanf_one(fmt,val); - int scanf_res; - if(streampos>streamsize) return 0; -#ifndef WIN32SECURECALLS - scanf_res = sscanf((char*)(buf+streampos),fmt,val); -#else - scanf_res = sscanf_s((char*)(buf+streampos),fmt,val); -#endif - if(scanf_res>0) - { - int xcnt=0; - while(streampos24) - break; - } - } - return scanf_res; -} - -LibRaw_byte_buffer *LibRaw_buffer_datastream::make_byte_buffer(unsigned int sz) -{ - LibRaw_byte_buffer *ret = new LibRaw_byte_buffer(0); - if(streampos + sz > streamsize) - sz = streamsize - streampos; - ret->set_buffer(buf+streampos,sz); - return ret; -} - -int LibRaw_buffer_datastream::eof() -{ - if(substream) return substream->eof(); - return streampos >= streamsize; -} - int LibRaw_buffer_datastream::valid() -{ - return buf?1:0; -} - - -void * LibRaw_buffer_datastream::make_jas_stream() -{ -#ifdef NO_JASPER - return NULL; -#else - return jas_stream_memopen((char*)buf,streamsize); -#endif -} - -// == LibRaw_bigfile_datastream -LibRaw_bigfile_datastream::LibRaw_bigfile_datastream(const char *fname) -{ - if(fname) - { - filename = fname; -#ifndef WIN32SECURECALLS - f = fopen(fname,"rb"); -#else - if(fopen_s(&f,fname,"rb")) - f = 0; -#endif - } - else - {filename=0;f=0;} - sav=0; -} - -LibRaw_bigfile_datastream::~LibRaw_bigfile_datastream() {if(f)fclose(f); if(sav)fclose(sav);} -int LibRaw_bigfile_datastream::valid() { return f?1:0;} - -#define LR_BF_CHK() do {if(!f) throw LIBRAW_EXCEPTION_IO_EOF;}while(0) - -int LibRaw_bigfile_datastream::read(void * ptr,size_t size, size_t nmemb) -{ - LR_BF_CHK(); - return substream?substream->read(ptr,size,nmemb):int(fread(ptr,size,nmemb,f)); -} - -int LibRaw_bigfile_datastream::eof() -{ - LR_BF_CHK(); - return substream?substream->eof():feof(f); -} - -int LibRaw_bigfile_datastream:: seek(INT64 o, int whence) -{ - LR_BF_CHK(); -#if defined (WIN32) -#ifdef WIN32SECURECALLS - return substream?substream->seek(o,whence):_fseeki64(f,o,whence); -#else - return substream?substream->seek(o,whence):fseek(f,(long)o,whence); -#endif -#else - return substream?substream->seek(o,whence):fseeko(f,o,whence); -#endif -} - -INT64 LibRaw_bigfile_datastream::tell() -{ - LR_BF_CHK(); -#if defined (WIN32) -#ifdef WIN32SECURECALLS - return substream?substream->tell():_ftelli64(f); -#else - return substream?substream->tell():ftell(f); -#endif -#else - return substream?substream->tell():ftello(f); -#endif -} - -char* LibRaw_bigfile_datastream::gets(char *str, int sz) -{ - LR_BF_CHK(); - return substream?substream->gets(str,sz):fgets(str,sz,f); -} - -int LibRaw_bigfile_datastream::scanf_one(const char *fmt, void*val) -{ - LR_BF_CHK(); - return substream?substream->scanf_one(fmt,val): -#ifndef WIN32SECURECALLS - fscanf(f,fmt,val) -#else - fscanf_s(f,fmt,val) -#endif - ; -} - -const char *LibRaw_bigfile_datastream::fname() -{ - return filename; -} - -int LibRaw_bigfile_datastream::subfile_open(const char *fn) -{ - if(sav) return EBUSY; - sav = f; -#ifndef WIN32SECURECALLS - f = fopen(fn,"rb"); -#else - fopen_s(&f,fn,"rb"); -#endif - if(!f) - { - f = sav; - sav = NULL; - return ENOENT; - } - else - return 0; -} - -void LibRaw_bigfile_datastream::subfile_close() -{ - if(!sav) return; - fclose(f); - f = sav; - sav = 0; -} - - -void *LibRaw_bigfile_datastream::make_jas_stream() -{ -#ifdef NO_JASPER - return NULL; -#else - return jas_stream_freopen(fname(),"rb",f); -#endif -} - -// == LibRaw_windows_datastream -#ifdef WIN32 - -LibRaw_windows_datastream::LibRaw_windows_datastream(const TCHAR* sFile) - : LibRaw_buffer_datastream(NULL, 0) - , hMap_(0) - , pView_(NULL) -{ - HANDLE hFile = CreateFile(sFile, GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); - if (hFile == INVALID_HANDLE_VALUE) - throw std::runtime_error("failed to open the file"); - - try { Open(hFile); } catch(...) { CloseHandle(hFile); throw; } - - CloseHandle(hFile); // windows will defer the actual closing of this handle until the hMap_ is closed - reconstruct_base(); -} - - // ctor: construct with a file handle - caller is responsible for closing the file handle -LibRaw_windows_datastream::LibRaw_windows_datastream(HANDLE hFile) - : LibRaw_buffer_datastream(NULL, 0) - , hMap_(0) - , pView_(NULL) -{ - Open(hFile); - reconstruct_base(); -} - -// dtor: unmap and close the mapping handle -LibRaw_windows_datastream::~LibRaw_windows_datastream() -{ - if (pView_ != NULL) - ::UnmapViewOfFile(pView_); - - if (hMap_ != 0) - ::CloseHandle(hMap_); -} - -void LibRaw_windows_datastream::Open(HANDLE hFile) -{ - // create a file mapping handle on the file handle - hMap_ = ::CreateFileMapping(hFile, 0, PAGE_READONLY, 0, 0, 0); - if (hMap_ == NULL) throw std::runtime_error("failed to create file mapping"); - - // now map the whole file base view - if (!::GetFileSizeEx(hFile, (PLARGE_INTEGER)&cbView_)) - throw std::runtime_error("failed to get the file size"); - - pView_ = ::MapViewOfFile(hMap_, FILE_MAP_READ, 0, 0, (size_t)cbView_); - if (pView_ == NULL) - throw std::runtime_error("failed to map the file"); -} - - -#endif - - - diff --git a/Source/OpenEXR/Copyrights/ilmbase/AUTHORS b/Source/OpenEXR/Copyrights/ilmbase/AUTHORS deleted file mode 100644 index 51c1f9c..0000000 --- a/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/Source/OpenEXR/Copyrights/ilmbase/COPYING b/Source/OpenEXR/Copyrights/ilmbase/COPYING deleted file mode 100644 index 6372750..0000000 --- a/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/Source/OpenEXR/Copyrights/ilmbase/ChangeLog b/Source/OpenEXR/Copyrights/ilmbase/ChangeLog deleted file mode 100644 index 2e409d2..0000000 --- a/Source/OpenEXR/Copyrights/ilmbase/ChangeLog +++ /dev/null @@ -1,109 +0,0 @@ -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/Source/OpenEXR/Copyrights/ilmbase/INSTALL b/Source/OpenEXR/Copyrights/ilmbase/INSTALL deleted file mode 100644 index 85ddb18..0000000 --- a/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/Source/OpenEXR/Copyrights/ilmbase/LICENSE b/Source/OpenEXR/Copyrights/ilmbase/LICENSE deleted file mode 100644 index 6372750..0000000 --- a/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/Source/OpenEXR/Copyrights/ilmbase/NEWS b/Source/OpenEXR/Copyrights/ilmbase/NEWS deleted file mode 100644 index 0f49920..0000000 --- a/Source/OpenEXR/Copyrights/ilmbase/NEWS +++ /dev/null @@ -1,3 +0,0 @@ -Version 0.9.0: - - Initial release - diff --git a/Source/OpenEXR/Copyrights/ilmbase/README b/Source/OpenEXR/Copyrights/ilmbase/README deleted file mode 100644 index 1d1251b..0000000 --- a/Source/OpenEXR/Copyrights/ilmbase/README +++ /dev/null @@ -1,60 +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 CVS, in which case you -should first read README.CVS. - -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/Source/OpenEXR/Copyrights/ilmbase/README.CVS b/Source/OpenEXR/Copyrights/ilmbase/README.CVS deleted file mode 100644 index c69064d..0000000 --- a/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/Source/OpenEXR/Copyrights/ilmbase/README.OSX b/Source/OpenEXR/Copyrights/ilmbase/README.OSX deleted file mode 100644 index 170890d..0000000 --- a/Source/OpenEXR/Copyrights/ilmbase/README.OSX +++ /dev/null @@ -1,68 +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. - - -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/Source/OpenEXR/Copyrights/ilmbase/README.win32 b/Source/OpenEXR/Copyrights/ilmbase/README.win32 deleted file mode 100644 index e428f2d..0000000 --- a/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/Source/OpenEXR/Copyrights/openexr/AUTHORS b/Source/OpenEXR/Copyrights/openexr/AUTHORS deleted file mode 100644 index 2926b13..0000000 --- a/Source/OpenEXR/Copyrights/openexr/AUTHORS +++ /dev/null @@ -1,41 +0,0 @@ -Developers: ------------ - -Florian Kainz -Rod Bogart -Drew Hess -Paul Schneider -Bill Anderson -Wojciech Jarosz -Andrew Kunz - -Contributors: -------------- - -Simon Green -Rito Trevino -Josh Pines -Christian Rouet -Rodrigo Damazio -Greg Ward -Joseph Goldstone -Loren Carpenter, Pixar Animation Studios - -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/Source/OpenEXR/Copyrights/openexr/COPYING b/Source/OpenEXR/Copyrights/openexr/COPYING deleted file mode 100644 index 6372750..0000000 --- a/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/Source/OpenEXR/Copyrights/openexr/ChangeLog b/Source/OpenEXR/Copyrights/openexr/ChangeLog deleted file mode 100644 index 58212f4..0000000 --- a/Source/OpenEXR/Copyrights/openexr/ChangeLog +++ /dev/null @@ -1,666 +0,0 @@ -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/Source/OpenEXR/Copyrights/openexr/INSTALL b/Source/OpenEXR/Copyrights/openexr/INSTALL deleted file mode 100644 index 06d1f09..0000000 --- a/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/Source/OpenEXR/Copyrights/openexr/LICENSE b/Source/OpenEXR/Copyrights/openexr/LICENSE deleted file mode 100644 index 6372750..0000000 --- a/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/Source/OpenEXR/Copyrights/openexr/NEWS b/Source/OpenEXR/Copyrights/openexr/NEWS deleted file mode 100644 index e8dde6c..0000000 --- a/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/Source/OpenEXR/Copyrights/openexr/README b/Source/OpenEXR/Copyrights/openexr/README deleted file mode 100644 index 3d9d9c1..0000000 --- a/Source/OpenEXR/Copyrights/openexr/README +++ /dev/null @@ -1,68 +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 OpenEXR directly from CVS, in which case you -should first read README.CVS. - -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/Source/OpenEXR/Copyrights/openexr/README.CVS b/Source/OpenEXR/Copyrights/openexr/README.CVS deleted file mode 100644 index 90a4fa3..0000000 --- a/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/Source/OpenEXR/Copyrights/openexr/README.OSX b/Source/OpenEXR/Copyrights/openexr/README.OSX deleted file mode 100644 index 0cbab78..0000000 --- a/Source/OpenEXR/Copyrights/openexr/README.OSX +++ /dev/null @@ -1,21 +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. - -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/Source/OpenEXR/Copyrights/openexr/README.win32 b/Source/OpenEXR/Copyrights/openexr/README.win32 deleted file mode 100644 index 0f7a884..0000000 --- a/Source/OpenEXR/Copyrights/openexr/README.win32 +++ /dev/null @@ -1,197 +0,0 @@ -OpenEXR is one of six software packages that were designed to work -together: IlmBase, PyIlmBase, OpenEXR, OpenEXR_Viewers, CTL and -OpenEXR_CTL. You may only be interested in OpenEXR or you may want -to build it together wth the other packages. - -What follows are instructions for building all five packages. -If you are only interested in OpenEXR, stop after step 2. - -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 - PyIlmBase - 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/Source/OpenEXR/Half/Makefile.am b/Source/OpenEXR/Half/Makefile.am deleted file mode 100644 index c591f55..0000000 --- a/Source/OpenEXR/Half/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -## Process this file with automake to produce Makefile.in - -INCLUDES = -I$(top_srcdir)/config - -lib_LTLIBRARIES = libHalf.la - -libHalf_la_SOURCES = half.cpp half.h halfFunction.h halfLimits.h - -libHalf_la_LDFLAGS = -version-info @LIBTOOL_VERSION@ -no-undefined - -libHalfincludedir = $(includedir)/OpenEXR - -libHalfinclude_HEADERS = half.h halfFunction.h halfLimits.h - -# these are used to build eLut.h and toFloat.h dynamically -EXTRA_DIST = eLut.cpp toFloat.cpp - -CLEANFILES = eLut eLut.h toFloat toFloat.h - -eLut_SOURCES = eLut.cpp - -toFloat_SOURCES = toFloat.cpp - -eLut.h: eLut - ./eLut > eLut.h - -toFloat.h: toFloat - ./toFloat > toFloat.h - -BUILT_SOURCES = eLut.h toFloat.h - -noinst_PROGRAMS = eLut toFloat diff --git a/Source/OpenEXR/Half/Makefile.in b/Source/OpenEXR/Half/Makefile.in deleted file mode 100644 index 51c8024..0000000 --- a/Source/OpenEXR/Half/Makefile.in +++ /dev/null @@ -1,558 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = eLut$(EXEEXT) toFloat$(EXEEXT) -subdir = Half -DIST_COMMON = $(libHalfinclude_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/threads.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/IlmBaseConfig.h -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(libHalfincludedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libHalf_la_LIBADD = -am_libHalf_la_OBJECTS = half.lo -libHalf_la_OBJECTS = $(am_libHalf_la_OBJECTS) -PROGRAMS = $(noinst_PROGRAMS) -am_eLut_OBJECTS = eLut.$(OBJEXT) -eLut_OBJECTS = $(am_eLut_OBJECTS) -eLut_LDADD = $(LDADD) -am_toFloat_OBJECTS = toFloat.$(OBJEXT) -toFloat_OBJECTS = $(am_toFloat_OBJECTS) -toFloat_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libHalf_la_SOURCES) $(eLut_SOURCES) $(toFloat_SOURCES) -DIST_SOURCES = $(libHalf_la_SOURCES) $(eLut_SOURCES) \ - $(toFloat_SOURCES) -libHalfincludeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(libHalfinclude_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AM_CFLAGS = @AM_CFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HAVE_UCONTEXT_H = @HAVE_UCONTEXT_H@ -ILMBASE_VERSION = @ILMBASE_VERSION@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_VERSION = @LIBTOOL_VERSION@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_LIPO = @ac_ct_LIPO@ -ac_ct_NMEDIT = @ac_ct_NMEDIT@ -ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ -ac_ct_OTOOL = @ac_ct_OTOOL@ -ac_ct_OTOOL64 = @ac_ct_OTOOL64@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -acx_pthread_config = @acx_pthread_config@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -INCLUDES = -I$(top_srcdir)/config -lib_LTLIBRARIES = libHalf.la -libHalf_la_SOURCES = half.cpp half.h halfFunction.h halfLimits.h -libHalf_la_LDFLAGS = -version-info @LIBTOOL_VERSION@ -no-undefined -libHalfincludedir = $(includedir)/OpenEXR -libHalfinclude_HEADERS = half.h halfFunction.h halfLimits.h - -# these are used to build eLut.h and toFloat.h dynamically -EXTRA_DIST = eLut.cpp toFloat.cpp -CLEANFILES = eLut eLut.h toFloat toFloat.h -eLut_SOURCES = eLut.cpp -toFloat_SOURCES = toFloat.cpp -BUILT_SOURCES = eLut.h toFloat.h -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Half/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Half/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHalf.la: $(libHalf_la_OBJECTS) $(libHalf_la_DEPENDENCIES) - $(CXXLINK) -rpath $(libdir) $(libHalf_la_LDFLAGS) $(libHalf_la_OBJECTS) $(libHalf_la_LIBADD) $(LIBS) - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -eLut$(EXEEXT): $(eLut_OBJECTS) $(eLut_DEPENDENCIES) - @rm -f eLut$(EXEEXT) - $(CXXLINK) $(eLut_LDFLAGS) $(eLut_OBJECTS) $(eLut_LDADD) $(LIBS) -toFloat$(EXEEXT): $(toFloat_OBJECTS) $(toFloat_DEPENDENCIES) - @rm -f toFloat$(EXEEXT) - $(CXXLINK) $(toFloat_LDFLAGS) $(toFloat_OBJECTS) $(toFloat_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eLut.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/half.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toFloat.Po@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-libHalfincludeHEADERS: $(libHalfinclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libHalfincludedir)" || $(mkdir_p) "$(DESTDIR)$(libHalfincludedir)" - @list='$(libHalfinclude_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libHalfincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libHalfincludedir)/$$f'"; \ - $(libHalfincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libHalfincludedir)/$$f"; \ - done - -uninstall-libHalfincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libHalfinclude_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libHalfincludedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libHalfincludedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libHalfincludedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-libHalfincludeHEADERS - -install-exec-am: install-libLTLIBRARIES - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-libHalfincludeHEADERS \ - uninstall-libLTLIBRARIES - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-libHalfincludeHEADERS \ - install-libLTLIBRARIES install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am \ - uninstall-libHalfincludeHEADERS uninstall-libLTLIBRARIES - - -eLut.h: eLut - ./eLut > eLut.h - -toFloat.h: toFloat - ./toFloat > toFloat.h -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/Source/OpenEXR/Half/eLut.cpp b/Source/OpenEXR/Half/eLut.cpp deleted file mode 100644 index ce64b50..0000000 --- a/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/Source/OpenEXR/Half/eLut.h b/Source/OpenEXR/Half/eLut.h deleted file mode 100644 index f028cdb..0000000 --- a/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/Source/OpenEXR/Half/half.cpp b/Source/OpenEXR/Half/half.cpp deleted file mode 100644 index 1a3f650..0000000 --- a/Source/OpenEXR/Half/half.cpp +++ /dev/null @@ -1,311 +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. -//----------------------------------------------- - -float -half::overflow () -{ - volatile float f = 1e10; - - for (int i = 0; i < 10; i++) - f *= f; // this will overflow before - // the for­loop terminates - return f; -} - - -//----------------------------------------------------- -// Float-to-half conversion -- general case, including -// zeroes, denormalized numbers and exponent overflows. -//----------------------------------------------------- - -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 -//--------------------- - -ostream & -operator << (ostream &os, half h) -{ - os << float (h); - return os; -} - - -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 -//--------------------------------------- - -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 << ' '; - } -} - - -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 << ' '; - } -} - - -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; -} - - -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/Source/OpenEXR/Half/half.h b/Source/OpenEXR/Half/half.h deleted file mode 100644 index 5e707ef..0000000 --- a/Source/OpenEXR/Half/half.h +++ /dev/null @@ -1,766 +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 - -#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 - -class HALF_EXPORT 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 - //-------------------------------------- - - unsigned short bits () const; - void setBits (unsigned short bits); - - - public: - - union uif - { - unsigned int i; - float f; - }; - - private: - - static short convert (int i); - static float overflow (); - - unsigned short _h; - - static HALF_EXPORT_CONST uif _toFloat[1 << 16]; - static HALF_EXPORT_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/Source/OpenEXR/Half/halfFunction.h b/Source/OpenEXR/Half/halfFunction.h deleted file mode 100644 index 37dbf50..0000000 --- a/Source/OpenEXR/Half/halfFunction.h +++ /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. -// -/////////////////////////////////////////////////////////////////////////// - -// 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 -#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/Source/OpenEXR/Half/halfLimits.h b/Source/OpenEXR/Half/halfLimits.h deleted file mode 100644 index 404f589..0000000 --- a/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/Source/OpenEXR/Half/toFloat.cpp b/Source/OpenEXR/Half/toFloat.cpp deleted file mode 100644 index 001bc51..0000000 --- a/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/Source/OpenEXR/Half/toFloat.h b/Source/OpenEXR/Half/toFloat.h deleted file mode 100644 index 37c9556..0000000 --- a/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/Source/OpenEXR/Iex/Iex.h b/Source/OpenEXR/Iex/Iex.h deleted file mode 100644 index a0fd31d..0000000 --- a/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/Source/OpenEXR/Iex/IexBaseExc.cpp b/Source/OpenEXR/Iex/IexBaseExc.cpp deleted file mode 100644 index c85b0c2..0000000 --- a/Source/OpenEXR/Iex/IexBaseExc.cpp +++ /dev/null @@ -1,129 +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. -// -/////////////////////////////////////////////////////////////////////////// - - - -//--------------------------------------------------------------------- -// -// Constructors and destructors for our exception base class. -// -//--------------------------------------------------------------------- - -#include "IexBaseExc.h" - -namespace Iex { -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; -} - - -} // namespace Iex diff --git a/Source/OpenEXR/Iex/IexBaseExc.h b/Source/OpenEXR/Iex/IexBaseExc.h deleted file mode 100644 index 9d8ab24..0000000 --- a/Source/OpenEXR/Iex/IexBaseExc.h +++ /dev/null @@ -1,266 +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_IEXBASEEXC_H -#define INCLUDED_IEXBASEEXC_H - - -//---------------------------------------------------------- -// -// A general exception base class, and a few -// useful exceptions derived from the base class. -// -//---------------------------------------------------------- - -#include -#include -#include - -namespace Iex { - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER -// Tell MS VC++ to suppress exception specification warnings -#pragma warning(disable:4290) -#endif - -//------------------------------- -// Our most basic exception class -//------------------------------- - -class BaseExc: public std::string, public std::exception -{ - public: - - //---------------------------- - // Constructors and destructor - //---------------------------- - - BaseExc (const char *s = 0) throw(); // std::string (s) - BaseExc (const std::string &s) throw(); // std::string (s) - BaseExc (std::stringstream &s) throw(); // std::string (s.str()) - - BaseExc (const BaseExc &be) throw(); - virtual ~BaseExc () throw (); - - //-------------------------------------------- - // what() method -- e.what() returns e.c_str() - //-------------------------------------------- - - virtual const char * what () const throw (); - - - //-------------------------------------------------- - // Convenient methods to change the exception's text - //-------------------------------------------------- - - BaseExc & assign (std::stringstream &s); // assign (s.str()) - BaseExc & operator = (std::stringstream &s); - - BaseExc & append (std::stringstream &s); // append (s.str()) - BaseExc & operator += (std::stringstream &s); - - - //-------------------------------------------------- - // These methods from the base class get obscured by - // the definitions above. - //-------------------------------------------------- - - BaseExc & assign (const char *s); - BaseExc & operator = (const char *s); - - BaseExc & append (const char *s); - 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()). - //-------------------------------------------------- - - 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(name, base) \ - class name: public base \ - { \ - public: \ - name (const char* text=0) throw(): base (text) {} \ - name (const std::string &text) throw(): base (text) {} \ - name (std::stringstream &text) throw(): base (text) {} \ - }; - - -//-------------------------------------------------------- -// Some exceptions which should be useful in most programs -//-------------------------------------------------------- - -DEFINE_EXC (ArgExc, BaseExc) // Invalid arguments to a function call - -DEFINE_EXC (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 (InputExc, BaseExc) // Invalid input data, e.g. from a file - -DEFINE_EXC (IoExc, BaseExc) // Input or output operation failed - -DEFINE_EXC (MathExc, BaseExc) // Arithmetic exception; more specific - // exceptions derived from this class - // are defined in ExcMath.h - -DEFINE_EXC (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 (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 (NullExc, BaseExc) // A pointer is inappropriately null. - -DEFINE_EXC (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) (); - -void setStackTracer (StackTracer stackTracer); -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; -} - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER -#pragma warning(default:4290) -#endif - -} // namespace Iex - -#endif diff --git a/Source/OpenEXR/Iex/IexErrnoExc.h b/Source/OpenEXR/Iex/IexErrnoExc.h deleted file mode 100644 index 53cc28f..0000000 --- a/Source/OpenEXR/Iex/IexErrnoExc.h +++ /dev/null @@ -1,210 +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_IEXERRNOEXC_H -#define INCLUDED_IEXERRNOEXC_H - -//---------------------------------------------------------------- -// -// Exceptions which correspond to "errno" error codes. -// -//---------------------------------------------------------------- - -#include "IexBaseExc.h" - -namespace Iex { - - -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) - - -} // namespace Iex - -#endif diff --git a/Source/OpenEXR/Iex/IexMacros.h b/Source/OpenEXR/Iex/IexMacros.h deleted file mode 100644 index e3988a2..0000000 --- a/Source/OpenEXR/Iex/IexMacros.h +++ /dev/null @@ -1,148 +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_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 << "."); -// -//---------------------------------------------------------------------------- - -#define THROW(type, text) \ - do \ - { \ - 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::throwErrnoExc (s.str()); \ - } \ - while (0) - - -//------------------------------------------------------------- -// A macro to throw exceptions if an assertion is false. -// -// Example: -// -// ASSERT (ptr != NULL, NullExc, "Null pointer" ); -// -//------------------------------------------------------------- - -#define ASSERT(assertion, type, text) \ - do \ - { \ - if ((assertion) == false) \ - THROW (type, text); \ - } \ - while (0) - - -#endif diff --git a/Source/OpenEXR/Iex/IexMathExc.h b/Source/OpenEXR/Iex/IexMathExc.h deleted file mode 100644 index 4ef90d3..0000000 --- a/Source/OpenEXR/Iex/IexMathExc.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_IEXMATHEXC_H -#define INCLUDED_IEXMATHEXC_H - -#include "IexBaseExc.h" - -namespace Iex { - -//--------------------------------------------------------- -// 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 - - -} // namespace Iex - -#endif diff --git a/Source/OpenEXR/Iex/IexThrowErrnoExc.cpp b/Source/OpenEXR/Iex/IexThrowErrnoExc.cpp deleted file mode 100644 index 410a45c..0000000 --- a/Source/OpenEXR/Iex/IexThrowErrnoExc.cpp +++ /dev/null @@ -1,859 +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. -// -/////////////////////////////////////////////////////////////////////////// - - - -//---------------------------------------------------------------- -// -// Exceptions that correspond to "errno" error codes, -// and a function to make throwing those exceptions easy. -// -//---------------------------------------------------------------- - -#include "IexThrowErrnoExc.h" -#include "IexErrnoExc.h" -#include -#include - -namespace Iex { - - -void throwErrnoExc (const std::string &text, int errnum) -{ - 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); -} - - -} // namespace Iex diff --git a/Source/OpenEXR/Iex/IexThrowErrnoExc.h b/Source/OpenEXR/Iex/IexThrowErrnoExc.h deleted file mode 100644 index 5b41dcc..0000000 --- a/Source/OpenEXR/Iex/IexThrowErrnoExc.h +++ /dev/null @@ -1,96 +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_IEXTHROWERRNOEXC_H -#define INCLUDED_IEXTHROWERRNOEXC_H - -//---------------------------------------------------------- -// -// A function which throws ExcErrno exceptions -// -//---------------------------------------------------------- - -#include "IexBaseExc.h" - -namespace Iex { - - -//-------------------------------------------------------------------------- -// -// 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).") -// -//-------------------------------------------------------------------------- - -void throwErrnoExc (const std::string &txt, int errnum); -void throwErrnoExc (const std::string &txt = "%T." /*, int errnum = oserror() */); - - -} // namespace Iex - -#endif diff --git a/Source/OpenEXR/Iex/Makefile.am b/Source/OpenEXR/Iex/Makefile.am deleted file mode 100644 index 9b6df1b..0000000 --- a/Source/OpenEXR/Iex/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -## Process this file with automake to produce Makefile.in - -INCLUDES = -I$(top_srcdir)/config - -lib_LTLIBRARIES = libIex.la - -libIex_la_SOURCES = IexThrowErrnoExc.cpp IexBaseExc.cpp IexBaseExc.h \ - IexErrnoExc.h Iex.h IexMacros.h IexMathExc.h \ - IexThrowErrnoExc.h - -libIex_la_LDFLAGS = -version-info @LIBTOOL_VERSION@ -no-undefined - -libIexincludedir = $(includedir)/OpenEXR - -libIexinclude_HEADERS = IexBaseExc.h IexMathExc.h IexThrowErrnoExc.h \ - IexErrnoExc.h IexMacros.h Iex.h diff --git a/Source/OpenEXR/Iex/Makefile.in b/Source/OpenEXR/Iex/Makefile.in deleted file mode 100644 index 942a32d..0000000 --- a/Source/OpenEXR/Iex/Makefile.in +++ /dev/null @@ -1,521 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = Iex -DIST_COMMON = $(libIexinclude_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/threads.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/IlmBaseConfig.h -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(libIexincludedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libIex_la_LIBADD = -am_libIex_la_OBJECTS = IexThrowErrnoExc.lo IexBaseExc.lo -libIex_la_OBJECTS = $(am_libIex_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libIex_la_SOURCES) -DIST_SOURCES = $(libIex_la_SOURCES) -libIexincludeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(libIexinclude_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AM_CFLAGS = @AM_CFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HAVE_UCONTEXT_H = @HAVE_UCONTEXT_H@ -ILMBASE_VERSION = @ILMBASE_VERSION@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_VERSION = @LIBTOOL_VERSION@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_LIPO = @ac_ct_LIPO@ -ac_ct_NMEDIT = @ac_ct_NMEDIT@ -ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ -ac_ct_OTOOL = @ac_ct_OTOOL@ -ac_ct_OTOOL64 = @ac_ct_OTOOL64@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -acx_pthread_config = @acx_pthread_config@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -INCLUDES = -I$(top_srcdir)/config -lib_LTLIBRARIES = libIex.la -libIex_la_SOURCES = IexThrowErrnoExc.cpp IexBaseExc.cpp IexBaseExc.h \ - IexErrnoExc.h Iex.h IexMacros.h IexMathExc.h \ - IexThrowErrnoExc.h - -libIex_la_LDFLAGS = -version-info @LIBTOOL_VERSION@ -no-undefined -libIexincludedir = $(includedir)/OpenEXR -libIexinclude_HEADERS = IexBaseExc.h IexMathExc.h IexThrowErrnoExc.h \ - IexErrnoExc.h IexMacros.h Iex.h - -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Iex/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Iex/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libIex.la: $(libIex_la_OBJECTS) $(libIex_la_DEPENDENCIES) - $(CXXLINK) -rpath $(libdir) $(libIex_la_LDFLAGS) $(libIex_la_OBJECTS) $(libIex_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IexBaseExc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IexThrowErrnoExc.Plo@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-libIexincludeHEADERS: $(libIexinclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libIexincludedir)" || $(mkdir_p) "$(DESTDIR)$(libIexincludedir)" - @list='$(libIexinclude_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libIexincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libIexincludedir)/$$f'"; \ - $(libIexincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libIexincludedir)/$$f"; \ - done - -uninstall-libIexincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libIexinclude_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libIexincludedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libIexincludedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libIexincludedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-libIexincludeHEADERS - -install-exec-am: install-libLTLIBRARIES - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-libIexincludeHEADERS \ - uninstall-libLTLIBRARIES - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am \ - install-libIexincludeHEADERS install-libLTLIBRARIES \ - install-man install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am uninstall-libIexincludeHEADERS \ - uninstall-libLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/Source/OpenEXR/IlmBaseConfig.h b/Source/OpenEXR/IlmBaseConfig.h deleted file mode 100644 index cc8bb9d..0000000 --- a/Source/OpenEXR/IlmBaseConfig.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// Define and set to 1 if the target system has POSIX thread support -// and you want OpenEXR to use it for multithreaded file I/O. -// - -#undef HAVE_PTHREAD // currently disabled in FreeImage - -// -// 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. -// - -#undef HAVE_POSIX_SEMAPHORES - -// -// Define and set to 1 if the target system is a Darwin-based system -// (e.g., OS X). -// - -#undef HAVE_DARWIN - -// -// 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 HAVE_LINUX_PROCFS - -// -// Define and set to 1 if the target system includes the NVIDIA Cg -// runtime. The exrdisplay program will use a fragment shader to -// accelerate the display of OpenEXR images. -// - -#undef HAVE_FRAGMENT_SHADERS - -// -// Define and set to 1 if the target system has a complete -// implementation, specifically if it supports the std::right -// formatter. -// - -#undef HAVE_COMPLETE_IOMANIP diff --git a/Source/OpenEXR/IlmImf/ImfAcesFile.cpp b/Source/OpenEXR/IlmImf/ImfAcesFile.cpp deleted file mode 100644 index e84f9fe..0000000 --- a/Source/OpenEXR/IlmImf/ImfAcesFile.cpp +++ /dev/null @@ -1,631 +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 - -using namespace std; -using namespace Imath; -using namespace Iex; - -namespace Imf { - - -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 - (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::Box2i &displayWindow, - const Imath::Box2i &dataWindow, - RgbaChannels rgbaChannels, - float pixelAspectRatio, - const Imath::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::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::Box2i & -AcesOutputFile::displayWindow () const -{ - return _data->rgbaFile->displayWindow(); -} - - -const Imath::Box2i & -AcesOutputFile::dataWindow () const -{ - return _data->rgbaFile->dataWindow(); -} - - -float -AcesOutputFile::pixelAspectRatio () const -{ - return _data->rgbaFile->pixelAspectRatio(); -} - - -const Imath::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::Box2i & -AcesInputFile::displayWindow () const -{ - return _data->rgbaFile->displayWindow(); -} - - -const Imath::Box2i & -AcesInputFile::dataWindow () const -{ - return _data->rgbaFile->dataWindow(); -} - - -float -AcesInputFile::pixelAspectRatio () const -{ - return _data->rgbaFile->pixelAspectRatio(); -} - - -const Imath::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(); -} - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfAcesFile.h b/Source/OpenEXR/IlmImf/ImfAcesFile.h deleted file mode 100644 index 2ab7314..0000000 --- a/Source/OpenEXR/IlmImf/ImfAcesFile.h +++ /dev/null @@ -1,322 +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 -#include -#include "ImathVec.h" -#include "ImathBox.h" -#include -#include - -namespace Imf { - - -class RgbaOutputFile; -class RgbaInputFile; -struct PreviewRgba; -class Chromaticities; - -// -// ACES red, green, blue and white-point chromaticities. -// - -const Chromaticities & acesChromaticities (); - - -// -// ACES output file. -// - -class 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 (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::Box2i &displayWindow, - const Imath::Box2i &dataWindow = Imath::Box2i(), - RgbaChannels rgbaChannels = WRITE_RGBA, - float pixelAspectRatio = 1, - const Imath::V2f screenWindowCenter = Imath::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::V2f screenWindowCenter = Imath::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::Box2i & displayWindow () const; - const Imath::Box2i & dataWindow () const; - float pixelAspectRatio () const; - const Imath::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 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 (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::Box2i & displayWindow () const; - const Imath::Box2i & dataWindow () const; - float pixelAspectRatio () const; - const Imath::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; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfArray.h b/Source/OpenEXR/IlmImf/ImfArray.h deleted file mode 100644 index 18eb66f..0000000 --- a/Source/OpenEXR/IlmImf/ImfArray.h +++ /dev/null @@ -1,261 +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 - -//------------------------------------------------------------------------- -// -// 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; -// } -// -//------------------------------------------------------------------------- - -namespace Imf { - - -template -class Array -{ - public: - - //----------------------------- - // Constructors and destructors - //----------------------------- - - Array () {_data = 0;} - Array (long size) {_data = new T[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); - - - private: - - Array (const Array &); // Copying and assignment - Array & operator = (const Array &); // are not implemented - - 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); - - - private: - - Array2D (const Array2D &); // Copying and assignment - Array2D & operator = (const Array2D &); // are not implemented - - long _sizeY; - T * _data; -}; - - -//--------------- -// Implementation -//--------------- - -template -inline void -Array::resizeErase (long size) -{ - T *tmp = new T[size]; - delete [] _data; - _data = tmp; -} - - -template -inline void -Array::resizeEraseUnsafe (long size) -{ - delete [] _data; - _data = 0; - _data = new T[size]; -} - - -template -inline -Array2D::Array2D (): - _sizeY (0), _data (0) -{ - // emtpy -} - - -template -inline -Array2D::Array2D (long sizeX, long sizeY): - _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; - _sizeY = sizeY; - _data = tmp; -} - - -template -inline void -Array2D::resizeEraseUnsafe (long sizeX, long sizeY) -{ - delete [] _data; - _data = 0; - _sizeY = 0; - _data = new T[sizeX * sizeY]; - _sizeY = sizeY; -} - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfAttribute.cpp b/Source/OpenEXR/IlmImf/ImfAttribute.cpp deleted file mode 100644 index feb5f83..0000000 --- a/Source/OpenEXR/IlmImf/ImfAttribute.cpp +++ /dev/null @@ -1,156 +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 - - -namespace Imf { - -using IlmThread::Mutex; -using IlmThread::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::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::ArgExc, "Cannot create image file attribute of " - "unknown type \"" << typeName << "\"."); - - return (i->second)(); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfAttribute.h b/Source/OpenEXR/IlmImf/ImfAttribute.h deleted file mode 100644 index 520c20c..0000000 --- a/Source/OpenEXR/IlmImf/ImfAttribute.h +++ /dev/null @@ -1,427 +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 -#include - - -namespace Imf { - - -class 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 (OStream &os, - int version) const = 0; - - virtual void readValueFrom (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 (OStream &os, - int version) const; - - virtual void readValueFrom (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 (OStream &os, int version) const -{ - Xdr::write (os, _value); -} - - -template -void -TypedAttribute::readValueFrom (IStream &is, int size, int version) -{ - 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::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::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()); -} - - -} // namespace Imf - -#if defined(OPENEXR_DLL) && defined(_MSC_VER) - // Tell MS VC++ to disable "non dll-interface class used as base - // for dll-interface class" and "no suitable definition provided - // for explicit template" - #pragma warning (disable : 4275 4661) - - #if defined (ILMIMF_EXPORTS) - #define IMF_EXPIMP_TEMPLATE - #else - #define IMF_EXPIMP_TEMPLATE extern - #endif - - IMF_EXPIMP_TEMPLATE template class Imf::TypedAttribute; - IMF_EXPIMP_TEMPLATE template class Imf::TypedAttribute; - - #pragma warning(default : 4251) - #undef EXTERN_TEMPLATE -#endif - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfAutoArray.h b/Source/OpenEXR/IlmImf/ImfAutoArray.h deleted file mode 100644 index edb8b10..0000000 --- a/Source/OpenEXR/IlmImf/ImfAutoArray.h +++ /dev/null @@ -1,93 +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 "OpenEXRConfig.h" - -namespace Imf { - - -#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 - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfB44Compressor.cpp b/Source/OpenEXR/IlmImf/ImfB44Compressor.cpp deleted file mode 100644 index 231c18c..0000000 --- a/Source/OpenEXR/IlmImf/ImfB44Compressor.cpp +++ /dev/null @@ -1,1069 +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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Imf { - -using Imath::divp; -using Imath::modp; -using Imath::Box2i; -using Imath::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] = 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] = 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::InputExc ("Error decompressing data " - "(input data are shorter than expected)."); -} - - -void -tooMuchData () -{ - throw Iex::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::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::Box2i range, - const char *&outPtr) -{ - return uncompress (inPtr, inSize, range, outPtr); -} - - -int -B44Compressor::compress (const char *inPtr, - int inSize, - Imath::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::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; -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfB44Compressor.h b/Source/OpenEXR/IlmImf/ImfB44Compressor.h deleted file mode 100644 index 32b3713..0000000 --- a/Source/OpenEXR/IlmImf/ImfB44Compressor.h +++ /dev/null @@ -1,117 +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 - -namespace Imf { - -class ChannelList; - - -class 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::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); - private: - - struct ChannelData; - - 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); - - 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; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfBoxAttribute.cpp b/Source/OpenEXR/IlmImf/ImfBoxAttribute.cpp deleted file mode 100644 index d275d11..0000000 --- a/Source/OpenEXR/IlmImf/ImfBoxAttribute.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. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class Box2iAttribute -// class Box2fAttribute -// -//----------------------------------------------------------------------------- - -#include - - -namespace Imf { - - -template <> -const char * -Box2iAttribute::staticTypeName () -{ - return "box2i"; -} - - -template <> -void -Box2iAttribute::writeValueTo (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 (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 (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 (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); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfBoxAttribute.h b/Source/OpenEXR/IlmImf/ImfBoxAttribute.h deleted file mode 100644 index fe35391..0000000 --- a/Source/OpenEXR/IlmImf/ImfBoxAttribute.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_BOX_ATTRIBUTE_H -#define INCLUDED_IMF_BOX_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class Box2iAttribute -// class Box2fAttribute -// -//----------------------------------------------------------------------------- - -#include -#include "ImathBox.h" - - -namespace Imf { - - -typedef TypedAttribute Box2iAttribute; -template <> const char *Box2iAttribute::staticTypeName (); -template <> void Box2iAttribute::writeValueTo (OStream &, int) const; -template <> void Box2iAttribute::readValueFrom (IStream &, int, int); - - -typedef TypedAttribute Box2fAttribute; -template <> const char *Box2fAttribute::staticTypeName (); -template <> void Box2fAttribute::writeValueTo (OStream &, int) const; -template <> void Box2fAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp b/Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp deleted file mode 100644 index 1fcf8c6..0000000 --- a/Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp +++ /dev/null @@ -1,1434 +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 - -using Imath::Box2i; -using Imath::Box2f; -using Imath::V2i; -using Imath::V2f; -using Imath::V3i; -using Imath::V3f; -using Imath::M33f; -using Imath::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 Imf::Header * -header (ImfHeader *hdr) -{ - return (Imf::Header *)(hdr); -} - - -inline const Imf::Header * -header (const ImfHeader *hdr) -{ - return (const Imf::Header *)(hdr); -} - - -inline Imf::RgbaOutputFile * -outfile (ImfOutputFile *out) -{ - return (Imf::RgbaOutputFile *) out; -} - - -inline const Imf::RgbaOutputFile * -outfile (const ImfOutputFile *out) -{ - return (const Imf::RgbaOutputFile *) out; -} - - -inline Imf::TiledRgbaOutputFile * -outfile (ImfTiledOutputFile *out) -{ - return (Imf::TiledRgbaOutputFile *) out; -} - - -inline const Imf::TiledRgbaOutputFile * -outfile (const ImfTiledOutputFile *out) -{ - return (const Imf::TiledRgbaOutputFile *) out; -} - - -inline Imf::RgbaInputFile * -infile (ImfInputFile *in) -{ - return (Imf::RgbaInputFile *) in; -} - - -inline const Imf::RgbaInputFile * -infile (const ImfInputFile *in) -{ - return (const Imf::RgbaInputFile *) in; -} - - -inline Imf::TiledRgbaInputFile * -infile (ImfTiledInputFile *in) -{ - return (Imf::TiledRgbaInputFile *) in; -} - - -inline const Imf::TiledRgbaInputFile * -infile (const ImfTiledInputFile *in) -{ - return (const Imf::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 Imf::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 Imf::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 = swc.x; - *y = 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() = Imf::LineOrder (lineOrder); -} - - -int -ImfHeaderLineOrder (const ImfHeader *hdr) -{ - return header(hdr)->lineOrder(); -} - - -void -ImfHeaderSetCompression (ImfHeader *hdr, int compression) -{ - header(hdr)->compression() = Imf::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, Imf::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, Imf::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, Imf::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, Imf::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, Imf::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, Imf::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, Imf::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, Imf::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, Imf::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, Imf::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, Imf::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, Imf::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 Imf::RgbaOutputFile - (name, *header(hdr), Imf::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 ((Imf::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 Imf::TiledRgbaOutputFile - (name, *header(hdr), - Imf::RgbaChannels (channels), - xSize, ySize, - Imf::LevelMode (mode), - Imf::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 ((Imf::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 Imf::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 ((Imf::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 Imf::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 ((Imf::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 Imf::RgbaLut - (Imf::round12log, Imf::RgbaChannels (channels)); - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -ImfLut * -ImfNewRoundNBitLut (unsigned int n, int channels) -{ - try - { - return (ImfLut *) new Imf::RgbaLut - (Imf::roundNBit (n), Imf::RgbaChannels (channels)); - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -void -ImfDeleteLut (ImfLut *lut) -{ - delete (Imf::RgbaLut *) lut; -} - - -void -ImfApplyLut (ImfLut *lut, ImfRgba *data, int nData, int stride) -{ - ((Imf::RgbaLut *)lut)->apply ((Imf::Rgba *)data, nData, stride); -} - - -const char * -ImfErrorMessage () -{ - return errorMessage; -} diff --git a/Source/OpenEXR/IlmImf/ImfCRgbaFile.h b/Source/OpenEXR/IlmImf/ImfCRgbaFile.h deleted file mode 100644 index e3dc1ce..0000000 --- a/Source/OpenEXR/IlmImf/ImfCRgbaFile.h +++ /dev/null @@ -1,467 +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 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Interpreting unsigned shorts as 16-bit floating point numbers -*/ - -typedef unsigned short ImfHalf; - -void ImfFloatToHalf (float f, - ImfHalf *h); - -void ImfFloatToHalfArray (int n, - const float f[/*n*/], - ImfHalf h[/*n*/]); - -float ImfHalfToFloat (ImfHalf h); - -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; - -ImfHeader * ImfNewHeader (void); - -void ImfDeleteHeader (ImfHeader *hdr); - -ImfHeader * ImfCopyHeader (const ImfHeader *hdr); - -void ImfHeaderSetDisplayWindow (ImfHeader *hdr, - int xMin, int yMin, - int xMax, int yMax); - -void ImfHeaderDisplayWindow (const ImfHeader *hdr, - int *xMin, int *yMin, - int *xMax, int *yMax); - -void ImfHeaderSetDataWindow (ImfHeader *hdr, - int xMin, int yMin, - int xMax, int yMax); - -void ImfHeaderDataWindow (const ImfHeader *hdr, - int *xMin, int *yMin, - int *xMax, int *yMax); - -void ImfHeaderSetPixelAspectRatio (ImfHeader *hdr, - float pixelAspectRatio); - -float ImfHeaderPixelAspectRatio (const ImfHeader *hdr); - -void ImfHeaderSetScreenWindowCenter (ImfHeader *hdr, - float x, float y); - -void ImfHeaderScreenWindowCenter (const ImfHeader *hdr, - float *x, float *y); - -void ImfHeaderSetScreenWindowWidth (ImfHeader *hdr, - float width); - -float ImfHeaderScreenWindowWidth (const ImfHeader *hdr); - -void ImfHeaderSetLineOrder (ImfHeader *hdr, - int lineOrder); - -int ImfHeaderLineOrder (const ImfHeader *hdr); - -void ImfHeaderSetCompression (ImfHeader *hdr, - int compression); - -int ImfHeaderCompression (const ImfHeader *hdr); - -int ImfHeaderSetIntAttribute (ImfHeader *hdr, - const char name[], - int value); - -int ImfHeaderIntAttribute (const ImfHeader *hdr, - const char name[], - int *value); - -int ImfHeaderSetFloatAttribute (ImfHeader *hdr, - const char name[], - float value); - -int ImfHeaderSetDoubleAttribute (ImfHeader *hdr, - const char name[], - double value); - -int ImfHeaderFloatAttribute (const ImfHeader *hdr, - const char name[], - float *value); - -int ImfHeaderDoubleAttribute (const ImfHeader *hdr, - const char name[], - double *value); - -int ImfHeaderSetStringAttribute (ImfHeader *hdr, - const char name[], - const char value[]); - -int ImfHeaderStringAttribute (const ImfHeader *hdr, - const char name[], - const char **value); - -int ImfHeaderSetBox2iAttribute (ImfHeader *hdr, - const char name[], - int xMin, int yMin, - int xMax, int yMax); - -int ImfHeaderBox2iAttribute (const ImfHeader *hdr, - const char name[], - int *xMin, int *yMin, - int *xMax, int *yMax); - -int ImfHeaderSetBox2fAttribute (ImfHeader *hdr, - const char name[], - float xMin, float yMin, - float xMax, float yMax); - -int ImfHeaderBox2fAttribute (const ImfHeader *hdr, - const char name[], - float *xMin, float *yMin, - float *xMax, float *yMax); - -int ImfHeaderSetV2iAttribute (ImfHeader *hdr, - const char name[], - int x, int y); - -int ImfHeaderV2iAttribute (const ImfHeader *hdr, - const char name[], - int *x, int *y); - -int ImfHeaderSetV2fAttribute (ImfHeader *hdr, - const char name[], - float x, float y); - -int ImfHeaderV2fAttribute (const ImfHeader *hdr, - const char name[], - float *x, float *y); - -int ImfHeaderSetV3iAttribute (ImfHeader *hdr, - const char name[], - int x, int y, int z); - -int ImfHeaderV3iAttribute (const ImfHeader *hdr, - const char name[], - int *x, int *y, int *z); - -int ImfHeaderSetV3fAttribute (ImfHeader *hdr, - const char name[], - float x, float y, float z); - -int ImfHeaderV3fAttribute (const ImfHeader *hdr, - const char name[], - float *x, float *y, float *z); - -int ImfHeaderSetM33fAttribute (ImfHeader *hdr, - const char name[], - const float m[3][3]); - -int ImfHeaderM33fAttribute (const ImfHeader *hdr, - const char name[], - float m[3][3]); - -int ImfHeaderSetM44fAttribute (ImfHeader *hdr, - const char name[], - const float m[4][4]); - -int ImfHeaderM44fAttribute (const ImfHeader *hdr, - const char name[], - float m[4][4]); - -/* -** RGBA output file -*/ - -struct ImfOutputFile; -typedef struct ImfOutputFile ImfOutputFile; - -ImfOutputFile * ImfOpenOutputFile (const char name[], - const ImfHeader *hdr, - int channels); - -int ImfCloseOutputFile (ImfOutputFile *out); - -int ImfOutputSetFrameBuffer (ImfOutputFile *out, - const ImfRgba *base, - size_t xStride, - size_t yStride); - -int ImfOutputWritePixels (ImfOutputFile *out, - int numScanLines); - -int ImfOutputCurrentScanLine (const ImfOutputFile *out); - -const ImfHeader * ImfOutputHeader (const ImfOutputFile *out); - -int ImfOutputChannels (const ImfOutputFile *out); - - -/* -** Tiled RGBA output file -*/ - -struct ImfTiledOutputFile; -typedef struct ImfTiledOutputFile ImfTiledOutputFile; - -ImfTiledOutputFile * ImfOpenTiledOutputFile (const char name[], - const ImfHeader *hdr, - int channels, - int xSize, int ySize, - int mode, int rmode); - -int ImfCloseTiledOutputFile (ImfTiledOutputFile *out); - -int ImfTiledOutputSetFrameBuffer (ImfTiledOutputFile *out, - const ImfRgba *base, - size_t xStride, - size_t yStride); - -int ImfTiledOutputWriteTile (ImfTiledOutputFile *out, - int dx, int dy, - int lx, int ly); - -int ImfTiledOutputWriteTiles (ImfTiledOutputFile *out, - int dxMin, int dxMax, - int dyMin, int dyMax, - int lx, int ly); - -const ImfHeader * ImfTiledOutputHeader (const ImfTiledOutputFile *out); - -int ImfTiledOutputChannels (const ImfTiledOutputFile *out); - -int ImfTiledOutputTileXSize (const ImfTiledOutputFile *out); - -int ImfTiledOutputTileYSize (const ImfTiledOutputFile *out); - -int ImfTiledOutputLevelMode (const ImfTiledOutputFile *out); -int ImfTiledOutputLevelRoundingMode - (const ImfTiledOutputFile *out); - - -/* -** RGBA input file -*/ - -struct ImfInputFile; -typedef struct ImfInputFile ImfInputFile; - -ImfInputFile * ImfOpenInputFile (const char name[]); - -int ImfCloseInputFile (ImfInputFile *in); - -int ImfInputSetFrameBuffer (ImfInputFile *in, - ImfRgba *base, - size_t xStride, - size_t yStride); - -int ImfInputReadPixels (ImfInputFile *in, - int scanLine1, - int scanLine2); - -const ImfHeader * ImfInputHeader (const ImfInputFile *in); - -int ImfInputChannels (const ImfInputFile *in); - -const char * ImfInputFileName (const ImfInputFile *in); - - -/* -** Tiled RGBA input file -*/ - -struct ImfTiledInputFile; -typedef struct ImfTiledInputFile ImfTiledInputFile; - -ImfTiledInputFile * ImfOpenTiledInputFile (const char name[]); - -int ImfCloseTiledInputFile (ImfTiledInputFile *in); - -int ImfTiledInputSetFrameBuffer (ImfTiledInputFile *in, - ImfRgba *base, - size_t xStride, - size_t yStride); - -int ImfTiledInputReadTile (ImfTiledInputFile *in, - int dx, int dy, - int lx, int ly); - -int ImfTiledInputReadTiles (ImfTiledInputFile *in, - int dxMin, int dxMax, - int dyMin, int dyMax, - int lx, int ly); - -const ImfHeader * ImfTiledInputHeader (const ImfTiledInputFile *in); - -int ImfTiledInputChannels (const ImfTiledInputFile *in); - -const char * ImfTiledInputFileName (const ImfTiledInputFile *in); - -int ImfTiledInputTileXSize (const ImfTiledInputFile *in); - -int ImfTiledInputTileYSize (const ImfTiledInputFile *in); - -int ImfTiledInputLevelMode (const ImfTiledInputFile *in); - -int ImfTiledInputLevelRoundingMode - (const ImfTiledInputFile *in); - -/* -** Lookup tables -*/ - -struct ImfLut; -typedef struct ImfLut ImfLut; - -ImfLut * ImfNewRound12logLut (int channels); - -ImfLut * ImfNewRoundNBitLut (unsigned int n, int channels); - -void ImfDeleteLut (ImfLut *lut); - -void ImfApplyLut (ImfLut *lut, - ImfRgba *data, - int nData, - int stride); -/* -** Most recent error message -*/ - -const char * ImfErrorMessage (void); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfChannelList.cpp b/Source/OpenEXR/IlmImf/ImfChannelList.cpp deleted file mode 100644 index 9b1f904..0000000 --- a/Source/OpenEXR/IlmImf/ImfChannelList.cpp +++ /dev/null @@ -1,321 +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; - -namespace Imf { - - -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::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::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::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); - int n = 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); - int 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(); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfChannelList.h b/Source/OpenEXR/IlmImf/ImfChannelList.h deleted file mode 100644 index f3e513a..0000000 --- a/Source/OpenEXR/IlmImf/ImfChannelList.h +++ /dev/null @@ -1,433 +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 -#include -#include -#include -#include - - -namespace Imf { - - -struct 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 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::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); -} - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp b/Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp deleted file mode 100644 index df2790b..0000000 --- a/Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp +++ /dev/null @@ -1,145 +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 - - -namespace Imf { - -namespace { - -template -void checkIsNullTerminated (const char (&str)[N], const char *what) -{ - for (int 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::InputExc(s); -} - -} // namespace - -template <> -const char * -ChannelListAttribute::staticTypeName () -{ - return "chlist"; -} - - -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)); - } -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfChannelListAttribute.h b/Source/OpenEXR/IlmImf/ImfChannelListAttribute.h deleted file mode 100644 index 050ecf9..0000000 --- a/Source/OpenEXR/IlmImf/ImfChannelListAttribute.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_CHANNEL_LIST_ATTRIBUTE_H -#define INCLUDED_IMF_CHANNEL_LIST_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class ChannelListAttribute -// -//----------------------------------------------------------------------------- - -#include -#include - - -namespace Imf { - - -typedef TypedAttribute ChannelListAttribute; -template <> const char *ChannelListAttribute::staticTypeName (); -template <> void ChannelListAttribute::writeValueTo (OStream &, int) const; -template <> void ChannelListAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif - diff --git a/Source/OpenEXR/IlmImf/ImfCheckedArithmetic.h b/Source/OpenEXR/IlmImf/ImfCheckedArithmetic.h deleted file mode 100644 index 00eb93d..0000000 --- a/Source/OpenEXR/IlmImf/ImfCheckedArithmetic.h +++ /dev/null @@ -1,161 +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 - -namespace Imf { - -template struct StaticAssertionFailed; -template <> struct StaticAssertionFailed {}; - -#define IMF_STATIC_ASSERT(x) \ - do {StaticAssertionFailed 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::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::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::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::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::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::OverflowExc ("Integer multiplication overflow."); - - return size_t (n); -} - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfChromaticities.cpp b/Source/OpenEXR/IlmImf/ImfChromaticities.cpp deleted file mode 100644 index 2db9d0e..0000000 --- a/Source/OpenEXR/IlmImf/ImfChromaticities.cpp +++ /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. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// CIE (x,y) chromaticities, and conversions between -// RGB tiples and CIE XYZ tristimulus values. -// -//----------------------------------------------------------------------------- - -#include - -namespace Imf { - - -Chromaticities::Chromaticities (const Imath::V2f &red, - const Imath::V2f &green, - const Imath::V2f &blue, - const Imath::V2f &white) -: - red (red), - green (green), - blue (blue), - white (white) -{ - // empty -} - - -Imath::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::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::M44f -XYZtoRGB (const Chromaticities chroma, float Y) -{ - return RGBtoXYZ (chroma, Y).inverse(); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfChromaticities.h b/Source/OpenEXR/IlmImf/ImfChromaticities.h deleted file mode 100644 index 28e8c51..0000000 --- a/Source/OpenEXR/IlmImf/ImfChromaticities.h +++ /dev/null @@ -1,120 +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" - -namespace Imf { - - -struct 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::V2f red; - Imath::V2f green; - Imath::V2f blue; - Imath::V2f white; - - //-------------------------------------------- - // Default constructor produces chromaticities - // according to Rec. ITU-R BT.709-3 - //-------------------------------------------- - - Chromaticities (const Imath::V2f &red = Imath::V2f (0.6400f, 0.3300f), - const Imath::V2f &green = Imath::V2f (0.3000f, 0.6000f), - const Imath::V2f &blue = Imath::V2f (0.1500f, 0.0600f), - const Imath::V2f &white = Imath::V2f (0.3127f, 0.3290f)); -}; - - -// -// 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(). -// - -Imath::M44f RGBtoXYZ (const Chromaticities chroma, float Y); -Imath::M44f XYZtoRGB (const Chromaticities chroma, float Y); - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp b/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp deleted file mode 100644 index 03f3a8d..0000000 --- a/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp +++ /dev/null @@ -1,86 +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 - - -namespace Imf { - - -template <> -const char * -ChromaticitiesAttribute::staticTypeName () -{ - return "chromaticities"; -} - - -template <> -void -ChromaticitiesAttribute::writeValueTo (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 (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); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.h b/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.h deleted file mode 100644 index 08357fa..0000000 --- a/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.h +++ /dev/null @@ -1,72 +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 -#include - - -namespace Imf { - - -typedef TypedAttribute ChromaticitiesAttribute; - -template <> -const char *ChromaticitiesAttribute::staticTypeName (); - -template <> -void ChromaticitiesAttribute::writeValueTo (OStream &, int) const; - -template <> -void ChromaticitiesAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfCompression.h b/Source/OpenEXR/IlmImf/ImfCompression.h deleted file mode 100644 index 2115943..0000000 --- a/Source/OpenEXR/IlmImf/ImfCompression.h +++ /dev/null @@ -1,75 +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 -// -//----------------------------------------------------------------------------- - -namespace Imf { - - -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 - - NUM_COMPRESSION_METHODS // number of different compression methods -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp b/Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp deleted file mode 100644 index 0c28d16..0000000 --- a/Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp +++ /dev/null @@ -1,76 +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 - - -namespace Imf { - - -template <> -const char * -CompressionAttribute::staticTypeName () -{ - return "compression"; -} - - -template <> -void -CompressionAttribute::writeValueTo (OStream &os, int version) const -{ - unsigned char tmp = _value; - Xdr::write (os, tmp); -} - - -template <> -void -CompressionAttribute::readValueFrom (IStream &is, int size, int version) -{ - unsigned char tmp; - Xdr::read (is, tmp); - _value = Compression (tmp); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfCompressionAttribute.h b/Source/OpenEXR/IlmImf/ImfCompressionAttribute.h deleted file mode 100644 index 268c26b..0000000 --- a/Source/OpenEXR/IlmImf/ImfCompressionAttribute.h +++ /dev/null @@ -1,66 +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 -#include - - -namespace Imf { - - -typedef TypedAttribute CompressionAttribute; -template <> const char *CompressionAttribute::staticTypeName (); -template <> void CompressionAttribute::writeValueTo (OStream &, int) const; -template <> void CompressionAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfCompressor.cpp b/Source/OpenEXR/IlmImf/ImfCompressor.cpp deleted file mode 100644 index 96bde8f..0000000 --- a/Source/OpenEXR/IlmImf/ImfCompressor.cpp +++ /dev/null @@ -1,192 +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 -#include -#include -#include -#include -#include -#include - -namespace Imf { - -using Imath::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: - - 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); - - 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); - - default: - - return 0; - } -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfCompressor.h b/Source/OpenEXR/IlmImf/ImfCompressor.h deleted file mode 100644 index 6039396..0000000 --- a/Source/OpenEXR/IlmImf/ImfCompressor.h +++ /dev/null @@ -1,252 +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 -#include "ImathBox.h" -#include - -namespace Imf { - -class Header; - - -class 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::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::Box2i range, - const char *&outPtr); - - private: - - const Header & _header; -}; - - -//-------------------------------------- -// Test if c is a valid compression type -//-------------------------------------- - -bool isValidCompression (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). -// -//----------------------------------------------------------------- - -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). -// -//----------------------------------------------------------------- - -Compressor * newTileCompressor (Compression c, - size_t tileLineSize, - size_t numTileLines, - const Header &hdr); - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfConvert.cpp b/Source/OpenEXR/IlmImf/ImfConvert.cpp deleted file mode 100644 index 0d6a4a1..0000000 --- a/Source/OpenEXR/IlmImf/ImfConvert.cpp +++ /dev/null @@ -1,139 +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 -#include - -namespace Imf { -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 (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); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfConvert.h b/Source/OpenEXR/IlmImf/ImfConvert.h deleted file mode 100644 index fc2c037..0000000 --- a/Source/OpenEXR/IlmImf/ImfConvert.h +++ /dev/null @@ -1,104 +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" - - -namespace Imf { - -//--------------------------------------------------------- -// 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 -// -//--------------------------------------------------------- - -unsigned int halfToUint (half h); -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 -// -//--------------------------------------------------------- - -half uintToHalf (unsigned int ui); -half floatToHalf (float f); - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfDoubleAttribute.cpp b/Source/OpenEXR/IlmImf/ImfDoubleAttribute.cpp deleted file mode 100644 index 1ed40c0..0000000 --- a/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 - - -namespace Imf { - - -template <> -const char * -DoubleAttribute::staticTypeName () -{ - return "double"; -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfDoubleAttribute.h b/Source/OpenEXR/IlmImf/ImfDoubleAttribute.h deleted file mode 100644 index bafd1ef..0000000 --- a/Source/OpenEXR/IlmImf/ImfDoubleAttribute.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_DOUBLE_ATTRIBUTE_H -#define INCLUDED_IMF_DOUBLE_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class DoubleAttribute -// -//----------------------------------------------------------------------------- - -#include - - -namespace Imf { - - -typedef TypedAttribute DoubleAttribute; -template <> const char *DoubleAttribute::staticTypeName (); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfEnvmap.cpp b/Source/OpenEXR/IlmImf/ImfEnvmap.cpp deleted file mode 100644 index fdb04ac..0000000 --- a/Source/OpenEXR/IlmImf/ImfEnvmap.cpp +++ /dev/null @@ -1,328 +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 -#include "ImathFun.h" -#include -#include - -using namespace std; -using namespace Imath; - -namespace Imf { -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 = -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 * 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 * M_PI) + 0.5f; - float y = latLong.x / -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 -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfEnvmap.h b/Source/OpenEXR/IlmImf/ImfEnvmap.h deleted file mode 100644 index 30c61e7..0000000 --- a/Source/OpenEXR/IlmImf/ImfEnvmap.h +++ /dev/null @@ -1,322 +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" - -namespace Imf { - -//-------------------------------- -// 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. - //---------------------------------------------------- - - Imath::V2f latLong (const Imath::V3f &direction); - - - //-------------------------------------------------------- - // Convert the position of a pixel to a 2D vector whose - // x and y components represent the corresponding latitude - // and longitude. - //-------------------------------------------------------- - - Imath::V2f latLong (const Imath::Box2i &dataWindow, - const Imath::V2f &pixelPosition); - - - //------------------------------------------------------------- - // Convert a 2D vector, whose x and y components represent - // longitude and latitude, into a corresponding pixel position. - //------------------------------------------------------------- - - Imath::V2f pixelPosition (const Imath::Box2i &dataWindow, - const Imath::V2f &latLong); - - - //----------------------------------------------------- - // Convert a 3D direction vector into a corresponding - // pixel position. pixelPosition(dw,dir) is equivalent - // to pixelPosition(dw,latLong(dw,dir)). - //----------------------------------------------------- - - Imath::V2f pixelPosition (const Imath::Box2i &dataWindow, - const Imath::V3f &direction); - - - //-------------------------------------------------------- - // Convert the position of a pixel in a latitude-longitude - // map into a corresponding 3D direction. - //-------------------------------------------------------- - - Imath::V3f direction (const Imath::Box2i &dataWindow, - const Imath::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 - //--------------------------------------------- - - int sizeOfFace (const Imath::Box2i &dataWindow); - - - //------------------------------------------ - // Compute the region in the environment map - // that is covered by the specified face. - //------------------------------------------ - - Imath::Box2i dataWindowForFace (CubeMapFace face, - const Imath::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. - //---------------------------------------------------- - - Imath::V2f pixelPosition (CubeMapFace face, - const Imath::Box2i &dataWindow, - Imath::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); - // - //-------------------------------------------------------------- - - void faceAndPixelPosition (const Imath::V3f &direction, - const Imath::Box2i &dataWindow, - CubeMapFace &face, - Imath::V2f &positionInFace); - - - // -------------------------------------------------------- - // Given a cube face and a pixel position within that face, - // compute the corresponding 3D direction. - // -------------------------------------------------------- - - Imath::V3f direction (CubeMapFace face, - const Imath::Box2i &dataWindow, - const Imath::V2f &positionInFace); -} - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp b/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp deleted file mode 100644 index 03a7928..0000000 --- a/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp +++ /dev/null @@ -1,75 +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 - - -namespace Imf { - - -template <> -const char * -EnvmapAttribute::staticTypeName () -{ - return "envmap"; -} - - -template <> -void -EnvmapAttribute::writeValueTo (OStream &os, int version) const -{ - unsigned char tmp = _value; - Xdr::write (os, tmp); -} - - -template <> -void -EnvmapAttribute::readValueFrom (IStream &is, int size, int version) -{ - unsigned char tmp; - Xdr::read (is, tmp); - _value = Envmap (tmp); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.h b/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.h deleted file mode 100644 index 716883f..0000000 --- a/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.h +++ /dev/null @@ -1,65 +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 -#include - - -namespace Imf { - - -typedef TypedAttribute EnvmapAttribute; -template <> const char *EnvmapAttribute::staticTypeName (); -template <> void EnvmapAttribute::writeValueTo (OStream &, int) const; -template <> void EnvmapAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfFloatAttribute.cpp b/Source/OpenEXR/IlmImf/ImfFloatAttribute.cpp deleted file mode 100644 index 22366c3..0000000 --- a/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 - - -namespace Imf { - - -template <> -const char * -FloatAttribute::staticTypeName () -{ - return "float"; -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfFloatAttribute.h b/Source/OpenEXR/IlmImf/ImfFloatAttribute.h deleted file mode 100644 index 60d6f23..0000000 --- a/Source/OpenEXR/IlmImf/ImfFloatAttribute.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_FLOAT_ATTRIBUTE_H -#define INCLUDED_IMF_FLOAT_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class FloatAttribute -// -//----------------------------------------------------------------------------- - -#include - - -namespace Imf { - - -typedef TypedAttribute FloatAttribute; -template <> const char *FloatAttribute::staticTypeName (); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp b/Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp deleted file mode 100644 index f4c8fd0..0000000 --- a/Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp +++ /dev/null @@ -1,226 +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; - -namespace Imf { - -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::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::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::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()); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfFrameBuffer.h b/Source/OpenEXR/IlmImf/ImfFrameBuffer.h deleted file mode 100644 index 3b6cc92..0000000 --- a/Source/OpenEXR/IlmImf/ImfFrameBuffer.h +++ /dev/null @@ -1,383 +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 -#include -#include -#include - - -namespace Imf { - - -//------------------------------------------------------- -// 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 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 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::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); -} - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp b/Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp deleted file mode 100644 index cc533a0..0000000 --- a/Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp +++ /dev/null @@ -1,75 +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 Imf { - -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; -} - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfFramesPerSecond.h b/Source/OpenEXR/IlmImf/ImfFramesPerSecond.h deleted file mode 100644 index cbef984..0000000 --- a/Source/OpenEXR/IlmImf/ImfFramesPerSecond.h +++ /dev/null @@ -1,88 +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 - -namespace Imf { - -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);} - -Rational guessExactFps (double fps); -Rational guessExactFps (const Rational &fps); - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfHeader.cpp b/Source/OpenEXR/IlmImf/ImfHeader.cpp deleted file mode 100644 index e64300a..0000000 --- a/Source/OpenEXR/IlmImf/ImfHeader.cpp +++ /dev/null @@ -1,1106 +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 "IlmThreadMutex.h" -#include "Iex.h" -#include -#include -#include - - -namespace Imf { - -using namespace std; -using Imath::Box2i; -using Imath::V2i; -using Imath::V2f; -using IlmThread::Mutex; -using IlmThread::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 ()); -} - - -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; -} - -template -void checkIsNullTerminated (const char (&str)[N], const char *what) -{ - for (int 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::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::insert (const char name[], const Attribute &attribute) -{ - if (name[0] == 0) - THROW (Iex::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::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::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::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::Box2i & -Header::displayWindow () -{ - return static_cast - ((*this)["displayWindow"]).value(); -} - - -const Imath::Box2i & -Header::displayWindow () const -{ - return static_cast - ((*this)["displayWindow"]).value(); -} - - -Imath::Box2i & -Header::dataWindow () -{ - return static_cast - ((*this)["dataWindow"]).value(); -} - - -const Imath::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::V2f & -Header::screenWindowCenter () -{ - return static_cast - ((*this)["screenWindowCenter"]).value(); -} - - -const Imath::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::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) 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::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::ArgExc ("Invalid data window in image header."); - } - - if (maxImageWidth > 0 && - maxImageWidth < dataWindow.max.x - dataWindow.min.x + 1) - { - THROW (Iex::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::ArgExc, "The width of the data window exceeds the " - "maximum width of " << 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::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::ArgExc ("Invalid screen window width in image header."); - - // - // If the file is tiled, verify that the tile description has resonable - // 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::ArgExc ("Tiled image has no tile " - "description attribute."); - } - - const TileDescription &tileDesc = tileDescription(); - - if (tileDesc.xSize <= 0 || tileDesc.ySize <= 0) - throw Iex::ArgExc ("Invalid tile size in image header."); - - if (maxTileWidth > 0 && - maxTileWidth < tileDesc.xSize) - { - THROW (Iex::ArgExc, "The width of the tiles exceeds the maximum " - "width of " << maxTileWidth << "pixels."); - } - - if (maxTileHeight > 0 && - maxTileHeight < tileDesc.ySize) - { - THROW (Iex::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::ArgExc ("Invalid level mode in image header."); - - if (tileDesc.roundingMode != ROUND_UP && - tileDesc.roundingMode != ROUND_DOWN) - throw Iex::ArgExc ("Invalid level rounding mode in image header."); - - if (lineOrder != INCREASING_Y && - lineOrder != DECREASING_Y && - lineOrder != RANDOM_Y) - throw Iex::ArgExc ("Invalid line order in image header."); - } - else - { - if (lineOrder != INCREASING_Y && - lineOrder != DECREASING_Y) - throw Iex::ArgExc ("Invalid line order in image header."); - } - - // - // The compression method must be one of the predefined values. - // - - if (!isValidCompression (this->compression())) - throw Iex::ArgExc ("Unknown compression type in image header."); - - // - // 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 != UINT && - i.channel().type != HALF && - i.channel().type != FLOAT) - { - THROW (Iex::ArgExc, "Pixel type of \"" << i.name() << "\" " - "image channel is invalid."); - } - - if (i.channel().xSampling != 1) - { - THROW (Iex::ArgExc, "The x subsampling factor for the " - "\"" << i.name() << "\" channel " - "is not 1."); - } - - if (i.channel().ySampling != 1) - { - THROW (Iex::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 != UINT && - i.channel().type != HALF && - i.channel().type != FLOAT) - { - THROW (Iex::ArgExc, "Pixel type of \"" << i.name() << "\" " - "image channel is invalid."); - } - - if (i.channel().xSampling < 1) - { - THROW (Iex::ArgExc, "The x subsampling factor for the " - "\"" << i.name() << "\" channel " - "is invalid."); - } - - if (i.channel().ySampling < 1) - { - THROW (Iex::ArgExc, "The y subsampling factor for the " - "\"" << i.name() << "\" channel " - "is invalid."); - } - - if (dataWindow.min.x % i.channel().xSampling) - { - THROW (Iex::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::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::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::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; -} - - -Int64 -Header::writeTo (OStream &os, bool isTiled) const -{ - // - // Write a "magic number" to identify the file as an image file. - // Write the current file format version number. - // - - Xdr::write (os, MAGIC); - - int version = EXR_VERSION; - - if (isTiled) - version |= TILED_FLAG; - - if (usesLongNames (*this)) - version |= LONG_NAMES_FLAG; - - Xdr::write (os, 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. - // - - Xdr::write (os, i.name()); - 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(); - Xdr::write (os, (int) s.length()); - - if (&i.attribute() == preview) - previewPosition = os.tellp(); - - os.write (s.data(), s.length()); - } - - // - // Write zero-length attribute name to mark the end of the header. - // - - Xdr::write (os, ""); - - return previewPosition; -} - - -void -Header::readFrom (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; - - Xdr::read (is, magic); - Xdr::read (is, version); - - if (magic != MAGIC) - { - throw Iex::InputExc ("File is not an image file."); - } - - if (getVersion (version) != EXR_VERSION) - { - THROW (Iex::InputExc, "Cannot read " - "version " << getVersion (version) << " " - "image files. Current file format version " - "is " << EXR_VERSION << "."); - } - - if (!supportsFlags (getFlags (version))) - { - THROW (Iex::InputExc, "The file format version number's flag field " - "contains unrecognized flags."); - } - - // - // Read all attributes. - // - - while (true) - { - // - // Read the name of the attribute. - // A zero-length attribute name indicates the end of the header. - // - - char name[Name::SIZE]; - Xdr::read (is, Name::MAX_LENGTH, name); - - if (name[0] == 0) - break; - - checkIsNullTerminated (name, "attribute name"); - - // - // Read the attribute type and the size of the attribute value. - // - - char typeName[Name::SIZE]; - int size; - - Xdr::read (is, Name::MAX_LENGTH, typeName); - checkIsNullTerminated (typeName, "attribute type name"); - 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::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(); - DoubleAttribute::registerAttributeType(); - EnvmapAttribute::registerAttributeType(); - FloatAttribute::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(); - - initialized = true; - } -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfHeader.h b/Source/OpenEXR/IlmImf/ImfHeader.h deleted file mode 100644 index bec6bc1..0000000 --- a/Source/OpenEXR/IlmImf/ImfHeader.h +++ /dev/null @@ -1,627 +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 -#include -#include -#include -#include -#include "ImathVec.h" -#include "ImathBox.h" -#include "IexBaseExc.h" -#include -#include -#include - -namespace Imf { - - -class Attribute; -class ChannelList; -class IStream; -class OStream; -class PreviewImage; - - -class 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::V2f &screenWindowCenter = Imath::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::Box2i &dataWindow, - float pixelAspectRatio = 1, - const Imath::V2f &screenWindowCenter = Imath::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::Box2i &displayWindow, - const Imath::Box2i &dataWindow, - float pixelAspectRatio = 1, - const Imath::V2f &screenWindowCenter = Imath::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::TypeExc - // is thrown. - // - //--------------------------------------------------------------- - - void insert (const char name[], - const Attribute &attribute); - - void insert (const std::string &name, - const Attribute &attribute); - - //------------------------------------------------------------------ - // Access to existing attributes: - // - // [n] Returns a reference to the attribute - // with name n. If no attribute with - // name n exists, an Iex::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::ArgExc is - // thrown. If an attribute with name n - // exists, but its type is not T, an - // Iex::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::Box2i & displayWindow (); - const Imath::Box2i & displayWindow () const; - - Imath::Box2i & dataWindow (); - const Imath::Box2i & dataWindow () const; - - float & pixelAspectRatio (); - const float & pixelAspectRatio () const; - - Imath::V2f & screenWindowCenter (); - const Imath::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; - - - //---------------------------------------------------------------------- - // 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) 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); - - - //------------------------------------------------------------------ - // 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 (OStream &os, - bool isTiled = false) const; - - void readFrom (IStream &is, int &version); - - private: - - AttributeMap _map; -}; - - -//---------- -// 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::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::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()); -} - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfHuf.cpp b/Source/OpenEXR/IlmImf/ImfHuf.cpp deleted file mode 100644 index 0de7d34..0000000 --- a/Source/OpenEXR/IlmImf/ImfHuf.cpp +++ /dev/null @@ -1,1086 +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 -#include "Iex.h" -#include -#include -#include - - -using namespace std; -using namespace Iex; - -namespace Imf { -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 = (char *) 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) -{ - static const int RLMIN = 32; // min count to activate run-length coding - - if (runCount > RLMIN) - { - 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, oe) \ -{ \ - if (po == rlc) \ - { \ - if (lc < 8) \ - getChar(c, lc, in); \ - \ - lc -= 8; \ - \ - unsigned char cs = (c >> lc); \ - \ - if (out + cs > oe) \ - tooMuchData(); \ - \ - 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, 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, 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, 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, iM; - 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; - - 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); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfHuf.h b/Source/OpenEXR/IlmImf/ImfHuf.h deleted file mode 100644 index 5134dfd..0000000 --- a/Source/OpenEXR/IlmImf/ImfHuf.h +++ /dev/null @@ -1,79 +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 - - -//----------------------------------------------------------------------------- -// -// 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). -// -//----------------------------------------------------------------------------- - -namespace Imf { - - -int -hufCompress (const unsigned short raw[/*nRaw*/], - int nRaw, - char compressed[/*2 * nRaw + 65536*/]); - - -void -hufUncompress (const char compressed[/*nCompressed*/], - int nCompressed, - unsigned short raw[/*nRaw*/], - int nRaw); - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfIO.cpp b/Source/OpenEXR/IlmImf/ImfIO.cpp deleted file mode 100644 index 711cdbb..0000000 --- a/Source/OpenEXR/IlmImf/ImfIO.cpp +++ /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. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// Low-level file input and output for OpenEXR. -// -//----------------------------------------------------------------------------- - -#include -#include "Iex.h" - -namespace Imf { - - -IStream::IStream (const char fileName[]): _fileName (fileName) -{ - // empty -} - - -IStream::~IStream () -{ - // empty -} - - -bool -IStream::isMemoryMapped () const -{ - return false; -} - - -char * -IStream::readMemoryMapped (int n) -{ - throw Iex::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(); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfIO.h b/Source/OpenEXR/IlmImf/ImfIO.h deleted file mode 100644 index 44f51a3..0000000 --- a/Source/OpenEXR/IlmImf/ImfIO.h +++ /dev/null @@ -1,252 +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 -#include - -namespace Imf { - -//----------------------------------------------------------- -// class IStream -- an abstract base class for input streams. -//----------------------------------------------------------- - -class 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 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; - } -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfInputFile.cpp b/Source/OpenEXR/IlmImf/ImfInputFile.cpp deleted file mode 100644 index e8b6425..0000000 --- a/Source/OpenEXR/IlmImf/ImfInputFile.cpp +++ /dev/null @@ -1,648 +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 -#include -#include -#include -#include -#include -#include -#include "ImathFun.h" -#include "IlmThreadMutex.h" -#include "Iex.h" -#include "half.h" -#include -#include - - -namespace Imf { - - -using Imath::Box2i; -using Imath::divp; -using Imath::modp; -using IlmThread::Mutex; -using IlmThread::Lock; - - -// -// Struct InputFile::Data stores things that will be -// needed between calls to readPixels -// - -struct InputFile::Data: public Mutex -{ - Header header; - int version; - IStream * is; - bool deleteStream; - - TiledInputFile * tFile; - ScanLineInputFile * sFile; - - 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; - - int cachedTileY; - int offset; - - int numThreads; - - Data (bool del, int numThreads); - ~Data (); - - void deleteCachedBuffer(); -}; - - -InputFile::Data::Data (bool del, int numThreads): - is (0), - deleteStream (del), - tFile (0), - sFile (0), - cachedBuffer (0), - cachedTileY (-1), - numThreads (numThreads) -{ - // empty -} - - -InputFile::Data::~Data () -{ - delete tFile; - delete sFile; - - if (deleteStream) - delete is; - - deleteCachedBuffer(); -} - - -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 UINT: - - delete [] (((unsigned int *)s.base) + offset); - break; - - case HALF: - - delete [] ((half *)s.base + offset); - break; - - case FLOAT: - - delete [] (((float *)s.base) + offset); - break; - } - } - - // - // 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::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 (size_t 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 (true, numThreads)) -{ - try - { - _data->is = new StdIFStream (fileName); - initialize(); - } - catch (Iex::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot read image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - delete _data; - throw; - } -} - - -InputFile::InputFile (IStream &is, int numThreads): - _data (new Data (false, numThreads)) -{ - try - { - _data->is = &is; - initialize(); - } - catch (Iex::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot read image file " - "\"" << is.fileName() << "\". " << e); - throw; - } - catch (...) - { - delete _data; - throw; - } -} - - -void -InputFile::initialize () -{ - _data->header.readFrom (*_data->is, _data->version); - _data->header.sanityCheck (isTiled (_data->version)); - - if (isTiled (_data->version)) - { - _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->is, - _data->version, - _data->numThreads); - } - else - { - _data->sFile = new ScanLineInputFile (_data->header, - _data->is, - _data->numThreads); - } -} - - -InputFile::~InputFile () -{ - delete _data; -} - - -const char * -InputFile::fileName () const -{ - return _data->is->fileName(); -} - - -const Header & -InputFile::header () const -{ - return _data->header; -} - - -int -InputFile::version () const -{ - return _data->version; -} - - -void -InputFile::setFrameBuffer (const FrameBuffer &frameBuffer) -{ - if (isTiled (_data->version)) - { - 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 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 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 FLOAT: - - _data->cachedBuffer->insert - (k.name(), - Slice (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::ArgExc ("Unknown pixel data type."); - } - } - - _data->tFile->setFrameBuffer (*_data->cachedBuffer); - } - - _data->tFileBuffer = frameBuffer; - } - else - { - _data->sFile->setFrameBuffer (frameBuffer); - } -} - - -const FrameBuffer & -InputFile::frameBuffer () const -{ - if (isTiled (_data->version)) - { - Lock lock (*_data); - return _data->tFileBuffer; - } - else - { - return _data->sFile->frameBuffer(); - } -} - - -bool -InputFile::isComplete () const -{ - if (isTiled (_data->version)) - return _data->tFile->isComplete(); - else - return _data->sFile->isComplete(); -} - - -void -InputFile::readPixels (int scanLine1, int scanLine2) -{ - if (isTiled (_data->version)) - { - 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 (isTiled (_data->version)) - { - throw Iex::ArgExc ("Tried to read a raw scanline " - "from a tiled image."); - } - - _data->sFile->rawPixelData (firstScanLine, pixelData, pixelDataSize); - } - catch (Iex::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 (!isTiled (_data->version)) - { - throw Iex::ArgExc ("Tried to read a raw tile " - "from a scanline-based image."); - } - - _data->tFile->rawTileData (dx, dy, lx, ly, pixelData, pixelDataSize); - } - catch (Iex::BaseExc &e) - { - REPLACE_EXC (e, "Error reading tile data from image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -TiledInputFile* -InputFile::tFile() -{ - if (!isTiled (_data->version)) - { - throw Iex::ArgExc ("Cannot get a TiledInputFile pointer " - "from an InputFile that is not tiled."); - } - - return _data->tFile; -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfInputFile.h b/Source/OpenEXR/IlmImf/ImfInputFile.h deleted file mode 100644 index af9256b..0000000 --- a/Source/OpenEXR/IlmImf/ImfInputFile.h +++ /dev/null @@ -1,209 +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 -#include -#include -#include -#include -#include - -namespace Imf { - -class TiledInputFile; -class ScanLineInputFile; - - -class InputFile -{ - 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 (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; - - - //--------------------------------------------------------------- - // 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 (const InputFile &); // not implemented - InputFile & operator = (const InputFile &); // not implemented - - void initialize (); - TiledInputFile * tFile (); - - friend void TiledOutputFile::copyPixels (InputFile &); - - Data * _data; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfInt64.h b/Source/OpenEXR/IlmImf/ImfInt64.h deleted file mode 100644 index d8fdc81..0000000 --- a/Source/OpenEXR/IlmImf/ImfInt64.h +++ /dev/null @@ -1,52 +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" - -namespace Imf { - -using Imath::Int64; - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfIntAttribute.cpp b/Source/OpenEXR/IlmImf/ImfIntAttribute.cpp deleted file mode 100644 index f233b58..0000000 --- a/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 - - -namespace Imf { - - -template <> -const char * -IntAttribute::staticTypeName () -{ - return "int"; -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfIntAttribute.h b/Source/OpenEXR/IlmImf/ImfIntAttribute.h deleted file mode 100644 index c67e5b1..0000000 --- a/Source/OpenEXR/IlmImf/ImfIntAttribute.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_INT_ATTRIBUTE_H -#define INCLUDED_IMF_INT_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class IntAttribute -// -//----------------------------------------------------------------------------- - -#include - - -namespace Imf { - - -typedef TypedAttribute IntAttribute; -template <> const char *IntAttribute::staticTypeName (); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfKeyCode.cpp b/Source/OpenEXR/IlmImf/ImfKeyCode.cpp deleted file mode 100644 index b199cf5..0000000 --- a/Source/OpenEXR/IlmImf/ImfKeyCode.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. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class KeyCode -// -//----------------------------------------------------------------------------- - -#include -#include "Iex.h" - -namespace Imf { - - -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::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::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::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::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::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::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::ArgExc ("Invalid key code number of perforations per count " - "(must be between 20 and 120)."); - - _perfsPerCount = perfsPerCount; -} - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfKeyCode.h b/Source/OpenEXR/IlmImf/ImfKeyCode.h deleted file mode 100644 index 93dd915..0000000 --- a/Source/OpenEXR/IlmImf/ImfKeyCode.h +++ /dev/null @@ -1,161 +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 -// -//----------------------------------------------------------------------------- - -namespace Imf { - - -class 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; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp b/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp deleted file mode 100644 index 00156bd..0000000 --- a/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp +++ /dev/null @@ -1,98 +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 - -namespace Imf { - - -template <> -const char * -KeyCodeAttribute::staticTypeName () -{ - return "keycode"; -} - - -template <> -void -KeyCodeAttribute::writeValueTo (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 (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); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.h b/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.h deleted file mode 100644 index 9ec8f84..0000000 --- a/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.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_KEY_CODE_ATTRIBUTE_H -#define INCLUDED_IMF_KEY_CODE_ATTRIBUTE_H - - -//----------------------------------------------------------------------------- -// -// class KeyCodeAttribute -// -//----------------------------------------------------------------------------- - -#include -#include - - -namespace Imf { - - -typedef TypedAttribute KeyCodeAttribute; - -template <> -const char *KeyCodeAttribute::staticTypeName (); - -template <> -void KeyCodeAttribute::writeValueTo (OStream &, int) const; - -template <> -void KeyCodeAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfLineOrder.h b/Source/OpenEXR/IlmImf/ImfLineOrder.h deleted file mode 100644 index 2f91352..0000000 --- a/Source/OpenEXR/IlmImf/ImfLineOrder.h +++ /dev/null @@ -1,64 +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 -// -//----------------------------------------------------------------------------- - -namespace Imf { - - -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 -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp b/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp deleted file mode 100644 index 6b9c0f9..0000000 --- a/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp +++ /dev/null @@ -1,77 +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 - - -namespace Imf { - - -template <> -const char * -LineOrderAttribute::staticTypeName () -{ - return "lineOrder"; -} - - -template <> -void -LineOrderAttribute::writeValueTo (OStream &os, int version) const -{ - unsigned char tmp = _value; - Xdr::write (os, tmp); -} - - -template <> -void -LineOrderAttribute::readValueFrom (IStream &is, int size, int version) -{ - unsigned char tmp; - Xdr::read (is, tmp); - _value = LineOrder (tmp); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.h b/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.h deleted file mode 100644 index eb9301e..0000000 --- a/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.h +++ /dev/null @@ -1,66 +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 -#include - - -namespace Imf { - - -typedef TypedAttribute LineOrderAttribute; -template <> const char *LineOrderAttribute::staticTypeName (); -template <> void LineOrderAttribute::writeValueTo (OStream &, int) const; -template <> void LineOrderAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfLut.cpp b/Source/OpenEXR/IlmImf/ImfLut.cpp deleted file mode 100644 index 284bd21..0000000 --- a/Source/OpenEXR/IlmImf/ImfLut.cpp +++ /dev/null @@ -1,176 +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 - -namespace Imf { - - -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::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::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); -} - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfLut.h b/Source/OpenEXR/IlmImf/ImfLut.h deleted file mode 100644 index ca702d2..0000000 --- a/Source/OpenEXR/IlmImf/ImfLut.h +++ /dev/null @@ -1,185 +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 -#include -#include "ImathBox.h" -#include "halfFunction.h" - -namespace Imf { - -// -// Lookup table for individual half channels. -// - -class 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::Box2i &dataWindow) const; - - private: - - halfFunction _lut; -}; - - -// -// Lookup table for combined RGBA data. -// - -class 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::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. -// - -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 -} - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp b/Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp deleted file mode 100644 index f4e447a..0000000 --- a/Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp +++ /dev/null @@ -1,260 +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 - - -namespace Imf { - - -template <> -const char * -M33fAttribute::staticTypeName () -{ - return "m33f"; -} - - -template <> -void -M33fAttribute::writeValueTo (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 (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 (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 (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 (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 (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 (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 (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]); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfMatrixAttribute.h b/Source/OpenEXR/IlmImf/ImfMatrixAttribute.h deleted file mode 100644 index 2bb515b..0000000 --- a/Source/OpenEXR/IlmImf/ImfMatrixAttribute.h +++ /dev/null @@ -1,87 +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 -#include "ImathMatrix.h" - - -namespace Imf { - - -typedef TypedAttribute M33fAttribute; -template <> const char *M33fAttribute::staticTypeName (); -template <> void M33fAttribute::writeValueTo (OStream &, int) const; -template <> void M33fAttribute::readValueFrom (IStream &, int, int); - - -typedef TypedAttribute M33dAttribute; -template <> const char *M33dAttribute::staticTypeName (); -template <> void M33dAttribute::writeValueTo (OStream &, int) const; -template <> void M33dAttribute::readValueFrom (IStream &, int, int); - - -typedef TypedAttribute M44fAttribute; -template <> const char *M44fAttribute::staticTypeName (); -template <> void M44fAttribute::writeValueTo (OStream &, int) const; -template <> void M44fAttribute::readValueFrom (IStream &, int, int); - - -typedef TypedAttribute M44dAttribute; -template <> const char *M44dAttribute::staticTypeName (); -template <> void M44dAttribute::writeValueTo (OStream &, int) const; -template <> void M44dAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfMisc.cpp b/Source/OpenEXR/IlmImf/ImfMisc.cpp deleted file mode 100644 index e13f390..0000000 --- a/Source/OpenEXR/IlmImf/ImfMisc.cpp +++ /dev/null @@ -1,787 +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 - -namespace Imf { - -using Imath::Box2i; -using Imath::divp; -using Imath::modp; -using std::vector; - -int -pixelTypeSize (PixelType type) -{ - int size; - - switch (type) - { - case UINT: - - size = Xdr::size (); - break; - - case HALF: - - size = Xdr::size (); - break; - - case FLOAT: - - size = Xdr::size (); - break; - - default: - - throw Iex::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; -} - - -void -offsetInLineBufferTable (const vector &bytesPerLine, - int linesInLineBuffer, - vector &offsetInLineBuffer) -{ - offsetInLineBuffer.resize (bytesPerLine.size()); - - size_t offset = 0; - - for (int i = 0; i < bytesPerLine.size(); ++i) - { - if (i % linesInLineBuffer == 0) - offset = 0; - - offsetInLineBuffer[i] = offset; - offset += bytesPerLine[i]; - } -} - - -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 UINT: - - { - unsigned int fillVal = (unsigned int) (fillValue); - - while (writePtr <= endPtr) - { - *(unsigned int *) writePtr = fillVal; - writePtr += xStride; - } - } - break; - - case HALF: - - { - half fillVal = half (fillValue); - - while (writePtr <= endPtr) - { - *(half *) writePtr = fillVal; - writePtr += xStride; - } - } - break; - - case FLOAT: - - { - float fillVal = float (fillValue); - - while (writePtr <= endPtr) - { - *(float *) writePtr = fillVal; - writePtr += xStride; - } - } - break; - - default: - - throw Iex::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 UINT: - - switch (typeInFile) - { - case UINT: - - while (writePtr <= endPtr) - { - Xdr::read (readPtr, *(unsigned int *) writePtr); - writePtr += xStride; - } - break; - - case HALF: - - while (writePtr <= endPtr) - { - half h; - Xdr::read (readPtr, h); - *(unsigned int *) writePtr = halfToUint (h); - writePtr += xStride; - } - break; - - case FLOAT: - - while (writePtr <= endPtr) - { - float f; - Xdr::read (readPtr, f); - *(unsigned int *)writePtr = floatToUint (f); - writePtr += xStride; - } - break; - } - break; - - case HALF: - - switch (typeInFile) - { - case UINT: - - while (writePtr <= endPtr) - { - unsigned int ui; - Xdr::read (readPtr, ui); - *(half *) writePtr = uintToHalf (ui); - writePtr += xStride; - } - break; - - case HALF: - - while (writePtr <= endPtr) - { - Xdr::read (readPtr, *(half *) writePtr); - writePtr += xStride; - } - break; - - case FLOAT: - - while (writePtr <= endPtr) - { - float f; - Xdr::read (readPtr, f); - *(half *) writePtr = floatToHalf (f); - writePtr += xStride; - } - break; - } - break; - - case FLOAT: - - switch (typeInFile) - { - case UINT: - - while (writePtr <= endPtr) - { - unsigned int ui; - Xdr::read (readPtr, ui); - *(float *) writePtr = float (ui); - writePtr += xStride; - } - break; - - case HALF: - - while (writePtr <= endPtr) - { - half h; - Xdr::read (readPtr, h); - *(float *) writePtr = float (h); - writePtr += xStride; - } - break; - - case FLOAT: - - while (writePtr <= endPtr) - { - Xdr::read (readPtr, *(float *) writePtr); - writePtr += xStride; - } - break; - } - break; - - default: - - throw Iex::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 UINT: - - switch (typeInFile) - { - case 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 HALF: - - while (writePtr <= endPtr) - { - half h = *(half *) readPtr; - *(unsigned int *) writePtr = halfToUint (h); - readPtr += sizeof (half); - writePtr += xStride; - } - break; - - case 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; - } - break; - - case HALF: - - switch (typeInFile) - { - case 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 HALF: - - while (writePtr <= endPtr) - { - *(half *) writePtr = *(half *)readPtr; - readPtr += sizeof (half); - writePtr += xStride; - } - break; - - case 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; - } - break; - - case FLOAT: - - switch (typeInFile) - { - case 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 HALF: - - while (writePtr <= endPtr) - { - half h = *(half *) readPtr; - *(float *) writePtr = float (h); - readPtr += sizeof (half); - writePtr += xStride; - } - break; - - case FLOAT: - - while (writePtr <= endPtr) - { - for (size_t i = 0; i < sizeof (float); ++i) - writePtr[i] = readPtr[i]; - - readPtr += sizeof (float); - writePtr += xStride; - } - break; - } - break; - - default: - - throw Iex::ArgExc ("Unknown pixel data type."); - } - } -} - - -void -skipChannel (const char *& readPtr, - PixelType typeInFile, - size_t xSize) -{ - switch (typeInFile) - { - case UINT: - - Xdr::skip (readPtr, Xdr::size () * xSize); - break; - - case HALF: - - Xdr::skip (readPtr, Xdr::size () * xSize); - break; - - case FLOAT: - - Xdr::skip (readPtr, Xdr::size () * xSize); - break; - - default: - - throw Iex::ArgExc ("Unknown pixel data type."); - } -} - - -void -convertInPlace (char *& writePtr, - const char *& readPtr, - PixelType type, - size_t numPixels) -{ - switch (type) - { - case UINT: - - for (int j = 0; j < numPixels; ++j) - { - Xdr::write (writePtr, *(const unsigned int *) readPtr); - readPtr += sizeof(unsigned int); - } - break; - - case HALF: - - for (int j = 0; j < numPixels; ++j) - { - Xdr::write (writePtr, *(const half *) readPtr); - readPtr += sizeof(half); - } - break; - - case FLOAT: - - for (int j = 0; j < numPixels; ++j) - { - Xdr::write (writePtr, *(const float *) readPtr); - readPtr += sizeof(float); - } - break; - - default: - - throw Iex::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 UINT: - - while (readPtr <= endPtr) - { - Xdr::write (writePtr, - *(const unsigned int *) readPtr); - readPtr += xStride; - } - break; - - case HALF: - - while (readPtr <= endPtr) - { - Xdr::write (writePtr, *(const half *) readPtr); - readPtr += xStride; - } - break; - - case FLOAT: - - while (readPtr <= endPtr) - { - Xdr::write (writePtr, *(const float *) readPtr); - readPtr += xStride; - } - break; - - default: - - throw Iex::ArgExc ("Unknown pixel data type."); - } - } - else - { - // - // The the line or tile buffer is in NATIVE format. - // - - switch (type) - { - case UINT: - - while (readPtr <= endPtr) - { - for (size_t i = 0; i < sizeof (unsigned int); ++i) - *writePtr++ = readPtr[i]; - - readPtr += xStride; - } - break; - - case HALF: - - while (readPtr <= endPtr) - { - *(half *) writePtr = *(const half *) readPtr; - writePtr += sizeof (half); - readPtr += xStride; - } - break; - - case FLOAT: - - while (readPtr <= endPtr) - { - for (size_t i = 0; i < sizeof (float); ++i) - *writePtr++ = readPtr[i]; - - readPtr += xStride; - } - break; - - default: - - throw Iex::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 UINT: - - for (int j = 0; j < xSize; ++j) - Xdr::write (writePtr, (unsigned int) 0); - - break; - - case HALF: - - for (int j = 0; j < xSize; ++j) - Xdr::write (writePtr, (half) 0); - - break; - - case FLOAT: - - for (int j = 0; j < xSize; ++j) - Xdr::write (writePtr, (float) 0); - - break; - - default: - - throw Iex::ArgExc ("Unknown pixel data type."); - } - } - else - { - // - // Fill with data in NATIVE format. - // - - switch (type) - { - case UINT: - - for (int 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 HALF: - - for (int j = 0; j < xSize; ++j) - { - *(half *) writePtr = half (0); - writePtr += sizeof (half); - } - break; - - case FLOAT: - - for (int 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::ArgExc ("Unknown pixel data type."); - } - } -} - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfMisc.h b/Source/OpenEXR/IlmImf/ImfMisc.h deleted file mode 100644 index 85718f4..0000000 --- a/Source/OpenEXR/IlmImf/ImfMisc.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_MISC_H -#define INCLUDED_IMF_MISC_H - -//----------------------------------------------------------------------------- -// -// Miscellaneous helper functions for OpenEXR image file I/O -// -//----------------------------------------------------------------------------- - -#include -#include -#include - -namespace Imf { - -class Header; - -// -// Return the size of a single value of the indicated type, -// in the machine's native format. -// - -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]. -// - -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). -// - -size_t bytesPerLineTable (const Header &header, - 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, for each scan line in a file's -// data window, the location of the pixel data for the scanline -// relative to the beginning of the line buffer. -// - -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.) -// - -int lineBufferMinY (int y, int minY, int linesInLineBuffer); -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. -// - -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. -// - -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 -// - -void copyIntoFrameBuffer (const char *&readPtr, - char *writePtr, - char *endPtr, - size_t xStride, - 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. -// - -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 -// - -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) -// - -void copyFromFrameBuffer (char *&writePtr, - const char *&readPtr, - const char *endPtr, - size_t xStride, - 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. -// - -void fillChannelWithZeroes (char *&writePtr, - Compressor::Format format, - PixelType type, - size_t xSize); - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfMultiView.cpp b/Source/OpenEXR/IlmImf/ImfMultiView.cpp deleted file mode 100644 index 8750c67..0000000 --- a/Source/OpenEXR/IlmImf/ImfMultiView.cpp +++ /dev/null @@ -1,396 +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; - -namespace Imf { -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 (int 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); - unsigned int size1 = chan1.size(); // number of SECTIONS in string - // name (not string length) - - StringVector chan2 = parseString (channel2); - unsigned int 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(int 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 (int j = 0; j < s.size(); ++j) - { - if (j < s.size() - 1) - newName += s[j] + "."; - else - newName += multiView[i] + "." + s[j]; - } - - return newName; -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfMultiView.h b/Source/OpenEXR/IlmImf/ImfMultiView.h deleted file mode 100644 index 6d03d5e..0000000 --- a/Source/OpenEXR/IlmImf/ImfMultiView.h +++ /dev/null @@ -1,164 +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 -#include - -//----------------------------------------------------------------------------- -// -// 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. -// -//----------------------------------------------------------------------------- - -namespace Imf { - -// -// 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 "". -// - -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. -// - -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.) -// - -bool areCounterparts (const std::string &channel1, - const std::string &channel2, - const StringVector &multiView); - -// -// Return a list of all channels belonging to view viewName. -// - -ChannelList channelsInView (const std::string &viewName, - const ChannelList &channelList, - const StringVector &multiView); - -// -// Return a list of channels not associated with any view. -// - -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.). -// - -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. -// - -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. -// - -std::string insertViewName (const std::string &channel, - const StringVector &multiView, - int i); - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfName.h b/Source/OpenEXR/IlmImf/ImfName.h deleted file mode 100644 index ebb9f86..0000000 --- a/Source/OpenEXR/IlmImf/ImfName.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_IMF_NAME_H -#define INCLUDED_IMF_NAME_H - -//----------------------------------------------------------------------------- -// -// class ImfName -- a zero-terminated string -// with a fixed, small maximum length -// -//----------------------------------------------------------------------------- - -#include - -namespace Imf { - - -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; -} - - -} // namespace IMF - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp b/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp deleted file mode 100644 index 0abaa86..0000000 --- a/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp +++ /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. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class OpaqueAttribute -// -//----------------------------------------------------------------------------- - -#include -#include "Iex.h" -#include - -namespace Imf { - - -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 (OStream &os, int version) const -{ - Xdr::write (os, _data, _dataSize); -} - - -void -OpaqueAttribute::readValueFrom (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::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); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.h b/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.h deleted file mode 100644 index 864ae93..0000000 --- a/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.h +++ /dev/null @@ -1,114 +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 -#include - -namespace Imf { - - -class 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 (OStream &os, - int version) const; - - virtual void readValueFrom (IStream &is, - int size, - int version); - - virtual void copyValueFrom (const Attribute &other); - - - private: - - Array _typeName; - long _dataSize; - Array _data; -}; - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfOutputFile.cpp b/Source/OpenEXR/IlmImf/ImfOutputFile.cpp deleted file mode 100644 index 31a339e..0000000 --- a/Source/OpenEXR/IlmImf/ImfOutputFile.cpp +++ /dev/null @@ -1,1287 +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 OutputFile -// -//----------------------------------------------------------------------------- - -#include -#include -#include -#include -#include -#include -#include "ImathBox.h" -#include "ImathFun.h" -#include -#include -#include -#include "IlmThreadPool.h" -#include "IlmThreadSemaphore.h" -#include "IlmThreadMutex.h" -#include "Iex.h" -#include -#include -#include -#include - - -namespace Imf { - -using Imath::Box2i; -using Imath::divp; -using Imath::modp; -using std::string; -using std::vector; -using std::ofstream; -using std::min; -using std::max; -using IlmThread::Mutex; -using IlmThread::Lock; -using IlmThread::Semaphore; -using IlmThread::Task; -using IlmThread::TaskGroup; -using IlmThread::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: public Mutex -{ - Header header; // the image header - int version; // file format version - 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 - OStream * os; // file stream to write to - bool deleteStream; - Int64 lineOffsetsPosition; // file position for line - // offset table - Int64 currentPosition; // current file position - - vector lineBuffers; // each holds one line buffer - int linesInBuffer; // number of scanlines each - // buffer holds - size_t lineBufferSize; // size of the line buffer - - Data (bool deleteStream, int numThreads); - ~Data (); - - - inline LineBuffer * getLineBuffer (int number); // hash function from line - // buffer indices into our - // vector of line buffers -}; - - -OutputFile::Data::Data (bool deleteStream, int numThreads): - os (0), - deleteStream (deleteStream), - lineOffsetsPosition (0) -{ - // - // 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 () -{ - if (deleteStream) - delete os; - - 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 (OStream &os, const vector &lineOffsets) -{ - Int64 pos = os.tellp(); - - if (pos == -1) - Iex::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 (OutputFile::Data *ofd, - 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 = ofd->currentPosition; - ofd->currentPosition = 0; - - if (currentPosition == 0) - currentPosition = ofd->os->tellp(); - - ofd->lineOffsets[(ofd->currentScanLine - ofd->minY) / ofd->linesInBuffer] = - currentPosition; - - #ifdef DEBUG - - assert (ofd->os->tellp() == currentPosition); - - #endif - - Xdr::write (*ofd->os, lineBufferMinY); - Xdr::write (*ofd->os, pixelDataSize); - ofd->os->write (pixelData, pixelDataSize); - - ofd->currentPosition = currentPosition + - Xdr::size() + - Xdr::size() + - pixelDataSize; -} - - -inline void -writePixelData (OutputFile::Data *ofd, const LineBuffer *lineBuffer) -{ - writePixelData (ofd, - 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. - // - - int startY, endY; // The first and last scanlines in - // the file that are in the lineBuffer. - int step; - - if (ofd->lineOrder == INCREASING_Y) - { - startY = max (lineBufferMinY, ofd->minY); - endY = min (lineBufferMaxY, ofd->maxY) + 1; - step = 1; - } - else - { - startY = min (lineBufferMaxY, ofd->maxY); - endY = max (lineBufferMinY, ofd->minY) - 1; - step = -1; - } - - // - // Iterate over all scanlines in the lineBuffer to convert. - // - - for (int y = startY; y != endY; y += step) - { - // - // Set these to point to the start of line y. - // We will write to writePtr from readPtr. - // - - char *writePtr = lineBuffer + ofd->offsetInLineBuffer[y - ofd->minY]; - 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 (true, numThreads)) -{ - try - { - header.sanityCheck(); - _data->os = new StdOFStream (fileName); - initialize (header); - } - catch (Iex::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - delete _data; - throw; - } -} - - -OutputFile::OutputFile - (OStream &os, - const Header &header, - int numThreads) -: - _data (new Data (false, numThreads)) -{ - try - { - header.sanityCheck(); - _data->os = &os; - initialize (header); - } - catch (Iex::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << os.fileName() << "\". " << e); - throw; - } - catch (...) - { - delete _data; - throw; - } -} - - -void -OutputFile::initialize (const Header &header) -{ - _data->header = header; - - 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); - - _data->previewPosition = - _data->header.writeTo (*_data->os); - - _data->lineOffsetsPosition = - writeLineOffsets (*_data->os, _data->lineOffsets); - - _data->currentPosition = _data->os->tellp(); -} - - -OutputFile::~OutputFile () -{ - if (_data) - { - { - if (_data->lineOffsetsPosition > 0) - { - try - { - _data->os->seekp (_data->lineOffsetsPosition); - writeLineOffsets (*_data->os, _data->lineOffsets); - } - 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. - // - } - } - } - - delete _data; - } -} - - -const char * -OutputFile::fileName () const -{ - return _data->os->fileName(); -} - - -const Header & -OutputFile::header () const -{ - return _data->header; -} - - -void -OutputFile::setFrameBuffer (const FrameBuffer &frameBuffer) -{ - Lock lock (*_data); - - // - // 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::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::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); - return _data->frameBuffer; -} - - -void -OutputFile::writePixels (int numScanLines) -{ - try - { - Lock lock (*_data); - - if (_data->slices.size() == 0) - throw Iex::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::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, 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 (int 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::IoExc (*exception); - } - catch (Iex::BaseExc &e) - { - REPLACE_EXC (e, "Failed to write pixel data to image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -int -OutputFile::currentScanLine () const -{ - Lock lock (*_data); - return _data->currentScanLine; -} - - -void -OutputFile::copyPixels (InputFile &in) -{ - Lock lock (*_data); - - // - // 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::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::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::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::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::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::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, 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::updatePreviewImage (const PreviewRgba newPixels[]) -{ - Lock lock (*_data); - - if (_data->previewPosition <= 0) - THROW (Iex::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->os->tellp(); - - try - { - _data->os->seekp (_data->previewPosition); - pia.writeValueTo (*_data->os, _data->version); - _data->os->seekp (savedPosition); - } - catch (Iex::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); - - Int64 position = - _data->lineOffsets[(y - _data->minY) / _data->linesInBuffer]; - - if (!position) - THROW (Iex::ArgExc, "Cannot overwrite scan line " << y << ". " - "The scan line has not yet been stored in " - "file \"" << fileName() << "\"."); - - _data->currentPosition = 0; - _data->os->seekp (position + offset); - - for (int i = 0; i < length; ++i) - _data->os->write (&c, 1); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfOutputFile.h b/Source/OpenEXR/IlmImf/ImfOutputFile.h deleted file mode 100644 index bdc317a..0000000 --- a/Source/OpenEXR/IlmImf/ImfOutputFile.h +++ /dev/null @@ -1,241 +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 -#include -#include - -namespace Imf { - -class InputFile; -struct PreviewRgba; - - -class OutputFile -{ - 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 (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); - - - //-------------------------------------------------------------- - // 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::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: - - OutputFile (const OutputFile &); // not implemented - OutputFile & operator = (const OutputFile &); // not implemented - - void initialize (const Header &header); - - Data * _data; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfPixelType.h b/Source/OpenEXR/IlmImf/ImfPixelType.h deleted file mode 100644 index 8f504ef..0000000 --- a/Source/OpenEXR/IlmImf/ImfPixelType.h +++ /dev/null @@ -1,61 +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 -// -//----------------------------------------------------------------------------- - -namespace Imf { - - -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 -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfPizCompressor.cpp b/Source/OpenEXR/IlmImf/ImfPizCompressor.cpp deleted file mode 100644 index 9ceb8c6..0000000 --- a/Source/OpenEXR/IlmImf/ImfPizCompressor.cpp +++ /dev/null @@ -1,666 +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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Imf { - -using Imath::divp; -using Imath::modp; -using Imath::Box2i; -using Imath::V2i; -using Iex::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::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::Box2i range, - const char *&outPtr) -{ - return uncompress (inPtr, inSize, range, outPtr); -} - - -int -PizCompressor::compress (const char *inPtr, - int inSize, - Imath::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::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); - - 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; -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfPizCompressor.h b/Source/OpenEXR/IlmImf/ImfPizCompressor.h deleted file mode 100644 index 0945a8c..0000000 --- a/Source/OpenEXR/IlmImf/ImfPizCompressor.h +++ /dev/null @@ -1,115 +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 - -namespace Imf { - -class ChannelList; - - -class 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::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); - private: - - struct ChannelData; - - 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); - - int _maxScanLineSize; - Format _format; - int _numScanLines; - unsigned short * _tmpBuffer; - char * _outBuffer; - int _numChans; - const ChannelList & _channels; - ChannelData * _channelData; - int _minX; - int _maxX; - int _maxY; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfPreviewImage.cpp b/Source/OpenEXR/IlmImf/ImfPreviewImage.cpp deleted file mode 100644 index d47d931..0000000 --- a/Source/OpenEXR/IlmImf/ImfPreviewImage.cpp +++ /dev/null @@ -1,103 +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 -#include -#include "Iex.h" - -namespace Imf { - - -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; -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfPreviewImage.h b/Source/OpenEXR/IlmImf/ImfPreviewImage.h deleted file mode 100644 index d016620..0000000 --- a/Source/OpenEXR/IlmImf/ImfPreviewImage.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_PREVIEW_IMAGE_H -#define INCLUDED_IMF_PREVIEW_IMAGE_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. -// -//----------------------------------------------------------------------------- - -namespace Imf { - - -struct 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 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; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp b/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp deleted file mode 100644 index 476c756..0000000 --- a/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp +++ /dev/null @@ -1,102 +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 - - -namespace Imf { - - -template <> -const char * -PreviewImageAttribute::staticTypeName () -{ - return "preview"; -} - - -template <> -void -PreviewImageAttribute::writeValueTo (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 (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; -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.h b/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.h deleted file mode 100644 index f08b9b7..0000000 --- a/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.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_PREVIEW_IMAGE_ATTRIBUTE_H -#define INCLUDED_IMF_PREVIEW_IMAGE_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class PreviewImageAttribute -// -//----------------------------------------------------------------------------- - -#include -#include - - -namespace Imf { - - -typedef TypedAttribute PreviewImageAttribute; - -template <> -const char *PreviewImageAttribute::staticTypeName (); - -template <> -void PreviewImageAttribute::writeValueTo (OStream &, int) const; - -template <> -void PreviewImageAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp b/Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp deleted file mode 100644 index 8f3fb2c..0000000 --- a/Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp +++ /dev/null @@ -1,550 +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. -// -//----------------------------------------------------------------------------- -//#define ZLIB_WINAPI - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; -using namespace Imath; - -namespace Imf { -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::InputExc ("Error decompressing data " - "(input data are shorter than expected)."); -} - - -void -tooMuchData () -{ - throw Iex::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 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 (int 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 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 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 (int 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::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::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 UINT: - - ptr[0] = tmpBufferEnd; - ptr[1] = ptr[0] + n; - ptr[2] = ptr[1] + n; - ptr[3] = ptr[2] + n; - tmpBufferEnd = ptr[3] + n; - - if (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 (int k = 0; k < sizeof (pixel); ++k) - *writePtr++ = *pPtr++; - } - - break; - - case HALF: - - ptr[0] = tmpBufferEnd; - ptr[1] = ptr[0] + n; - tmpBufferEnd = ptr[1] + n; - - if (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 FLOAT: - - ptr[0] = tmpBufferEnd; - ptr[1] = ptr[0] + n; - ptr[2] = ptr[1] + n; - tmpBufferEnd = ptr[2] + n; - - if (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 (int k = 0; k < sizeof (pixel); ++k) - *writePtr++ = *pPtr++; - } - - break; - - default: - - assert (false); - } - } - } - - if (tmpBufferEnd - _tmpBuffer < tmpSize) - tooMuchData(); - - outPtr = _outBuffer; - return writePtr - _outBuffer; -} - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfPxr24Compressor.h b/Source/OpenEXR/IlmImf/ImfPxr24Compressor.h deleted file mode 100644 index 71e6109..0000000 --- a/Source/OpenEXR/IlmImf/ImfPxr24Compressor.h +++ /dev/null @@ -1,108 +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 - -namespace Imf { - -class ChannelList; - - -class 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::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); - private: - - 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); - - int _maxScanLineSize; - int _numScanLines; - unsigned char * _tmpBuffer; - char * _outBuffer; - const ChannelList & _channels; - int _minX; - int _maxX; - int _maxY; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfRational.cpp b/Source/OpenEXR/IlmImf/ImfRational.cpp deleted file mode 100644 index ae6bc0a..0000000 --- a/Source/OpenEXR/IlmImf/ImfRational.cpp +++ /dev/null @@ -1,125 +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; - -namespace Imf { -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); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfRational.h b/Source/OpenEXR/IlmImf/ImfRational.h deleted file mode 100644 index 4bad7b8..0000000 --- a/Source/OpenEXR/IlmImf/ImfRational.h +++ /dev/null @@ -1,93 +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 - -//----------------------------------------------------------------------------- -// -// 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 -// -//----------------------------------------------------------------------------- - -namespace Imf { - -class 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);} -}; - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp b/Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp deleted file mode 100644 index 757ca27..0000000 --- a/Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp +++ /dev/null @@ -1,73 +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 - - -namespace Imf { - - -template <> -const char * -RationalAttribute::staticTypeName () -{ - return "rational"; -} - - -template <> -void -RationalAttribute::writeValueTo (OStream &os, int version) const -{ - Xdr::write (os, _value.n); - Xdr::write (os, _value.d); -} - - -template <> -void -RationalAttribute::readValueFrom (IStream &is, int size, int version) -{ - Xdr::read (is, _value.n); - Xdr::read (is, _value.d); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfRationalAttribute.h b/Source/OpenEXR/IlmImf/ImfRationalAttribute.h deleted file mode 100644 index 862bbf4..0000000 --- a/Source/OpenEXR/IlmImf/ImfRationalAttribute.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_RATIONAL_ATTRIBUTE_H -#define INCLUDED_IMF_RATIONAL_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class RationalAttribute -// -//----------------------------------------------------------------------------- - -#include -#include - - -namespace Imf { - - -typedef TypedAttribute RationalAttribute; - -template <> -const char *RationalAttribute::staticTypeName (); - -template <> -void RationalAttribute::writeValueTo (OStream &, int) const; - -template <> -void RationalAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfRgba.h b/Source/OpenEXR/IlmImf/ImfRgba.h deleted file mode 100644 index e68cb4b..0000000 --- a/Source/OpenEXR/IlmImf/ImfRgba.h +++ /dev/null @@ -1,104 +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" - -namespace Imf { - - -// -// 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 -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfRgbaFile.cpp b/Source/OpenEXR/IlmImf/ImfRgbaFile.cpp deleted file mode 100644 index 540d128..0000000 --- a/Source/OpenEXR/IlmImf/ImfRgbaFile.cpp +++ /dev/null @@ -1,1404 +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 - - -namespace Imf { - -using namespace std; -using namespace Imath; -using namespace RgbaYca; -using namespace IlmThread; - -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::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 (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::Box2i &displayWindow, - const Imath::Box2i &dataWindow, - RgbaChannels rgbaChannels, - float pixelAspectRatio, - const Imath::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::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::Box2i & -RgbaOutputFile::displayWindow () const -{ - return _outputFile->header().displayWindow(); -} - - -const Imath::Box2i & -RgbaOutputFile::dataWindow () const -{ - return _outputFile->header().dataWindow(); -} - - -float -RgbaOutputFile::pixelAspectRatio () const -{ - return _outputFile->header().pixelAspectRatio(); -} - - -const Imath::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::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 (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 (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::Box2i & -RgbaInputFile::displayWindow () const -{ - return _inputFile->header().displayWindow(); -} - - -const Imath::Box2i & -RgbaInputFile::dataWindow () const -{ - return _inputFile->header().dataWindow(); -} - - -float -RgbaInputFile::pixelAspectRatio () const -{ - return _inputFile->header().pixelAspectRatio(); -} - - -const Imath::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(); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfRgbaFile.h b/Source/OpenEXR/IlmImf/ImfRgbaFile.h deleted file mode 100644 index eec67dc..0000000 --- a/Source/OpenEXR/IlmImf/ImfRgbaFile.h +++ /dev/null @@ -1,344 +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 -#include -#include -#include "ImathVec.h" -#include "ImathBox.h" -#include "half.h" -#include -#include - -namespace Imf { - - -class OutputFile; -class InputFile; -struct PreviewRgba; - -// -// RGBA output file. -// - -class 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 (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::Box2i &displayWindow, - const Imath::Box2i &dataWindow = Imath::Box2i(), - RgbaChannels rgbaChannels = WRITE_RGBA, - float pixelAspectRatio = 1, - const Imath::V2f screenWindowCenter = Imath::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::V2f screenWindowCenter = Imath::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::Box2i & displayWindow () const; - const Imath::Box2i & dataWindow () const; - float pixelAspectRatio () const; - const Imath::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 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 (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 (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::Box2i & displayWindow () const; - const Imath::Box2i & dataWindow () const; - float pixelAspectRatio () const; - const Imath::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; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfRgbaYca.cpp b/Source/OpenEXR/IlmImf/ImfRgbaYca.cpp deleted file mode 100644 index 9a571de..0000000 --- a/Source/OpenEXR/IlmImf/ImfRgbaYca.cpp +++ /dev/null @@ -1,495 +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; -using namespace std; - -namespace Imf { -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::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::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 -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfRgbaYca.h b/Source/OpenEXR/IlmImf/ImfRgbaYca.h deleted file mode 100644 index 4a2743e..0000000 --- a/Source/OpenEXR/IlmImf/ImfRgbaYca.h +++ /dev/null @@ -1,248 +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 -#include - -namespace Imf { -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 -// - -Imath::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(). -// - -void RGBAtoYCA (const Imath::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. -// - -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. -// - -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. -// - -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. -// - -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. -// - -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(). -// - -void YCAtoRGBA (const Imath::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. -// - -void fixSaturation (const Imath::V3f &yw, - int n, - const Rgba * const rgbaIn[3], - Rgba rgbaOut[/*n*/]); - -} // namespace RgbaYca -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfRleCompressor.cpp b/Source/OpenEXR/IlmImf/ImfRleCompressor.cpp deleted file mode 100644 index 90619b4..0000000 --- a/Source/OpenEXR/IlmImf/ImfRleCompressor.cpp +++ /dev/null @@ -1,331 +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 -#include -#include "Iex.h" - -namespace Imf { -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; - - while (count-- > 0) - *out++ = *(char *) (in++); - } - else - { - int count = *in++; - inLength -= 2; - - if (0 > (maxLength -= count + 1)) - return 0; - - while (count-- >= 0) - *out++ = *(char *) in; - - in++; - } - } - - return out - outStart; -} - -} // namespace - - -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::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; -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfRleCompressor.h b/Source/OpenEXR/IlmImf/ImfRleCompressor.h deleted file mode 100644 index e272381..0000000 --- a/Source/OpenEXR/IlmImf/ImfRleCompressor.h +++ /dev/null @@ -1,79 +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 - -namespace Imf { - - -class 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; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp b/Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp deleted file mode 100644 index c5c6465..0000000 --- a/Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp +++ /dev/null @@ -1,1021 +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 -#include -#include -#include -#include -#include "ImathBox.h" -#include "ImathFun.h" -#include -#include -#include -#include "IlmThreadPool.h" -#include "IlmThreadSemaphore.h" -#include "IlmThreadMutex.h" -#include "Iex.h" -#include -#include -#include - - -namespace Imf { - -using Imath::Box2i; -using Imath::divp; -using Imath::modp; -using std::string; -using std::vector; -using std::ifstream; -using std::min; -using std::max; -using IlmThread::Mutex; -using IlmThread::Lock; -using IlmThread::Semaphore; -using IlmThread::Task; -using IlmThread::TaskGroup; -using IlmThread::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; -} - -} // 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 - IStream * is; // file stream to read from - - vector lineBuffers; // each holds one line buffer - int linesInBuffer; // number of scanlines each buffer - // holds - size_t lineBufferSize; // size of the line buffer - - Data (IStream *is, int numThreads); - ~Data (); - - inline LineBuffer * getLineBuffer (int number); // hash function from line - // buffer indices into our - // vector of line buffers -}; - - -ScanLineInputFile::Data::Data (IStream *is, int numThreads): - is (is) -{ - // - // 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 (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; - Xdr::read (is, y); - - int dataSize; - 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 (IStream &is, - LineOrder lineOrder, - vector &lineOffsets, - bool &complete) -{ - for (unsigned int i = 0; i < lineOffsets.size(); i++) - { - 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 (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 *). - // - - Int64 lineOffset = - ifd->lineOffsets[(minY - ifd->minY) / ifd->linesInBuffer]; - - if (lineOffset == 0) - THROW (Iex::InputExc, "Scan line " << minY << " is missing."); - - // - // Seek to the start of the scan line in the file, - // if necessary. - // - - if (ifd->nextLineBufferMinY != minY) - ifd->is->seekg (lineOffset); - - // - // Read the data block's header. - // - - int yInFile; - - Xdr::read (*ifd->is, yInFile); - Xdr::read (*ifd->is, dataSize); - - if (yInFile != minY) - throw Iex::InputExc ("Unexpected data block y coordinate."); - - if (dataSize > (int) ifd->lineBufferSize) - throw Iex::InputExc ("Unexpected data block length."); - - // - // Read the pixel data. - // - - if (ifd->is->isMemoryMapped ()) - buffer = ifd->is->readMemoryMapped (dataSize); - else - ifd->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); - - virtual ~LineBufferTask (); - - virtual void execute (); - - private: - - ScanLineInputFile::Data * _ifd; - LineBuffer * _lineBuffer; - int _scanLineMin; - int _scanLineMax; -}; - - -LineBufferTask::LineBufferTask - (TaskGroup *group, - ScanLineInputFile::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) - { - 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; - } - } -} - - -LineBufferTask * -newLineBufferTask - (TaskGroup *group, - ScanLineInputFile::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, 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); - - return new LineBufferTask (group, ifd, lineBuffer, - scanLineMin, scanLineMax); -} - -} // namespace - - -ScanLineInputFile::ScanLineInputFile - (const Header &header, - IStream *is, - int numThreads) -: - _data (new Data (is, numThreads)) -{ - 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 (!_data->is->isMemoryMapped()) - for (size_t i = 0; i < _data->lineBuffers.size(); i++) - _data->lineBuffers[i]->buffer = new char[_data->lineBufferSize]; - - _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); - - readLineOffsets (*_data->is, - _data->lineOrder, - _data->lineOffsets, - _data->fileIsComplete); - } - catch (...) - { - delete _data; - throw; - } -} - - -ScanLineInputFile::~ScanLineInputFile () -{ - if (!_data->is->isMemoryMapped()) - for (size_t i = 0; i < _data->lineBuffers.size(); i++) - delete [] _data->lineBuffers[i]->buffer; - - delete _data; -} - - -const char * -ScanLineInputFile::fileName () const -{ - return _data->is->fileName(); -} - - -const Header & -ScanLineInputFile::header () const -{ - return _data->header; -} - - -int -ScanLineInputFile::version () const -{ - return _data->version; -} - - -void -ScanLineInputFile::setFrameBuffer (const FrameBuffer &frameBuffer) -{ - Lock lock (*_data); - - // - // 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::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 (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 - ++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 (i != channels.end() && !fill) - ++i; - } - - // - // Store the new frame buffer. - // - - _data->frameBuffer = frameBuffer; - _data->slices = slices; -} - - -const FrameBuffer & -ScanLineInputFile::frameBuffer () const -{ - Lock lock (*_data); - return _data->frameBuffer; -} - - -bool -ScanLineInputFile::isComplete () const -{ - return _data->fileIsComplete; -} - - -void -ScanLineInputFile::readPixels (int scanLine1, int scanLine2) -{ - try - { - Lock lock (*_data); - - if (_data->slices.size() == 0) - throw Iex::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::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, - _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 (int 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::IoExc (*exception); - } - catch (Iex::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 (*_data); - - if (firstScanLine < _data->minY || firstScanLine > _data->maxY) - { - throw Iex::ArgExc ("Tried to read scan line outside " - "the image file's data window."); - } - - int minY = lineBufferMinY - (firstScanLine, _data->minY, _data->linesInBuffer); - - readPixelData - (_data, minY, _data->lineBuffers[0]->buffer, pixelDataSize); - - pixelData = _data->lineBuffers[0]->buffer; - } - catch (Iex::BaseExc &e) - { - REPLACE_EXC (e, "Error reading pixel data from image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfScanLineInputFile.h b/Source/OpenEXR/IlmImf/ImfScanLineInputFile.h deleted file mode 100644 index 02b36e2..0000000 --- a/Source/OpenEXR/IlmImf/ImfScanLineInputFile.h +++ /dev/null @@ -1,172 +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 -#include -#include - -namespace Imf { - - -class ScanLineInputFile -{ - public: - - //------------ - // Constructor - //------------ - - ScanLineInputFile (const Header &header, 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; - - - //--------------------------------------------------------------- - // 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; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp b/Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp deleted file mode 100644 index baa2c1f..0000000 --- a/Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp +++ /dev/null @@ -1,118 +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(); \ - } - - -namespace Imf { - - -IMF_STD_ATTRIBUTE_IMP (chromaticities, Chromaticities, Chromaticities) -IMF_STD_ATTRIBUTE_IMP (whiteLuminance, WhiteLuminance, float) -IMF_STD_ATTRIBUTE_IMP (adoptedNeutral, AdoptedNeutral, Imath::V2f) -IMF_STD_ATTRIBUTE_IMP (renderingTransform, RenderingTransform, std::string) -IMF_STD_ATTRIBUTE_IMP (lookModTransform, LookModTransform, std::string) -IMF_STD_ATTRIBUTE_IMP (xDensity, XDensity, float) -IMF_STD_ATTRIBUTE_IMP (owner, Owner, std::string) -IMF_STD_ATTRIBUTE_IMP (comments, Comments, std::string) -IMF_STD_ATTRIBUTE_IMP (capDate, CapDate, std::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, std::string) -IMF_STD_ATTRIBUTE_IMP (framesPerSecond, FramesPerSecond, Rational) -IMF_STD_ATTRIBUTE_IMP (multiView, MultiView, StringVector) -IMF_STD_ATTRIBUTE_IMP (worldToCamera, WorldToCamera, Imath::M44f) -IMF_STD_ATTRIBUTE_IMP (worldToNDC, WorldToNDC, Imath::M44f) - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfStandardAttributes.h b/Source/OpenEXR/IlmImf/ImfStandardAttributes.h deleted file mode 100644 index 38783b1..0000000 --- a/Source/OpenEXR/IlmImf/ImfStandardAttributes.h +++ /dev/null @@ -1,343 +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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define IMF_STD_ATTRIBUTE_DEF(name,suffix,type) \ - \ - void add##suffix (Header &header, const type &v); \ - bool has##suffix (const Header &header); \ - const TypedAttribute & name##Attribute (const Header &header); \ - TypedAttribute & name##Attribute (Header &header); \ - const type & name (const Header &header); \ - type & name (Header &header); - - -namespace Imf { - -// -// 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::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::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::M44f) - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfStdIO.cpp b/Source/OpenEXR/IlmImf/ImfStdIO.cpp deleted file mode 100644 index 5028410..0000000 --- a/Source/OpenEXR/IlmImf/ImfStdIO.cpp +++ /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.67 -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// Low-level file input and output for OpenEXR -// based on C++ standard iostreams. -// -//----------------------------------------------------------------------------- - -#include -#include "Iex.h" -#include - -using namespace std; - -namespace Imf { -namespace { - -void -clearError () -{ - errno = 0; -} - - -bool -checkError (istream &is, streamsize expected = 0) -{ - if (!is) - { - if (errno) - Iex::throwErrnoExc(); - - if (is.gcount() < expected) - { - THROW (Iex::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::throwErrnoExc(); - - throw Iex::ErrnoExc ("File output failed."); - } -} - -} // namespace - - -StdIFStream::StdIFStream (const char fileName[]): - IStream (fileName), - _is (new ifstream (fileName, ios_base::binary)), - _deleteStream (true) -{ - if (!*_is) - { - delete _is; - Iex::throwErrnoExc(); - } -} - - -StdIFStream::StdIFStream (ifstream &is, const char fileName[]): - 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::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[]): - OStream (fileName), - _os (new ofstream (fileName, ios_base::binary)), - _deleteStream (true) -{ - if (!*_os) - { - delete _os; - Iex::throwErrnoExc(); - } -} - - -StdOFStream::StdOFStream (ofstream &os, const char fileName[]): - 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 (): 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); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfStdIO.h b/Source/OpenEXR/IlmImf/ImfStdIO.h deleted file mode 100644 index 0137b45..0000000 --- a/Source/OpenEXR/IlmImf/ImfStdIO.h +++ /dev/null @@ -1,156 +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 -#include -#include - -namespace Imf { - -//------------------------------------------- -// class StdIFStream -- an implementation of -// class IStream based on class std::ifstream -//------------------------------------------- - -class StdIFStream: public 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 OStream based on class std::ofstream -//------------------------------------------- - -class StdOFStream: public 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 -// OStream, based on class std::ostringstream -//------------------------------------------------ - -class StdOSStream: public 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; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfStringAttribute.cpp b/Source/OpenEXR/IlmImf/ImfStringAttribute.cpp deleted file mode 100644 index 6f6ca94..0000000 --- a/Source/OpenEXR/IlmImf/ImfStringAttribute.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 StringAttribute -// -//----------------------------------------------------------------------------- - -#include - - -namespace Imf { - - -template <> -const char * -StringAttribute::staticTypeName () -{ - return "string"; -} - - -template <> -void -StringAttribute::writeValueTo (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 (IStream &is, int size, int version) -{ - _value.resize (size); - - for (int i = 0; i < size; i++) - Xdr::read (is, _value[i]); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfStringAttribute.h b/Source/OpenEXR/IlmImf/ImfStringAttribute.h deleted file mode 100644 index 3ce76eb..0000000 --- a/Source/OpenEXR/IlmImf/ImfStringAttribute.h +++ /dev/null @@ -1,66 +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 -#include - - -namespace Imf { - - -typedef TypedAttribute StringAttribute; -template <> const char *StringAttribute::staticTypeName (); -template <> void StringAttribute::writeValueTo (OStream &, int) const; -template <> void StringAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp b/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp deleted file mode 100644 index 76b21be..0000000 --- a/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp +++ /dev/null @@ -1,94 +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 StringAttribute -// -//----------------------------------------------------------------------------- - -#include - - -namespace Imf { - - -template <> -const char * -StringVectorAttribute::staticTypeName () -{ - return "stringvector"; -} - - -template <> -void -StringVectorAttribute::writeValueTo (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 (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); - - Xdr::read (is, &str[0], strSize); - read += strSize; - - _value.push_back (str); - } -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.h b/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.h deleted file mode 100644 index 752a486..0000000 --- a/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.h +++ /dev/null @@ -1,66 +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 -#include -#include - - -namespace Imf { - -typedef std::vector StringVector; -typedef TypedAttribute StringVectorAttribute; -template <> const char *StringVectorAttribute::staticTypeName (); -template <> void StringVectorAttribute::writeValueTo (OStream &, int) const; -template <> void StringVectorAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfTestFile.cpp b/Source/OpenEXR/IlmImf/ImfTestFile.cpp deleted file mode 100644 index 1bf7872..0000000 --- a/Source/OpenEXR/IlmImf/ImfTestFile.cpp +++ /dev/null @@ -1,135 +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 - -namespace Imf { - - -bool -isOpenExrFile (const char fileName[], bool &tiled) -{ - try - { - StdIFStream is (fileName); - - int magic, version; - Xdr::read (is, magic); - Xdr::read (is, version); - - tiled = isTiled (version); - return magic == MAGIC; - } - catch (...) - { - tiled = false; - return false; - } -} - - -bool -isOpenExrFile (const char fileName[]) -{ - bool tiled; - return isOpenExrFile (fileName, tiled); -} - - -bool -isTiledOpenExrFile (const char fileName[]) -{ - bool exr, tiled; - exr = isOpenExrFile (fileName, tiled); - return exr && tiled; -} - - -bool -isOpenExrFile (IStream &is, bool &tiled) -{ - 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); - return magic == MAGIC; - } - catch (...) - { - is.clear(); - tiled = false; - return false; - } -} - - -bool -isOpenExrFile (IStream &is) -{ - bool tiled; - return isOpenExrFile (is, tiled); -} - - -bool -isTiledOpenExrFile (IStream &is) -{ - bool exr, tiled; - exr = isOpenExrFile (is, tiled); - return exr && tiled; -} - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfTestFile.h b/Source/OpenEXR/IlmImf/ImfTestFile.h deleted file mode 100644 index d81c61a..0000000 --- a/Source/OpenEXR/IlmImf/ImfTestFile.h +++ /dev/null @@ -1,63 +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. -// -//----------------------------------------------------------------------------- - - -namespace Imf { - -class IStream; - - -bool isOpenExrFile (const char fileName[], bool &isTiled); -bool isOpenExrFile (const char fileName[]); -bool isTiledOpenExrFile (const char fileName[]); -bool isOpenExrFile (IStream &is, bool &isTiled); -bool isOpenExrFile (IStream &is); -bool isTiledOpenExrFile (IStream &is); - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfThreading.cpp b/Source/OpenEXR/IlmImf/ImfThreading.cpp deleted file mode 100644 index 80f569c..0000000 --- a/Source/OpenEXR/IlmImf/ImfThreading.cpp +++ /dev/null @@ -1,60 +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 "IlmThreadPool.h" - -namespace Imf { - - -int -globalThreadCount () -{ - return IlmThread::ThreadPool::globalThreadPool().numThreads(); -} - - -void -setGlobalThreadCount (int count) -{ - IlmThread::ThreadPool::globalThreadPool().setNumThreads (count); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfThreading.h b/Source/OpenEXR/IlmImf/ImfThreading.h deleted file mode 100644 index 50fe35e..0000000 --- a/Source/OpenEXR/IlmImf/ImfThreading.h +++ /dev/null @@ -1,92 +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 - -//----------------------------------------------------------------------------- -// -// 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. -// -//----------------------------------------------------------------------------- - -namespace Imf { - - -//----------------------------------------------------------------------------- -// Return the number of Imf-global worker threads used for parallel -// compression and decompression of OpenEXR files. -//----------------------------------------------------------------------------- - -int globalThreadCount (); - - -//----------------------------------------------------------------------------- -// Change the number of Imf-global worker threads -//----------------------------------------------------------------------------- - -void setGlobalThreadCount (int count); - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfTileDescription.h b/Source/OpenEXR/IlmImf/ImfTileDescription.h deleted file mode 100644 index 78bcc0b..0000000 --- a/Source/OpenEXR/IlmImf/ImfTileDescription.h +++ /dev/null @@ -1,102 +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 -// -//----------------------------------------------------------------------------- - -namespace Imf { - - -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; - } -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp b/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp deleted file mode 100644 index e15f10f..0000000 --- a/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp +++ /dev/null @@ -1,85 +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 - - -namespace Imf { - - -template <> -const char * -TileDescriptionAttribute::staticTypeName () -{ - return "tiledesc"; -} - - -template <> -void -TileDescriptionAttribute::writeValueTo (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 (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); - -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.h b/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.h deleted file mode 100644 index 8a7125a..0000000 --- a/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.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_TILE_DESCRIPTION_ATTRIBUTE_H -#define INCLUDED_IMF_TILE_DESCRIPTION_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class TileDescriptionAttribute -// -//----------------------------------------------------------------------------- - -#include -#include - -namespace Imf { - - -typedef TypedAttribute TileDescriptionAttribute; - -template <> -const char * -TileDescriptionAttribute::staticTypeName (); - -template <> -void -TileDescriptionAttribute::writeValueTo (OStream &, int) const; - -template <> -void -TileDescriptionAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfTileOffsets.cpp b/Source/OpenEXR/IlmImf/ImfTileOffsets.cpp deleted file mode 100644 index b1fa29c..0000000 --- a/Source/OpenEXR/IlmImf/ImfTileOffsets.cpp +++ /dev/null @@ -1,385 +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" - -namespace Imf { - - -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 (unsigned int ly = 0; ly < _numYLevels; ++ly) - { - for (unsigned int lx = 0; lx < _numXLevels; ++lx) - { - int l = ly * _numXLevels + lx; - _offsets[l].resize (numYTiles[ly]); - - for (unsigned int dy = 0; dy < _offsets[l].size(); ++dy) - { - _offsets[l][dy].resize (numXTiles[lx]); - } - } - } - break; - } -} - - -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 (IStream &is) -{ - 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(); - - int tileX; - Xdr::read (is, tileX); - - int tileY; - Xdr::read (is, tileY); - - int levelX; - Xdr::read (is, levelX); - - int levelY; - Xdr::read (is, levelY); - - int dataSize; - Xdr::read (is, dataSize); - - Xdr::skip (is, dataSize); - - if (!isValidTile(tileX, tileY, levelX, levelY)) - return; - - operator () (tileX, tileY, levelX, levelY) = tileOffset; - } - } - } -} - - -void -TileOffsets::reconstructFromFile (IStream &is) -{ - // - // 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); - } - 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 (IStream &is, bool &complete) -{ - // - // 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) - 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); - } - else - { - complete = true; - } - -} - - -Int64 -TileOffsets::writeTo (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::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) - Xdr::write (os, _offsets[l][dy][dx]); - - return pos; -} - - -bool -TileOffsets::isEmpty () 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 false; - return true; -} - - -bool -TileOffsets::isValidTile (int dx, int dy, int lx, int ly) const -{ - switch (_mode) - { - case ONE_LEVEL: - - if (lx == 0 && - ly == 0 && - _offsets.size() > 0 && - _offsets[0].size() > dy && - _offsets[0][dy].size() > dx) - { - return true; - } - - break; - - case MIPMAP_LEVELS: - - if (lx < _numXLevels && - ly < _numYLevels && - _offsets.size() > lx && - _offsets[lx].size() > dy && - _offsets[lx][dy].size() > dx) - { - return true; - } - - break; - - case RIPMAP_LEVELS: - - if (lx < _numXLevels && - ly < _numYLevels && - _offsets.size() > lx + ly * _numXLevels && - _offsets[lx + ly * _numXLevels].size() > dy && - _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::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::ArgExc ("Unknown LevelMode format."); - } -} - - -const Int64 & -TileOffsets::operator () (int dx, int dy, int l) const -{ - return operator () (dx, dy, l, l); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfTileOffsets.h b/Source/OpenEXR/IlmImf/ImfTileOffsets.h deleted file mode 100644 index 7b2b4c2..0000000 --- a/Source/OpenEXR/IlmImf/ImfTileOffsets.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_OFFSETS_H -#define INCLUDED_IMF_TILE_OFFSETS_H - -//----------------------------------------------------------------------------- -// -// class TileOffsets -// -//----------------------------------------------------------------------------- - -#include -#include -#include - -namespace Imf { - -class IStream; -class OStream; - - -class 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 (IStream &is, bool &complete); - Int64 writeTo (OStream &os) const; - - - //----------------------------------------------------------- - // Test if the tileOffsets array is empty (all entries are 0) - //----------------------------------------------------------- - - bool isEmpty () 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; - - private: - - void findTiles (IStream &is); - void reconstructFromFile (IStream &is); - bool readTile (IStream &is); - bool anyOffsetsAreInvalid () const; - bool isValidTile (int dx, int dy, int lx, int ly) const; - - LevelMode _mode; - int _numXLevels; - int _numYLevels; - - std::vector > > _offsets; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp b/Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp deleted file mode 100644 index a45c3ac..0000000 --- a/Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp +++ /dev/null @@ -1,1302 +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 -#include -#include -#include -#include -#include -#include -#include "ImathBox.h" -#include -#include -#include -#include -#include -#include "IlmThreadPool.h" -#include "IlmThreadSemaphore.h" -#include "IlmThreadMutex.h" -#include "ImathVec.h" -#include "Iex.h" -#include -#include -#include -#include - - -namespace Imf { - -using Imath::Box2i; -using Imath::V2i; -using std::string; -using std::vector; -using std::min; -using std::max; -using IlmThread::Mutex; -using IlmThread::Lock; -using IlmThread::Semaphore; -using IlmThread::Task; -using IlmThread::TaskGroup; -using IlmThread::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), - 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 - - -// -// 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 - - Int64 currentPosition; // file offset for current tile, - // used to prevent unnecessary - // seeking - - vector slices; // info about channels in file - IStream * is; // file stream to read from - - bool deleteStream; // should we delete the stream - // ourselves? or does someone - // else do it? - - size_t bytesPerPixel; // size of an uncompressed pixel - - size_t maxBytesPerTileLine; // combined size of a line - // over all channels - - - vector tileBuffers; // each holds a single tile - size_t tileBufferSize; // size of the tile buffers - - Data (bool deleteStream, int numThreads); - ~Data (); - - inline TileBuffer * getTileBuffer (int number); - // hash function from tile indices - // into our vector of tile buffers -}; - - -TiledInputFile::Data::Data (bool del, int numThreads): - numXTiles (0), - numYTiles (0), - is (0), - deleteStream (del) -{ - // - // 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; - - if (deleteStream) - delete is; - - for (size_t i = 0; i < tileBuffers.size(); i++) - delete tileBuffers[i]; -} - - -TileBuffer* -TiledInputFile::Data::getTileBuffer (int number) -{ - return tileBuffers[number % tileBuffers.size()]; -} - - -namespace { - -void -readTileData (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::InputExc, "Tile (" << dx << ", " << dy << ", " << - lx << ", " << ly << ") is missing."); - } - - if (ifd->currentPosition != tileOffset) - ifd->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; - - Xdr::read (*ifd->is, tileXCoord); - Xdr::read (*ifd->is, tileYCoord); - Xdr::read (*ifd->is, levelX); - Xdr::read (*ifd->is, levelY); - Xdr::read (*ifd->is, dataSize); - - if (tileXCoord != dx) - throw Iex::InputExc ("Unexpected tile x coordinate."); - - if (tileYCoord != dy) - throw Iex::InputExc ("Unexpected tile y coordinate."); - - if (levelX != lx) - throw Iex::InputExc ("Unexpected tile x level number coordinate."); - - if (levelY != ly) - throw Iex::InputExc ("Unexpected tile y level number coordinate."); - - if (dataSize > (int) ifd->tileBufferSize) - throw Iex::InputExc ("Unexpected tile block length."); - - // - // Read the pixel data. - // - - if (ifd->is->isMemoryMapped ()) - buffer = ifd->is->readMemoryMapped (dataSize); - else - ifd->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). - // - - ifd->currentPosition = tileOffset + 5 * Xdr::size() + dataSize; -} - - -void -readNextTileData (TiledInputFile::Data *ifd, - int &dx, int &dy, - int &lx, int &ly, - char * & buffer, - int &dataSize) -{ - // - // Read the next tile block from the file - // - - // - // Read the first few bytes of the tile (the header). - // - - Xdr::read (*ifd->is, dx); - Xdr::read (*ifd->is, dy); - Xdr::read (*ifd->is, lx); - Xdr::read (*ifd->is, ly); - Xdr::read (*ifd->is, dataSize); - - if (dataSize > (int) ifd->tileBufferSize) - throw Iex::InputExc ("Unexpected tile block length."); - - // - // Read the pixel data. - // - - ifd->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). - // - - ifd->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 = Imf::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, - 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 (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 (true, numThreads)) -{ - // - // This constructor is called when a user - // explicitly wants to read a tiled file. - // - - try - { - _data->is = new StdIFStream (fileName); - _data->header.readFrom (*_data->is, _data->version); - initialize(); - } - catch (Iex::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - delete _data; - throw; - } -} - - -TiledInputFile::TiledInputFile (IStream &is, int numThreads): - _data (new Data (false, numThreads)) -{ - // - // This constructor is called when a user - // explicitly wants to read a tiled file. - // - - try - { - _data->is = &is; - _data->header.readFrom (*_data->is, _data->version); - initialize(); - } - catch (Iex::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << is.fileName() << "\". " << e); - throw; - } - catch (...) - { - delete _data; - throw; - } -} - - -TiledInputFile::TiledInputFile - (const Header &header, - IStream *is, - int version, - int numThreads) -: - _data (new Data (false, numThreads)) -{ - // - // 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. - // - - _data->is = is; - _data->header = header; - _data->version = version; - initialize(); -} - - -void -TiledInputFile::initialize () -{ - if (!isTiled (_data->version)) - throw Iex::ArgExc ("Expected a tiled file but the file is not tiled."); - - _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->is->isMemoryMapped ()) - _data->tileBuffers[i]->buffer = new char [_data->tileBufferSize]; - } - - _data->tileOffsets = TileOffsets (_data->tileDesc.mode, - _data->numXLevels, - _data->numYLevels, - _data->numXTiles, - _data->numYTiles); - - _data->tileOffsets.readFrom (*(_data->is), _data->fileIsComplete); - - _data->currentPosition = _data->is->tellg(); -} - - -TiledInputFile::~TiledInputFile () -{ - if (!_data->is->isMemoryMapped()) - for (size_t i = 0; i < _data->tileBuffers.size(); i++) - delete [] _data->tileBuffers[i]->buffer; - - delete _data; -} - - -const char * -TiledInputFile::fileName () const -{ - return _data->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); - - // - // 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::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); - 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); - - if (_data->slices.size() == 0) - throw Iex::ArgExc ("No frame buffer specified " - "as pixel data destination."); - - // - // 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::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 (int 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::IoExc (*exception); - } - catch (Iex::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); - - if (!isValidTile (dx, dy, lx, ly)) - throw Iex::ArgExc ("Tried to read a tile outside " - "the image file's data window."); - - TileBuffer *tileBuffer = _data->getTileBuffer (0); - - readNextTileData (_data, dx, dy, lx, ly, - tileBuffer->buffer, - pixelDataSize); - - pixelData = tileBuffer->buffer; - } - catch (Iex::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::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::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::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::ArgExc, "Error calling numXTiles() on image " - "file \"" << _data->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::ArgExc, "Error calling numYTiles() on image " - "file \"" << _data->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 Imf::dataWindowForLevel (_data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - lx, ly); - } - catch (Iex::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::ArgExc ("Arguments not in valid range."); - - return Imf::dataWindowForTile (_data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - dx, dy, lx, ly); - } - catch (Iex::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)); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfTiledInputFile.h b/Source/OpenEXR/IlmImf/ImfTiledInputFile.h deleted file mode 100644 index 13eb84f..0000000 --- a/Source/OpenEXR/IlmImf/ImfTiledInputFile.h +++ /dev/null @@ -1,381 +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 -#include -#include "ImathBox.h" -#include -#include - -namespace Imf { - - -class TiledInputFile -{ - public: - - //-------------------------------------------------------------------- - // A constructor that opens the file with the specified name, and - // reads the file header. The constructor throws an Iex::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 (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::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::Box2i dataWindowForLevel (int l = 0) const; - Imath::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::Box2i dataWindowForTile (int dx, int dy, int l = 0) const; - - Imath::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, - const char *&pixelData, - int &pixelDataSize); - - struct Data; - - private: - - friend class InputFile; - - TiledInputFile (const TiledInputFile &); // not implemented - TiledInputFile & operator = (const TiledInputFile &); // not implemented - - TiledInputFile (const Header &header, IStream *is, int version, - int numThreads); - - void initialize (); - - 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; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfTiledMisc.cpp b/Source/OpenEXR/IlmImf/ImfTiledMisc.cpp deleted file mode 100644 index 7c723bb..0000000 --- a/Source/OpenEXR/IlmImf/ImfTiledMisc.cpp +++ /dev/null @@ -1,301 +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 - - -namespace Imf { - -using Imath::Box2i; -using Imath::V2i; - - -int -levelSize (int min, int max, int l, LevelRoundingMode rmode) -{ - if (l < 0) - throw Iex::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; -} - - -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::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::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); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfTiledMisc.h b/Source/OpenEXR/IlmImf/ImfTiledMisc.h deleted file mode 100644 index 9342c6f..0000000 --- a/Source/OpenEXR/IlmImf/ImfTiledMisc.h +++ /dev/null @@ -1,75 +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 -#include - -namespace Imf { - -int levelSize (int min, int max, int l, LevelRoundingMode rmode); - -Imath::Box2i dataWindowForLevel (const TileDescription &tileDesc, - int minX, int maxX, - int minY, int maxY, - int lx, int ly); - -Imath::Box2i dataWindowForTile (const TileDescription &tileDesc, - int minX, int maxX, - int minY, int maxY, - int dx, int dy, - int lx, int ly); - -size_t calculateBytesPerPixel (const Header &header); - -void precalculateTileInfo (const TileDescription& tileDesc, - int minX, int maxX, - int minY, int maxY, - int *&numXTiles, int *&numYTiles, - int &numXLevels, int &numYLevels); - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp b/Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp deleted file mode 100644 index 9a96ac9..0000000 --- a/Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp +++ /dev/null @@ -1,1692 +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 "ImathBox.h" -#include -#include -#include -#include -#include -#include "IlmThreadPool.h" -#include "IlmThreadSemaphore.h" -#include "IlmThreadMutex.h" -#include "Iex.h" -#include -#include -#include -#include -#include - - -namespace Imf { - -using Imath::Box2i; -using Imath::V2i; -using std::string; -using std::vector; -using std::ofstream; -using std::map; -using std::min; -using std::max; -using std::swap; -using IlmThread::Mutex; -using IlmThread::Lock; -using IlmThread::Semaphore; -using IlmThread::Task; -using IlmThread::TaskGroup; -using IlmThread::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: public Mutex -{ - Header header; // the image header - int version; // file format version - 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 - OStream * os; // file stream to write to - bool deleteStream; - - 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 - Int64 currentPosition; // current position in the file - - TileMap tileMap; - TileCoord nextTileToWrite; - - Data (bool del, 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 (bool del, int numThreads): - numXTiles(0), - numYTiles(0), - os (0), - deleteStream (del), - tileOffsetsPosition (0) -{ - // - // 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; - - if (deleteStream) - delete os; - - // - // 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; - } - } - } - } - 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; - } - - if (b.ly < numYLevels) - b.dy = numYTiles[b.ly] - 1; - } - } - } - - return b; -} - - -namespace { - -void -writeTileData (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 = ofd->currentPosition; - ofd->currentPosition = 0; - - if (currentPosition == 0) - currentPosition = ofd->os->tellp(); - - ofd->tileOffsets (dx, dy, lx, ly) = currentPosition; - - #ifdef DEBUG - assert (ofd->os->tellp() == currentPosition); - #endif - - // - // Write the tile header. - // - - Xdr::write (*ofd->os, dx); - Xdr::write (*ofd->os, dy); - Xdr::write (*ofd->os, lx); - Xdr::write (*ofd->os, ly); - Xdr::write (*ofd->os, pixelDataSize); - - ofd->os->write (pixelData, pixelDataSize); - - // - // Keep current position in the file so that we can avoid - // redundant seekg() operations (seekg() can be fairly expensive). - // - - ofd->currentPosition = currentPosition + - 5 * Xdr::size() + - pixelDataSize; -} - - - -void -bufferedTileWrite (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::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); - 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::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); - 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); - - 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 = Imf::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 (true, numThreads)) -{ - try - { - header.sanityCheck (true); - _data->os = new StdOFStream (fileName); - initialize (header); - } - catch (Iex::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - delete _data; - throw; - } -} - - -TiledOutputFile::TiledOutputFile - (OStream &os, - const Header &header, - int numThreads) -: - _data (new Data (false, numThreads)) -{ - try - { - header.sanityCheck(true); - _data->os = &os; - initialize (header); - } - catch (Iex::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << os.fileName() << "\". " << 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(); - - // - // 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); - - _data->previewPosition = _data->header.writeTo (*_data->os, true); - - _data->tileOffsetsPosition = _data->tileOffsets.writeTo (*_data->os); - _data->currentPosition = _data->os->tellp(); -} - - -TiledOutputFile::~TiledOutputFile () -{ - if (_data) - { - { - if (_data->tileOffsetsPosition > 0) - { - try - { - _data->os->seekp (_data->tileOffsetsPosition); - _data->tileOffsets.writeTo (*_data->os); - } - 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. - // - } - } - } - - delete _data; - } -} - - -const char * -TiledOutputFile::fileName () const -{ - return _data->os->fileName(); -} - - -const Header & -TiledOutputFile::header () const -{ - return _data->header; -} - - -void -TiledOutputFile::setFrameBuffer (const FrameBuffer &frameBuffer) -{ - Lock lock (*_data); - - // - // 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::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::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 (*_data); - return _data->frameBuffer; -} - - -void -TiledOutputFile::writeTiles (int dx1, int dx2, int dy1, int dy2, - int lx, int ly) -{ - try - { - Lock lock (*_data); - - if (_data->slices.size() == 0) - throw Iex::ArgExc ("No frame buffer specified " - "as pixel data source."); - - if (!isValidTile (dx1, dy1, lx, ly) || !isValidTile (dx2, dy2, lx, ly)) - throw Iex::ArgExc ("Tile coordinates are 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); - - // - // 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 (int 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::IoExc (*exception); - } - catch (Iex::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 (*_data); - - // - // 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::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::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::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::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::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::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::LogicExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << _data->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 (size_t i_l = 0; i_l < numLevels (); ++i_l) - numAllTiles += numXTiles (i_l) * numYTiles (i_l); - - break; - - case RIPMAP_LEVELS: - - for (size_t i_ly = 0; i_ly < numYLevels (); ++i_ly) - for (size_t i_lx = 0; i_lx < numXLevels (); ++i_lx) - numAllTiles += numXTiles (i_lx) * numYTiles (i_ly); - - break; - - default: - - throw Iex::ArgExc ("Unknown LevelMode format."); - } - - 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 (_data, dx, dy, lx, ly, pixelData, pixelDataSize); - } -} - - -void -TiledOutputFile::copyPixels (InputFile &in) -{ - copyPixels (*in.tFile()); -} - - -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::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::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::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::LogicExc, "Error calling numXTiles() on image " - "file \"" << _data->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::LogicExc, "Error calling numXTiles() on image " - "file \"" << _data->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 Imf::dataWindowForLevel (_data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - lx, ly); - } - catch (Iex::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::ArgExc ("Arguments not in valid range."); - - return Imf::dataWindowForTile (_data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - dx, dy, - lx, ly); - } - catch (Iex::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 (*_data); - - if (_data->previewPosition <= 0) - THROW (Iex::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->os->tellp(); - - try - { - _data->os->seekp (_data->previewPosition); - pia.writeValueTo (*_data->os, _data->version); - _data->os->seekp (savedPosition); - } - catch (Iex::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 (*_data); - - Int64 position = _data->tileOffsets (dx, dy, lx, ly); - - if (!position) - THROW (Iex::ArgExc, - "Cannot overwrite tile " - "(" << dx << ", " << dy << ", " << lx << "," << ly << "). " - "The tile has not yet been stored in " - "file \"" << fileName() << "\"."); - - _data->currentPosition = 0; - _data->os->seekp (position + offset); - - for (int i = 0; i < length; ++i) - _data->os->write (&c, 1); -} - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfTiledOutputFile.h b/Source/OpenEXR/IlmImf/ImfTiledOutputFile.h deleted file mode 100644 index 3b4f3ff..0000000 --- a/Source/OpenEXR/IlmImf/ImfTiledOutputFile.h +++ /dev/null @@ -1,475 +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 -#include -#include "ImathBox.h" -#include -#include - -namespace Imf { - -class TiledInputFile; -class InputFile; -struct PreviewRgba; - - -class TiledOutputFile -{ - 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 (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::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::Box2i dataWindowForLevel (int l = 0) const; - Imath::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::Box2i dataWindowForTile (int dx, int dy, - int l = 0) const; - - Imath::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); - - - //------------------------------------------------------------------ - // 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); - - - //-------------------------------------------------------------- - // 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::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: - - 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; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp b/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp deleted file mode 100644 index 1448fe6..0000000 --- a/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp +++ /dev/null @@ -1,1162 +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" - - -namespace Imf { - -using namespace std; -using namespace Imath; -using namespace RgbaYca; -using namespace IlmThread; - -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::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::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 - (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::Box2i &displayWindow, - const Imath::Box2i &dataWindow, - RgbaChannels rgbaChannels, - float pixelAspectRatio, - const Imath::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::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::Box2i & -TiledRgbaOutputFile::displayWindow () const -{ - return _outputFile->header().displayWindow(); -} - - -const Imath::Box2i & -TiledRgbaOutputFile::dataWindow () const -{ - return _outputFile->header().dataWindow(); -} - - -float -TiledRgbaOutputFile::pixelAspectRatio () const -{ - return _outputFile->header().pixelAspectRatio(); -} - - -const Imath::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::Box2i -TiledRgbaOutputFile::dataWindowForLevel (int l) const -{ - return _outputFile->dataWindowForLevel (l); -} - - -Imath::Box2i -TiledRgbaOutputFile::dataWindowForLevel (int lx, int ly) const -{ - return _outputFile->dataWindowForLevel (lx, ly); -} - - -Imath::Box2i -TiledRgbaOutputFile::dataWindowForTile (int dx, int dy, int l) const -{ - return _outputFile->dataWindowForTile (dx, dy, l); -} - - -Imath::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::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 (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 (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::Box2i & -TiledRgbaInputFile::displayWindow () const -{ - return _inputFile->header().displayWindow(); -} - - -const Imath::Box2i & -TiledRgbaInputFile::dataWindow () const -{ - return _inputFile->header().dataWindow(); -} - - -float -TiledRgbaInputFile::pixelAspectRatio () const -{ - return _inputFile->header().pixelAspectRatio(); -} - - -const Imath::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::Box2i -TiledRgbaInputFile::dataWindowForLevel (int l) const -{ - return _inputFile->dataWindowForLevel (l); -} - - -Imath::Box2i -TiledRgbaInputFile::dataWindowForLevel (int lx, int ly) const -{ - return _inputFile->dataWindowForLevel (lx, ly); -} - - -Imath::Box2i -TiledRgbaInputFile::dataWindowForTile (int dx, int dy, int l) const -{ - return _inputFile->dataWindowForTile (dx, dy, l); -} - - -Imath::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); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.h b/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.h deleted file mode 100644 index 5fcd22b..0000000 --- a/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.h +++ /dev/null @@ -1,479 +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 -#include -#include "ImathVec.h" -#include "ImathBox.h" -#include "half.h" -#include -#include -#include -#include - -namespace Imf { - -class TiledOutputFile; -class TiledInputFile; -struct PreviewRgba; - - -// -// Tiled RGBA output file. -// - -class 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 (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::Box2i &displayWindow, - const Imath::Box2i &dataWindow = Imath::Box2i(), - RgbaChannels rgbaChannels = WRITE_RGBA, - float pixelAspectRatio = 1, - const Imath::V2f screenWindowCenter = - Imath::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::V2f screenWindowCenter = - Imath::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::Box2i & displayWindow () const; - const Imath::Box2i & dataWindow () const; - float pixelAspectRatio () const; - const Imath::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::Box2i dataWindowForLevel (int l = 0) const; - Imath::Box2i dataWindowForLevel (int lx, int ly) const; - - Imath::Box2i dataWindowForTile (int dx, int dy, - int l = 0) const; - - Imath::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 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 (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 (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::Box2i & displayWindow () const; - const Imath::Box2i & dataWindow () const; - float pixelAspectRatio () const; - const Imath::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::Box2i dataWindowForLevel (int l = 0) const; - Imath::Box2i dataWindowForLevel (int lx, int ly) const; - - Imath::Box2i dataWindowForTile (int dx, int dy, - int l = 0) const; - - Imath::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; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfTimeCode.cpp b/Source/OpenEXR/IlmImf/ImfTimeCode.cpp deleted file mode 100644 index 9b34cce..0000000 --- a/Source/OpenEXR/IlmImf/ImfTimeCode.cpp +++ /dev/null @@ -1,415 +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" - -namespace Imf { - - -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; -} - - -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::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::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::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::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 bool (bitField (_time, 6, 6)); -} - - -void -TimeCode::setDropFrame (bool value) -{ - setBitField (_time, 6, 6, (unsigned int) !!value); -} - - -bool -TimeCode::colorFrame () const -{ - return bool (bitField (_time, 7, 7)); -} - - -void -TimeCode::setColorFrame (bool value) -{ - setBitField (_time, 7, 7, (unsigned int) !!value); -} - - -bool -TimeCode::fieldPhase () const -{ - return bool (bitField (_time, 15, 15)); -} - - -void -TimeCode::setFieldPhase (bool value) -{ - setBitField (_time, 15, 15, (unsigned int) !!value); -} - - -bool -TimeCode::bgf0 () const -{ - return bool (bitField (_time, 23, 23)); -} - - -void -TimeCode::setBgf0 (bool value) -{ - setBitField (_time, 23, 23, (unsigned int) !!value); -} - - -bool -TimeCode::bgf1 () const -{ - return bool (bitField (_time, 30, 30)); -} - - -void -TimeCode::setBgf1 (bool value) -{ - setBitField (_time, 30, 30, (unsigned int) !!value); -} - - -bool -TimeCode::bgf2 () const -{ - return bool (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::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::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; -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfTimeCode.h b/Source/OpenEXR/IlmImf/ImfTimeCode.h deleted file mode 100644 index 3030d49..0000000 --- a/Source/OpenEXR/IlmImf/ImfTimeCode.h +++ /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. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_TIME_CODE_H -#define INCLUDED_IMF_TIME_CODE_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 -// -//----------------------------------------------------------------------------- - -namespace Imf { - - -class 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); - - private: - - unsigned int _time; - unsigned int _user; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp b/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp deleted file mode 100644 index 2c2088b..0000000 --- a/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp +++ /dev/null @@ -1,78 +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 - -namespace Imf { - - -template <> -const char * -TimeCodeAttribute::staticTypeName () -{ - return "timecode"; -} - - -template <> -void -TimeCodeAttribute::writeValueTo (OStream &os, int version) const -{ - Xdr::write (os, _value.timeAndFlags()); - Xdr::write (os, _value.userData()); -} - - -template <> -void -TimeCodeAttribute::readValueFrom (IStream &is, int size, int version) -{ - unsigned int tmp; - - Xdr::read (is, tmp); - _value.setTimeAndFlags (tmp); - - Xdr::read (is, tmp); - _value.setUserData (tmp); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.h b/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.h deleted file mode 100644 index 3d548fa..0000000 --- a/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.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_TIME_CODE_ATTRIBUTE_H -#define INCLUDED_IMF_TIME_CODE_ATTRIBUTE_H - - -//----------------------------------------------------------------------------- -// -// class TimeCodeAttribute -// -//----------------------------------------------------------------------------- - -#include -#include - - -namespace Imf { - - -typedef TypedAttribute TimeCodeAttribute; - -template <> -const char *TimeCodeAttribute::staticTypeName (); - -template <> -void TimeCodeAttribute::writeValueTo (OStream &, int) const; - -template <> -void TimeCodeAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfVecAttribute.cpp b/Source/OpenEXR/IlmImf/ImfVecAttribute.cpp deleted file mode 100644 index 7527bfd..0000000 --- a/Source/OpenEXR/IlmImf/ImfVecAttribute.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. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class V2iAttribute -// class V2fAttribute -// class V2dAttribute -// class V3iAttribute -// class V3fAttribute -// class V3dAttribute -// -//----------------------------------------------------------------------------- - -#include - - -namespace Imf { - - -template <> -const char * -V2iAttribute::staticTypeName () -{ - return "v2i"; -} - - -template <> -void -V2iAttribute::writeValueTo (OStream &os, int version) const -{ - Xdr::write (os, _value.x); - Xdr::write (os, _value.y); -} - - -template <> -void -V2iAttribute::readValueFrom (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 (OStream &os, int version) const -{ - Xdr::write (os, _value.x); - Xdr::write (os, _value.y); -} - - -template <> -void -V2fAttribute::readValueFrom (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 (OStream &os, int version) const -{ - Xdr::write (os, _value.x); - Xdr::write (os, _value.y); -} - - -template <> -void -V2dAttribute::readValueFrom (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 (OStream &os, int version) const -{ - Xdr::write (os, _value.x); - Xdr::write (os, _value.y); - Xdr::write (os, _value.z); -} - - -template <> -void -V3iAttribute::readValueFrom (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 (OStream &os, int version) const -{ - Xdr::write (os, _value.x); - Xdr::write (os, _value.y); - Xdr::write (os, _value.z); -} - - -template <> -void -V3fAttribute::readValueFrom (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 (OStream &os, int version) const -{ - Xdr::write (os, _value.x); - Xdr::write (os, _value.y); - Xdr::write (os, _value.z); -} - - -template <> -void -V3dAttribute::readValueFrom (IStream &is, int size, int version) -{ - Xdr::read (is, _value.x); - Xdr::read (is, _value.y); - Xdr::read (is, _value.z); -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfVecAttribute.h b/Source/OpenEXR/IlmImf/ImfVecAttribute.h deleted file mode 100644 index b0b79ba..0000000 --- a/Source/OpenEXR/IlmImf/ImfVecAttribute.h +++ /dev/null @@ -1,101 +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 -#include "ImathVec.h" - - -namespace Imf { - - -typedef TypedAttribute V2iAttribute; -template <> const char *V2iAttribute::staticTypeName (); -template <> void V2iAttribute::writeValueTo (OStream &, int) const; -template <> void V2iAttribute::readValueFrom (IStream &, int, int); - - -typedef TypedAttribute V2fAttribute; -template <> const char *V2fAttribute::staticTypeName (); -template <> void V2fAttribute::writeValueTo (OStream &, int) const; -template <> void V2fAttribute::readValueFrom (IStream &, int, int); - - -typedef TypedAttribute V2dAttribute; -template <> const char *V2dAttribute::staticTypeName (); -template <> void V2dAttribute::writeValueTo (OStream &, int) const; -template <> void V2dAttribute::readValueFrom (IStream &, int, int); - - -typedef TypedAttribute V3iAttribute; -template <> const char *V3iAttribute::staticTypeName (); -template <> void V3iAttribute::writeValueTo (OStream &, int) const; -template <> void V3iAttribute::readValueFrom (IStream &, int, int); - - -typedef TypedAttribute V3fAttribute; -template <> const char *V3fAttribute::staticTypeName (); -template <> void V3fAttribute::writeValueTo (OStream &, int) const; -template <> void V3fAttribute::readValueFrom (IStream &, int, int); - - -typedef TypedAttribute V3dAttribute; -template <> const char *V3dAttribute::staticTypeName (); -template <> void V3dAttribute::writeValueTo (OStream &, int) const; -template <> void V3dAttribute::readValueFrom (IStream &, int, int); - - -} // namespace Imf - -// Metrowerks compiler wants the .cpp file inlined, too -#ifdef __MWERKS__ -#include -#endif - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfVersion.cpp b/Source/OpenEXR/IlmImf/ImfVersion.cpp deleted file mode 100644 index 3814479..0000000 --- a/Source/OpenEXR/IlmImf/ImfVersion.cpp +++ /dev/null @@ -1,59 +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 - -namespace Imf { - - -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); -} - - -} // namespace Imf - diff --git a/Source/OpenEXR/IlmImf/ImfVersion.h b/Source/OpenEXR/IlmImf/ImfVersion.h deleted file mode 100644 index 34fb93b..0000000 --- a/Source/OpenEXR/IlmImf/ImfVersion.h +++ /dev/null @@ -1,120 +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. -// -//----------------------------------------------------------------------------- - - -namespace Imf { - - -// -// 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 - -// -// Bitwise OR of all known flags. -// - -const int ALL_FLAGS = TILED_FLAG | LONG_NAMES_FLAG; - - -// -// Utility functions -// - -inline bool isTiled (int version) {return !!(version & TILED_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. -// - -bool isImfMagic (const char bytes[4]); - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfWav.cpp b/Source/OpenEXR/IlmImf/ImfWav.cpp deleted file mode 100644 index d4486d5..0000000 --- a/Source/OpenEXR/IlmImf/ImfWav.cpp +++ /dev/null @@ -1,390 +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 - -namespace Imf { -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; - } -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfWav.h b/Source/OpenEXR/IlmImf/ImfWav.h deleted file mode 100644 index 815d2d5..0000000 --- a/Source/OpenEXR/IlmImf/ImfWav.h +++ /dev/null @@ -1,70 +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 -// -//----------------------------------------------------------------------------- - -namespace Imf { - - -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 - -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 - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfXdr.h b/Source/OpenEXR/IlmImf/ImfXdr.h deleted file mode 100644 index 7992921..0000000 --- a/Source/OpenEXR/IlmImf/ImfXdr.h +++ /dev/null @@ -1,916 +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 -#include "IexMathExc.h" -#include "half.h" -#include - -namespace Imf { -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::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::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 4;} -template <> inline int size () {return 8;} -template <> inline int size () {return 2;} - - -} // namespace Xdr -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/ImfZipCompressor.cpp b/Source/OpenEXR/IlmImf/ImfZipCompressor.cpp deleted file mode 100644 index 1a56adf..0000000 --- a/Source/OpenEXR/IlmImf/ImfZipCompressor.cpp +++ /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. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class ZipCompressor -// -//----------------------------------------------------------------------------- -//#define ZLIB_WINAPI - -#include -#include -#include "Iex.h" -#include - -namespace Imf { - - -ZipCompressor::ZipCompressor - (const Header &hdr, - size_t maxScanLineSize, - size_t numScanLines) -: - Compressor (hdr), - _maxScanLineSize (maxScanLineSize), - _numScanLines (numScanLines), - _tmpBuffer (0), - _outBuffer (0) -{ - size_t maxInBytes = - uiMult (maxScanLineSize, numScanLines); - - size_t maxOutBytes = - uiAdd (uiAdd (maxInBytes, - size_t (ceil (maxInBytes * 0.01))), - size_t (100)); - - _tmpBuffer = - new char [maxInBytes]; - - _outBuffer = - new char [maxOutBytes]; -} - - -ZipCompressor::~ZipCompressor () -{ - delete [] _tmpBuffer; - 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; - } - - // - // 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; - } - } - - // - // Compress the data using zlib - // - - uLongf outSize = int(ceil(inSize * 1.01)) + 100; - - if (Z_OK != ::compress ((Bytef *)_outBuffer, &outSize, - (const Bytef *) _tmpBuffer, inSize)) - { - throw Iex::BaseExc ("Data compression (zlib) failed."); - } - - 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; - } - - // - // Decompress the data using zlib - // - - uLongf outSize = _maxScanLineSize * _numScanLines; - - if (Z_OK != ::uncompress ((Bytef *)_tmpBuffer, &outSize, - (const Bytef *) inPtr, inSize)) - { - 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 = _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; -} - - -} // namespace Imf diff --git a/Source/OpenEXR/IlmImf/ImfZipCompressor.h b/Source/OpenEXR/IlmImf/ImfZipCompressor.h deleted file mode 100644 index a515348..0000000 --- a/Source/OpenEXR/IlmImf/ImfZipCompressor.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_ZIP_COMPRESSOR_H -#define INCLUDED_IMF_ZIP_COMPRESSOR_H - -//----------------------------------------------------------------------------- -// -// class ZipCompressor -- performs zlib-style compression -// -//----------------------------------------------------------------------------- - -#include - -namespace Imf { - - -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 * _tmpBuffer; - char * _outBuffer; -}; - - -} // namespace Imf - -#endif diff --git a/Source/OpenEXR/IlmImf/Makefile.am b/Source/OpenEXR/IlmImf/Makefile.am deleted file mode 100644 index d5b2b1c..0000000 --- a/Source/OpenEXR/IlmImf/Makefile.am +++ /dev/null @@ -1,128 +0,0 @@ -## Process this file with automake to produce Makefile.in - -lib_LTLIBRARIES = libIlmImf.la - -libIlmImf_la_SOURCES = ImfAttribute.cpp ImfBoxAttribute.cpp ImfCRgbaFile.cpp \ - ImfChannelList.cpp ImfChannelListAttribute.cpp \ - ImfFloatAttribute.cpp ImfFrameBuffer.cpp \ - ImfHeader.cpp ImfIO.cpp ImfInputFile.cpp \ - ImfIntAttribute.cpp ImfLineOrderAttribute.cpp \ - ImfMatrixAttribute.cpp ImfOpaqueAttribute.cpp \ - ImfOutputFile.cpp ImfRgbaFile.cpp \ - ImfStringAttribute.cpp ImfVecAttribute.cpp ImfHuf.cpp \ - ImfThreading.cpp \ - ImfWav.cpp ImfLut.cpp ImfCompressor.cpp \ - ImfRleCompressor.cpp ImfZipCompressor.cpp \ - ImfPizCompressor.cpp ImfB44Compressor.cpp ImfMisc.cpp \ - ImfCompressionAttribute.cpp ImfDoubleAttribute.cpp \ - ImfAttribute.h ImfBoxAttribute.h \ - ImfCRgbaFile.h ImfChannelList.h \ - ImfChannelListAttribute.h \ - ImfCompressionAttribute.h \ - ImfDoubleAttribute.h ImfFloatAttribute.h \ - ImfFrameBuffer.h ImfHeader.h ImfIO.h \ - ImfInputFile.h ImfIntAttribute.h \ - ImfLineOrderAttribute.h ImfMatrixAttribute.h \ - ImfOpaqueAttribute.h ImfOutputFile.h \ - ImfRgbaFile.h ImfStringAttribute.h \ - ImfVecAttribute.h ImfHuf.h ImfWav.h ImfLut.h \ - ImfArray.h ImfCompression.h ImfLineOrder.h \ - ImfName.h ImfPixelType.h ImfVersion.h ImfXdr.h \ - ImfCompressor.h ImfRleCompressor.h ImfZipCompressor.h \ - ImfPizCompressor.h ImfMisc.h ImfAutoArray.h \ - ImfConvert.cpp ImfConvert.h ImfPreviewImage.cpp \ - ImfPreviewImage.h ImfPreviewImageAttribute.cpp \ - ImfPreviewImageAttribute.h ImfVersion.cpp \ - ImfChromaticities.cpp ImfChromaticities.h \ - ImfChromaticitiesAttribute.cpp \ - ImfChromaticitiesAttribute.h \ - ImfKeyCode.cpp ImfKeyCode.h \ - ImfKeyCodeAttribute.cpp ImfKeyCodeAttribute.h \ - ImfTimeCode.cpp ImfTimeCode.h \ - ImfTimeCodeAttribute.cpp ImfTimeCodeAttribute.h \ - ImfRational.cpp ImfRational.h \ - ImfRationalAttribute.cpp ImfRationalAttribute.h \ - ImfFramesPerSecond.cpp ImfFramesPerSecond.h \ - ImfStandardAttributes.cpp ImfStandardAttributes.h \ - ImfStdIO.cpp ImfStdIO.h ImfEnvmap.cpp ImfEnvmap.h \ - ImfEnvmapAttribute.cpp ImfEnvmapAttribute.h \ - ImfInt64.h ImfRgba.h ImfScanLineInputFile.cpp \ - ImfScanLineInputFile.h ImfTiledInputFile.cpp \ - ImfTiledMisc.cpp ImfTiledOutputFile.cpp \ - ImfTiledRgbaFile.cpp ImfTileDescriptionAttribute.cpp \ - ImfTileOffsets.cpp ImfTileDescription.h \ - ImfTileDescriptionAttribute.h ImfTileOffsets.h \ - ImfTiledInputFile.h ImfTiledMisc.h \ - ImfTiledOutputFile.h ImfTiledRgbaFile.h \ - ImfRgbaYca.cpp ImfRgbaYca.h \ - ImfPxr24Compressor.cpp ImfPxr24Compressor.h \ - ImfTestFile.cpp ImfTestFile.h ImfThreading.h \ - ImfStringVectorAttribute.cpp ImfStringVectorAttribute.h \ - ImfMultiView.cpp ImfMultiView.h \ - ImfAcesFile.cpp ImfAcesFile.h \ - ImfCheckedArithmetic.h - -libIlmImf_la_LDFLAGS = @ILMBASE_LDFLAGS@ -version-info @LIBTOOL_VERSION@ \ - -no-undefined - -libIlmImf_la_LIBADD = -lz @ILMBASE_LIBS@ - -libIlmImfincludedir = $(includedir)/OpenEXR - -libIlmImfinclude_HEADERS = ImfAttribute.h ImfBoxAttribute.h \ - ImfCRgbaFile.h ImfChannelList.h \ - ImfChannelListAttribute.h \ - ImfCompressionAttribute.h \ - ImfDoubleAttribute.h ImfFloatAttribute.h \ - ImfFrameBuffer.h ImfHeader.h ImfIO.h \ - ImfInputFile.h ImfIntAttribute.h \ - ImfLineOrderAttribute.h ImfMatrixAttribute.h \ - ImfOpaqueAttribute.h ImfOutputFile.h \ - ImfRgbaFile.h ImfStringAttribute.h \ - ImfVecAttribute.h ImfHuf.h ImfWav.h ImfLut.h \ - ImfArray.h ImfCompression.h ImfLineOrder.h \ - ImfName.h ImfPixelType.h ImfVersion.h ImfXdr.h \ - ImfConvert.h ImfPreviewImage.h \ - ImfPreviewImageAttribute.h ImfChromaticities.h \ - ImfChromaticitiesAttribute.h \ - ImfKeyCode.h ImfKeyCodeAttribute.h \ - ImfTimeCode.h ImfTimeCodeAttribute.h \ - ImfRational.h ImfRationalAttribute.h \ - ImfFramesPerSecond.h \ - ImfStandardAttributes.h \ - ImfEnvmap.h \ - ImfEnvmapAttribute.h \ - ImfInt64.h ImfRgba.h \ - ImfTileDescription.h \ - ImfTileDescriptionAttribute.h \ - ImfTiledInputFile.h \ - ImfTiledOutputFile.h ImfTiledRgbaFile.h \ - ImfRgbaYca.h \ - ImfTestFile.h ImfThreading.h \ - ImfB44Compressor.h ImfStringVectorAttribute.h \ - ImfMultiView.h \ - ImfAcesFile.h - -noinst_HEADERS = ImfCompressor.h ImfRleCompressor.h ImfZipCompressor.h \ - ImfPizCompressor.h ImfMisc.h ImfAutoArray.h ImfTiledMisc.h \ - ImfTileOffsets.h ImfScanLineInputFile.h ImfPxr24Compressor.h \ - ImfCheckedArithmetic.h - -EXTRA_DIST = $(noinst_HEADERS) b44ExpLogTable.cpp b44ExpLogTable.h - - -INCLUDES = @ILMBASE_CXXFLAGS@ \ - -I$(top_builddir) \ - -I$(top_srcdir)/config - -CLEANFILES = b44ExpLogTable b44ExpLogTable.h - -b44ExpLogTable_SOURCES = b44ExpLogTable.cpp -b44ExpLogTable_LDADD = @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@ - -b44ExpLogTable.h: b44ExpLogTable - ./b44ExpLogTable > b44ExpLogTable.h - -BUILT_SOURCES = b44ExpLogTable.h - -noinst_PROGRAMS = b44ExpLogTable diff --git a/Source/OpenEXR/IlmImf/Makefile.in b/Source/OpenEXR/IlmImf/Makefile.in deleted file mode 100644 index d4c8107..0000000 --- a/Source/OpenEXR/IlmImf/Makefile.in +++ /dev/null @@ -1,736 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = b44ExpLogTable$(EXEEXT) -subdir = IlmImf -DIST_COMMON = $(libIlmImfinclude_HEADERS) $(noinst_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/compilelinkrun.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/path.pkgconfig.m4 $(top_srcdir)/m4/threads.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/OpenEXRConfig.h -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(libIlmImfincludedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libIlmImf_la_DEPENDENCIES = -am_libIlmImf_la_OBJECTS = ImfAttribute.lo ImfBoxAttribute.lo \ - ImfCRgbaFile.lo ImfChannelList.lo ImfChannelListAttribute.lo \ - ImfFloatAttribute.lo ImfFrameBuffer.lo ImfHeader.lo ImfIO.lo \ - ImfInputFile.lo ImfIntAttribute.lo ImfLineOrderAttribute.lo \ - ImfMatrixAttribute.lo ImfOpaqueAttribute.lo ImfOutputFile.lo \ - ImfRgbaFile.lo ImfStringAttribute.lo ImfVecAttribute.lo \ - ImfHuf.lo ImfThreading.lo ImfWav.lo ImfLut.lo ImfCompressor.lo \ - ImfRleCompressor.lo ImfZipCompressor.lo ImfPizCompressor.lo \ - ImfB44Compressor.lo ImfMisc.lo ImfCompressionAttribute.lo \ - ImfDoubleAttribute.lo ImfConvert.lo ImfPreviewImage.lo \ - ImfPreviewImageAttribute.lo ImfVersion.lo ImfChromaticities.lo \ - ImfChromaticitiesAttribute.lo ImfKeyCode.lo \ - ImfKeyCodeAttribute.lo ImfTimeCode.lo ImfTimeCodeAttribute.lo \ - ImfRational.lo ImfRationalAttribute.lo ImfFramesPerSecond.lo \ - ImfStandardAttributes.lo ImfStdIO.lo ImfEnvmap.lo \ - ImfEnvmapAttribute.lo ImfScanLineInputFile.lo \ - ImfTiledInputFile.lo ImfTiledMisc.lo ImfTiledOutputFile.lo \ - ImfTiledRgbaFile.lo ImfTileDescriptionAttribute.lo \ - ImfTileOffsets.lo ImfRgbaYca.lo ImfPxr24Compressor.lo \ - ImfTestFile.lo ImfStringVectorAttribute.lo ImfMultiView.lo \ - ImfAcesFile.lo -libIlmImf_la_OBJECTS = $(am_libIlmImf_la_OBJECTS) -PROGRAMS = $(noinst_PROGRAMS) -am_b44ExpLogTable_OBJECTS = b44ExpLogTable.$(OBJEXT) -b44ExpLogTable_OBJECTS = $(am_b44ExpLogTable_OBJECTS) -b44ExpLogTable_DEPENDENCIES = -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libIlmImf_la_SOURCES) $(b44ExpLogTable_SOURCES) -DIST_SOURCES = $(libIlmImf_la_SOURCES) $(b44ExpLogTable_SOURCES) -libIlmImfincludeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(libIlmImfinclude_HEADERS) $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AM_CFLAGS = @AM_CFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_IMFEXAMPLES_FALSE = @BUILD_IMFEXAMPLES_FALSE@ -BUILD_IMFEXAMPLES_TRUE = @BUILD_IMFEXAMPLES_TRUE@ -BUILD_IMFFUZZTEST_FALSE = @BUILD_IMFFUZZTEST_FALSE@ -BUILD_IMFFUZZTEST_TRUE = @BUILD_IMFFUZZTEST_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -ILMBASE_CXXFLAGS = @ILMBASE_CXXFLAGS@ -ILMBASE_LDFLAGS = @ILMBASE_LDFLAGS@ -ILMBASE_LIBS = @ILMBASE_LIBS@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_VERSION = @LIBTOOL_VERSION@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENEXR_VERSION = @OPENEXR_VERSION@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_LIPO = @ac_ct_LIPO@ -ac_ct_NMEDIT = @ac_ct_NMEDIT@ -ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ -ac_ct_OTOOL = @ac_ct_OTOOL@ -ac_ct_OTOOL64 = @ac_ct_OTOOL64@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -acx_pthread_config = @acx_pthread_config@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -lib_LTLIBRARIES = libIlmImf.la -libIlmImf_la_SOURCES = ImfAttribute.cpp ImfBoxAttribute.cpp ImfCRgbaFile.cpp \ - ImfChannelList.cpp ImfChannelListAttribute.cpp \ - ImfFloatAttribute.cpp ImfFrameBuffer.cpp \ - ImfHeader.cpp ImfIO.cpp ImfInputFile.cpp \ - ImfIntAttribute.cpp ImfLineOrderAttribute.cpp \ - ImfMatrixAttribute.cpp ImfOpaqueAttribute.cpp \ - ImfOutputFile.cpp ImfRgbaFile.cpp \ - ImfStringAttribute.cpp ImfVecAttribute.cpp ImfHuf.cpp \ - ImfThreading.cpp \ - ImfWav.cpp ImfLut.cpp ImfCompressor.cpp \ - ImfRleCompressor.cpp ImfZipCompressor.cpp \ - ImfPizCompressor.cpp ImfB44Compressor.cpp ImfMisc.cpp \ - ImfCompressionAttribute.cpp ImfDoubleAttribute.cpp \ - ImfAttribute.h ImfBoxAttribute.h \ - ImfCRgbaFile.h ImfChannelList.h \ - ImfChannelListAttribute.h \ - ImfCompressionAttribute.h \ - ImfDoubleAttribute.h ImfFloatAttribute.h \ - ImfFrameBuffer.h ImfHeader.h ImfIO.h \ - ImfInputFile.h ImfIntAttribute.h \ - ImfLineOrderAttribute.h ImfMatrixAttribute.h \ - ImfOpaqueAttribute.h ImfOutputFile.h \ - ImfRgbaFile.h ImfStringAttribute.h \ - ImfVecAttribute.h ImfHuf.h ImfWav.h ImfLut.h \ - ImfArray.h ImfCompression.h ImfLineOrder.h \ - ImfName.h ImfPixelType.h ImfVersion.h ImfXdr.h \ - ImfCompressor.h ImfRleCompressor.h ImfZipCompressor.h \ - ImfPizCompressor.h ImfMisc.h ImfAutoArray.h \ - ImfConvert.cpp ImfConvert.h ImfPreviewImage.cpp \ - ImfPreviewImage.h ImfPreviewImageAttribute.cpp \ - ImfPreviewImageAttribute.h ImfVersion.cpp \ - ImfChromaticities.cpp ImfChromaticities.h \ - ImfChromaticitiesAttribute.cpp \ - ImfChromaticitiesAttribute.h \ - ImfKeyCode.cpp ImfKeyCode.h \ - ImfKeyCodeAttribute.cpp ImfKeyCodeAttribute.h \ - ImfTimeCode.cpp ImfTimeCode.h \ - ImfTimeCodeAttribute.cpp ImfTimeCodeAttribute.h \ - ImfRational.cpp ImfRational.h \ - ImfRationalAttribute.cpp ImfRationalAttribute.h \ - ImfFramesPerSecond.cpp ImfFramesPerSecond.h \ - ImfStandardAttributes.cpp ImfStandardAttributes.h \ - ImfStdIO.cpp ImfStdIO.h ImfEnvmap.cpp ImfEnvmap.h \ - ImfEnvmapAttribute.cpp ImfEnvmapAttribute.h \ - ImfInt64.h ImfRgba.h ImfScanLineInputFile.cpp \ - ImfScanLineInputFile.h ImfTiledInputFile.cpp \ - ImfTiledMisc.cpp ImfTiledOutputFile.cpp \ - ImfTiledRgbaFile.cpp ImfTileDescriptionAttribute.cpp \ - ImfTileOffsets.cpp ImfTileDescription.h \ - ImfTileDescriptionAttribute.h ImfTileOffsets.h \ - ImfTiledInputFile.h ImfTiledMisc.h \ - ImfTiledOutputFile.h ImfTiledRgbaFile.h \ - ImfRgbaYca.cpp ImfRgbaYca.h \ - ImfPxr24Compressor.cpp ImfPxr24Compressor.h \ - ImfTestFile.cpp ImfTestFile.h ImfThreading.h \ - ImfStringVectorAttribute.cpp ImfStringVectorAttribute.h \ - ImfMultiView.cpp ImfMultiView.h \ - ImfAcesFile.cpp ImfAcesFile.h \ - ImfCheckedArithmetic.h - -libIlmImf_la_LDFLAGS = @ILMBASE_LDFLAGS@ -version-info @LIBTOOL_VERSION@ \ - -no-undefined - -libIlmImf_la_LIBADD = -lz @ILMBASE_LIBS@ -libIlmImfincludedir = $(includedir)/OpenEXR -libIlmImfinclude_HEADERS = ImfAttribute.h ImfBoxAttribute.h \ - ImfCRgbaFile.h ImfChannelList.h \ - ImfChannelListAttribute.h \ - ImfCompressionAttribute.h \ - ImfDoubleAttribute.h ImfFloatAttribute.h \ - ImfFrameBuffer.h ImfHeader.h ImfIO.h \ - ImfInputFile.h ImfIntAttribute.h \ - ImfLineOrderAttribute.h ImfMatrixAttribute.h \ - ImfOpaqueAttribute.h ImfOutputFile.h \ - ImfRgbaFile.h ImfStringAttribute.h \ - ImfVecAttribute.h ImfHuf.h ImfWav.h ImfLut.h \ - ImfArray.h ImfCompression.h ImfLineOrder.h \ - ImfName.h ImfPixelType.h ImfVersion.h ImfXdr.h \ - ImfConvert.h ImfPreviewImage.h \ - ImfPreviewImageAttribute.h ImfChromaticities.h \ - ImfChromaticitiesAttribute.h \ - ImfKeyCode.h ImfKeyCodeAttribute.h \ - ImfTimeCode.h ImfTimeCodeAttribute.h \ - ImfRational.h ImfRationalAttribute.h \ - ImfFramesPerSecond.h \ - ImfStandardAttributes.h \ - ImfEnvmap.h \ - ImfEnvmapAttribute.h \ - ImfInt64.h ImfRgba.h \ - ImfTileDescription.h \ - ImfTileDescriptionAttribute.h \ - ImfTiledInputFile.h \ - ImfTiledOutputFile.h ImfTiledRgbaFile.h \ - ImfRgbaYca.h \ - ImfTestFile.h ImfThreading.h \ - ImfB44Compressor.h ImfStringVectorAttribute.h \ - ImfMultiView.h \ - ImfAcesFile.h - -noinst_HEADERS = ImfCompressor.h ImfRleCompressor.h ImfZipCompressor.h \ - ImfPizCompressor.h ImfMisc.h ImfAutoArray.h ImfTiledMisc.h \ - ImfTileOffsets.h ImfScanLineInputFile.h ImfPxr24Compressor.h \ - ImfCheckedArithmetic.h - -EXTRA_DIST = $(noinst_HEADERS) b44ExpLogTable.cpp b44ExpLogTable.h -INCLUDES = @ILMBASE_CXXFLAGS@ \ - -I$(top_builddir) \ - -I$(top_srcdir)/config - -CLEANFILES = b44ExpLogTable b44ExpLogTable.h -b44ExpLogTable_SOURCES = b44ExpLogTable.cpp -b44ExpLogTable_LDADD = @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@ -BUILT_SOURCES = b44ExpLogTable.h -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu IlmImf/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu IlmImf/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libIlmImf.la: $(libIlmImf_la_OBJECTS) $(libIlmImf_la_DEPENDENCIES) - $(CXXLINK) -rpath $(libdir) $(libIlmImf_la_LDFLAGS) $(libIlmImf_la_OBJECTS) $(libIlmImf_la_LIBADD) $(LIBS) - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -b44ExpLogTable$(EXEEXT): $(b44ExpLogTable_OBJECTS) $(b44ExpLogTable_DEPENDENCIES) - @rm -f b44ExpLogTable$(EXEEXT) - $(CXXLINK) $(b44ExpLogTable_LDFLAGS) $(b44ExpLogTable_OBJECTS) $(b44ExpLogTable_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfAcesFile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfB44Compressor.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfBoxAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfCRgbaFile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfChannelList.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfChannelListAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfChromaticities.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfChromaticitiesAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfCompressionAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfCompressor.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfConvert.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfDoubleAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfEnvmap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfEnvmapAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfFloatAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfFrameBuffer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfFramesPerSecond.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfHeader.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfHuf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfIO.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfInputFile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfIntAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfKeyCode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfKeyCodeAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfLineOrderAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfLut.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfMatrixAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfMisc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfMultiView.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfOpaqueAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfOutputFile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfPizCompressor.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfPreviewImage.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfPreviewImageAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfPxr24Compressor.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfRational.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfRationalAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfRgbaFile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfRgbaYca.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfRleCompressor.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfScanLineInputFile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfStandardAttributes.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfStdIO.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfStringAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfStringVectorAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfTestFile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfThreading.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfTileDescriptionAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfTileOffsets.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfTiledInputFile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfTiledMisc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfTiledOutputFile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfTiledRgbaFile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfTimeCode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfTimeCodeAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfVecAttribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfVersion.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfWav.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImfZipCompressor.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b44ExpLogTable.Po@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-libIlmImfincludeHEADERS: $(libIlmImfinclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libIlmImfincludedir)" || $(mkdir_p) "$(DESTDIR)$(libIlmImfincludedir)" - @list='$(libIlmImfinclude_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libIlmImfincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libIlmImfincludedir)/$$f'"; \ - $(libIlmImfincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libIlmImfincludedir)/$$f"; \ - done - -uninstall-libIlmImfincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libIlmImfinclude_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libIlmImfincludedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libIlmImfincludedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libIlmImfincludedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-libIlmImfincludeHEADERS - -install-exec-am: install-libLTLIBRARIES - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-libIlmImfincludeHEADERS \ - uninstall-libLTLIBRARIES - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-libIlmImfincludeHEADERS \ - install-libLTLIBRARIES install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am \ - uninstall-libIlmImfincludeHEADERS uninstall-libLTLIBRARIES - - -b44ExpLogTable.h: b44ExpLogTable - ./b44ExpLogTable > b44ExpLogTable.h -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/Source/OpenEXR/IlmImf/b44ExpLogTable.cpp b/Source/OpenEXR/IlmImf/b44ExpLogTable.cpp deleted file mode 100644 index 24e35fb..0000000 --- a/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/Source/OpenEXR/IlmImf/b44ExpLogTable.h b/Source/OpenEXR/IlmImf/b44ExpLogTable.h deleted file mode 100644 index c13d16c..0000000 --- a/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/Source/OpenEXR/IlmThread/IlmThread.cpp b/Source/OpenEXR/IlmThread/IlmThread.cpp deleted file mode 100644 index 71563d7..0000000 --- a/Source/OpenEXR/IlmThread/IlmThread.cpp +++ /dev/null @@ -1,80 +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. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// 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" - -namespace IlmThread { - - -bool -supportsThreads () -{ - return false; -} - - -Thread::Thread () -{ - throw Iex::NoImplExc ("Threads not supported on this platform."); -} - - -Thread::~Thread () -{ - throw Iex::NoImplExc ("Threads not supported on this platform."); -} - - -void -Thread::start () -{ - throw Iex::NoImplExc ("Threads not supported on this platform."); -} - - -} // namespace IlmThread - -//#endif diff --git a/Source/OpenEXR/IlmThread/IlmThread.h b/Source/OpenEXR/IlmThread/IlmThread.h deleted file mode 100644 index e5ca595..0000000 --- a/Source/OpenEXR/IlmThread/IlmThread.h +++ /dev/null @@ -1,151 +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_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" - -#if defined _WIN32 || defined _WIN64 - #ifdef NOMINMAX - #undef NOMINMAX - #endif - #define NOMINMAX - #include - #include -#elif HAVE_PTHREAD - #include -#endif - -#if defined(OPENEXR_DLL) && !defined(ZENO_STATIC) - #ifdef ILMTHREAD_EXPORTS - #define ILMTHREAD_EXPORT __declspec(dllexport) - #else - #define ILMTHREAD_EXPORT __declspec(dllimport) - #endif -#else - #define ILMTHREAD_EXPORT -#endif - -namespace IlmThread { - -// -// 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 -}; - - -} // namespace IlmThread - -#endif diff --git a/Source/OpenEXR/IlmThread/IlmThreadMutex.cpp b/Source/OpenEXR/IlmThread/IlmThreadMutex.cpp deleted file mode 100644 index 7a7a4a6..0000000 --- a/Source/OpenEXR/IlmThread/IlmThreadMutex.cpp +++ /dev/null @@ -1,59 +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. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// 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" - -namespace IlmThread { - - -Mutex::Mutex () {} -Mutex::~Mutex () {} -void Mutex::lock () const {} -void Mutex::unlock () const {} - - -} // namespace IlmThread - -//#endif diff --git a/Source/OpenEXR/IlmThread/IlmThreadMutex.h b/Source/OpenEXR/IlmThread/IlmThreadMutex.h deleted file mode 100644 index 354282b..0000000 --- a/Source/OpenEXR/IlmThread/IlmThreadMutex.h +++ /dev/null @@ -1,158 +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_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 "IlmBaseConfig.h" - -#if defined _WIN32 || defined _WIN64 - #ifdef NOMINMAX - #undef NOMINMAX - #endif - #define NOMINMAX - #include -#elif HAVE_PTHREAD - #include -#endif - -namespace IlmThread { - -class Lock; - - -class 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 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; -}; - - -} // namespace IlmThread - -#endif diff --git a/Source/OpenEXR/IlmThread/IlmThreadMutexPosix.cpp b/Source/OpenEXR/IlmThread/IlmThreadMutexPosix.cpp deleted file mode 100644 index 5f72c10..0000000 --- a/Source/OpenEXR/IlmThread/IlmThreadMutexPosix.cpp +++ /dev/null @@ -1,85 +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. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Mutex -- implementation for -// platforms that support Posix threads -// -//----------------------------------------------------------------------------- - -#include "IlmBaseConfig.h" - -#if HAVE_PTHREAD - -#include "IlmThreadMutex.h" -#include "Iex.h" -#include - -namespace IlmThread { - - -Mutex::Mutex () -{ - if (int error = ::pthread_mutex_init (&_mutex, 0)) - Iex::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::throwErrnoExc ("Cannot lock mutex (%T).", error); -} - - -void -Mutex::unlock () const -{ - if (int error = ::pthread_mutex_unlock (&_mutex)) - Iex::throwErrnoExc ("Cannot unlock mutex (%T).", error); -} - - -} // namespace IlmThread - -#endif diff --git a/Source/OpenEXR/IlmThread/IlmThreadMutexWin32.cpp b/Source/OpenEXR/IlmThread/IlmThreadMutexWin32.cpp deleted file mode 100644 index 1a34c7e..0000000 --- a/Source/OpenEXR/IlmThread/IlmThreadMutexWin32.cpp +++ /dev/null @@ -1,73 +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. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Mutex -- implementation for Windows -// -//----------------------------------------------------------------------------- - -#include "IlmThreadMutex.h" -#include "Iex.h" - -namespace IlmThread { - - -Mutex::Mutex () -{ - ::InitializeCriticalSection (&_mutex); -} - - -Mutex::~Mutex () -{ - ::DeleteCriticalSection (&_mutex); -} - - -void -Mutex::lock () const -{ - ::EnterCriticalSection (&_mutex); -} - - -void -Mutex::unlock () const -{ - ::LeaveCriticalSection (&_mutex); -} - - -} // namespace IlmThread diff --git a/Source/OpenEXR/IlmThread/IlmThreadPool.cpp b/Source/OpenEXR/IlmThread/IlmThreadPool.cpp deleted file mode 100644 index 68f2d03..0000000 --- a/Source/OpenEXR/IlmThread/IlmThreadPool.cpp +++ /dev/null @@ -1,456 +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. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// 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; - -namespace IlmThread { -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 -}; - - -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 (); -} - - -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 () -{ - if (--numPending == 0) - 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::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); -} - - -} // namespace IlmThread diff --git a/Source/OpenEXR/IlmThread/IlmThreadPool.h b/Source/OpenEXR/IlmThread/IlmThreadPool.h deleted file mode 100644 index 7ea91d3..0000000 --- a/Source/OpenEXR/IlmThread/IlmThreadPool.h +++ /dev/null @@ -1,156 +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_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 Thread 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 TaskTroup 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. -// -//----------------------------------------------------------------------------- - -namespace IlmThread { - -class TaskGroup; -class Task; - - -class 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 Task -{ - public: - - Task (TaskGroup* g); - virtual ~Task (); - - virtual void execute () = 0; - TaskGroup * group(); - - protected: - - TaskGroup * _group; -}; - - -class TaskGroup -{ - public: - - TaskGroup(); - ~TaskGroup(); - - struct Data; - Data* const _data; -}; - - -} // namespace IlmThread - -#endif diff --git a/Source/OpenEXR/IlmThread/IlmThreadPosix.cpp b/Source/OpenEXR/IlmThread/IlmThreadPosix.cpp deleted file mode 100644 index 1fe74f7..0000000 --- a/Source/OpenEXR/IlmThread/IlmThreadPosix.cpp +++ /dev/null @@ -1,98 +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. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// 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 *); -} - -namespace IlmThread { - - -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::throwErrnoExc ("Cannot create new thread (%T).", error); -} - - -} // namespace IlmThread - -#endif diff --git a/Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp b/Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp deleted file mode 100644 index 486aeba..0000000 --- a/Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp +++ /dev/null @@ -1,60 +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. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Semaphore -- dummy implementation for -// for platforms that do not support threading -// -//----------------------------------------------------------------------------- - -#include "IlmBaseConfig.h" - -//#if !defined (_WIN32) && !(_WIN64) && !(HAVE_PTHREAD) -#include "IlmThreadSemaphore.h" - -namespace IlmThread { - - -Semaphore::Semaphore (unsigned int value) {} -Semaphore::~Semaphore () {} -void Semaphore::wait () {} -bool Semaphore::tryWait () {return true;} -void Semaphore::post () {} -int Semaphore::value () const {return 0;} - - -} // namespace IlmThread - -//#endif diff --git a/Source/OpenEXR/IlmThread/IlmThreadSemaphore.h b/Source/OpenEXR/IlmThread/IlmThreadSemaphore.h deleted file mode 100644 index a9ba60a..0000000 --- a/Source/OpenEXR/IlmThread/IlmThreadSemaphore.h +++ /dev/null @@ -1,110 +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_ILM_THREAD_SEMAPHORE_H -#define INCLUDED_ILM_THREAD_SEMAPHORE_H - -//----------------------------------------------------------------------------- -// -// class Semaphore -- a wrapper class for -// system-dependent counting semaphores -// -//----------------------------------------------------------------------------- - -#include "IlmBaseConfig.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 - -namespace IlmThread { - - -class 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 -}; - - -} // namespace IlmThread - -#endif diff --git a/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosix.cpp b/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosix.cpp deleted file mode 100644 index b5e206e..0000000 --- a/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosix.cpp +++ /dev/null @@ -1,103 +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. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// 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 - -namespace IlmThread { - - -Semaphore::Semaphore (unsigned int value) -{ - if (::sem_init (&_semaphore, 0, value)) - Iex::throwErrnoExc ("Cannot initialize semaphore (%T)."); -} - - -Semaphore::~Semaphore () -{ - int error = ::sem_destroy (&_semaphore); - assert (error == 0); -} - - -void -Semaphore::wait () -{ - ::sem_wait (&_semaphore); -} - - -bool -Semaphore::tryWait () -{ - return sem_trywait (&_semaphore) == 0; -} - - -void -Semaphore::post () -{ - if (::sem_post (&_semaphore)) - Iex::throwErrnoExc ("Post operation on semaphore failed (%T)."); -} - - -int -Semaphore::value () const -{ - int value; - - if (::sem_getvalue (&_semaphore, &value)) - Iex::throwErrnoExc ("Cannot read semaphore value (%T)."); - - return value; -} - - -} // namespace IlmThread - -#endif diff --git a/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosixCompat.cpp b/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosixCompat.cpp deleted file mode 100644 index 33f2a5b..0000000 --- a/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosixCompat.cpp +++ /dev/null @@ -1,155 +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. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// 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 - -namespace IlmThread { - - -Semaphore::Semaphore (unsigned int value) -{ - if (int error = ::pthread_mutex_init (&_semaphore.mutex, 0)) - Iex::throwErrnoExc ("Cannot initialize mutex (%T).", error); - - if (int error = ::pthread_cond_init (&_semaphore.nonZero, 0)) - Iex::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::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::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; -} - - -} // namespace IlmThread - -#endif diff --git a/Source/OpenEXR/IlmThread/IlmThreadSemaphoreWin32.cpp b/Source/OpenEXR/IlmThread/IlmThreadSemaphoreWin32.cpp deleted file mode 100644 index 19cd625..0000000 --- a/Source/OpenEXR/IlmThread/IlmThreadSemaphoreWin32.cpp +++ /dev/null @@ -1,146 +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. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Semaphore -- implementation for Windows -// -//----------------------------------------------------------------------------- - -#include "IlmThreadSemaphore.h" -#include "Iex.h" -#include -#include -#include - -namespace IlmThread { - -using namespace Iex; - -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; -} - -} // namespace IlmThread diff --git a/Source/OpenEXR/IlmThread/IlmThreadWin32.cpp b/Source/OpenEXR/IlmThread/IlmThreadWin32.cpp deleted file mode 100644 index cd54759..0000000 --- a/Source/OpenEXR/IlmThread/IlmThreadWin32.cpp +++ /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. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Thread -- implementation for Windows -// -//----------------------------------------------------------------------------- - - -#include "IlmThread.h" -#include "Iex.h" -#include -#include - -namespace IlmThread { - - -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::throwErrnoExc ("Cannot create new thread (%T)."); -} - - -} // namespace IlmThread diff --git a/Source/OpenEXR/IlmThread/Makefile.am b/Source/OpenEXR/IlmThread/Makefile.am deleted file mode 100644 index d46368a..0000000 --- a/Source/OpenEXR/IlmThread/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## Process this file with automake to produce Makefile.in - -lib_LTLIBRARIES = libIlmThread.la - -libIlmThread_la_SOURCES = IlmThreadPool.h IlmThread.h \ - IlmThreadSemaphore.h IlmThreadMutex.h \ - IlmThreadPool.cpp IlmThread.cpp \ - IlmThreadSemaphore.cpp IlmThreadMutex.cpp \ - IlmThreadPosix.cpp IlmThreadSemaphorePosix.cpp \ - IlmThreadSemaphorePosixCompat.cpp \ - IlmThreadMutexPosix.cpp - -libIlmThread_la_LDFLAGS = -version-info @LIBTOOL_VERSION@ -no-undefined -libIlmThread_la_LIBADD = ../Iex/libIex.la - -libIlmThreadincludedir = $(includedir)/OpenEXR - -libIlmThreadinclude_HEADERS = IlmThreadPool.h IlmThread.h \ - IlmThreadSemaphore.h IlmThreadMutex.h - -noinst_HEADERS = - -EXTRA_DIST = $(noinst_HEADERS) IlmThreadMutexWin32.cpp IlmThreadSemaphoreWin32.cpp \ - IlmThreadWin32.cpp - -INCLUDES = -I$(top_builddir) -I$(top_srcdir)/Iex -I$(top_srcdir)/config \ No newline at end of file diff --git a/Source/OpenEXR/IlmThread/Makefile.in b/Source/OpenEXR/IlmThread/Makefile.in deleted file mode 100644 index e8f457c..0000000 --- a/Source/OpenEXR/IlmThread/Makefile.in +++ /dev/null @@ -1,539 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = IlmThread -DIST_COMMON = $(libIlmThreadinclude_HEADERS) $(noinst_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/threads.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/IlmBaseConfig.h -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(libIlmThreadincludedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libIlmThread_la_DEPENDENCIES = ../Iex/libIex.la -am_libIlmThread_la_OBJECTS = IlmThreadPool.lo IlmThread.lo \ - IlmThreadSemaphore.lo IlmThreadMutex.lo IlmThreadPosix.lo \ - IlmThreadSemaphorePosix.lo IlmThreadSemaphorePosixCompat.lo \ - IlmThreadMutexPosix.lo -libIlmThread_la_OBJECTS = $(am_libIlmThread_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libIlmThread_la_SOURCES) -DIST_SOURCES = $(libIlmThread_la_SOURCES) -libIlmThreadincludeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(libIlmThreadinclude_HEADERS) $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AM_CFLAGS = @AM_CFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HAVE_UCONTEXT_H = @HAVE_UCONTEXT_H@ -ILMBASE_VERSION = @ILMBASE_VERSION@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_VERSION = @LIBTOOL_VERSION@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_LIPO = @ac_ct_LIPO@ -ac_ct_NMEDIT = @ac_ct_NMEDIT@ -ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ -ac_ct_OTOOL = @ac_ct_OTOOL@ -ac_ct_OTOOL64 = @ac_ct_OTOOL64@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -acx_pthread_config = @acx_pthread_config@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -lib_LTLIBRARIES = libIlmThread.la -libIlmThread_la_SOURCES = IlmThreadPool.h IlmThread.h \ - IlmThreadSemaphore.h IlmThreadMutex.h \ - IlmThreadPool.cpp IlmThread.cpp \ - IlmThreadSemaphore.cpp IlmThreadMutex.cpp \ - IlmThreadPosix.cpp IlmThreadSemaphorePosix.cpp \ - IlmThreadSemaphorePosixCompat.cpp \ - IlmThreadMutexPosix.cpp - -libIlmThread_la_LDFLAGS = -version-info @LIBTOOL_VERSION@ -no-undefined -libIlmThread_la_LIBADD = ../Iex/libIex.la -libIlmThreadincludedir = $(includedir)/OpenEXR -libIlmThreadinclude_HEADERS = IlmThreadPool.h IlmThread.h \ - IlmThreadSemaphore.h IlmThreadMutex.h - -noinst_HEADERS = -EXTRA_DIST = $(noinst_HEADERS) IlmThreadMutexWin32.cpp IlmThreadSemaphoreWin32.cpp \ - IlmThreadWin32.cpp - -INCLUDES = -I$(top_builddir) -I$(top_srcdir)/Iex -I$(top_srcdir)/config -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu IlmThread/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu IlmThread/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libIlmThread.la: $(libIlmThread_la_OBJECTS) $(libIlmThread_la_DEPENDENCIES) - $(CXXLINK) -rpath $(libdir) $(libIlmThread_la_LDFLAGS) $(libIlmThread_la_OBJECTS) $(libIlmThread_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IlmThread.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IlmThreadMutex.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IlmThreadMutexPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IlmThreadPool.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IlmThreadPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IlmThreadSemaphore.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IlmThreadSemaphorePosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IlmThreadSemaphorePosixCompat.Plo@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-libIlmThreadincludeHEADERS: $(libIlmThreadinclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libIlmThreadincludedir)" || $(mkdir_p) "$(DESTDIR)$(libIlmThreadincludedir)" - @list='$(libIlmThreadinclude_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libIlmThreadincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libIlmThreadincludedir)/$$f'"; \ - $(libIlmThreadincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libIlmThreadincludedir)/$$f"; \ - done - -uninstall-libIlmThreadincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libIlmThreadinclude_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libIlmThreadincludedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libIlmThreadincludedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libIlmThreadincludedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-libIlmThreadincludeHEADERS - -install-exec-am: install-libLTLIBRARIES - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-libIlmThreadincludeHEADERS \ - uninstall-libLTLIBRARIES - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am \ - install-libIlmThreadincludeHEADERS install-libLTLIBRARIES \ - install-man install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am \ - uninstall-libIlmThreadincludeHEADERS uninstall-libLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/Source/OpenEXR/Imath/ImathBox.cpp b/Source/OpenEXR/Imath/ImathBox.cpp deleted file mode 100644 index 07bddfd..0000000 --- a/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/Source/OpenEXR/Imath/ImathBox.h b/Source/OpenEXR/Imath/ImathBox.h deleted file mode 100644 index 7dc4eb7..0000000 --- a/Source/OpenEXR/Imath/ImathBox.h +++ /dev/null @@ -1,850 +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_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" - -namespace Imath { - - -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; -} - - - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathBoxAlgo.h b/Source/OpenEXR/Imath/ImathBoxAlgo.h deleted file mode 100644 index 3d6e4e0..0000000 --- a/Source/OpenEXR/Imath/ImathBoxAlgo.h +++ /dev/null @@ -1,1015 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2010, 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" - -namespace Imath { - - -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); -} - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathColor.h b/Source/OpenEXR/Imath/ImathColor.h deleted file mode 100644 index 605f10b..0000000 --- a/Source/OpenEXR/Imath/ImathColor.h +++ /dev/null @@ -1,734 +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_IMATHCOLOR_H -#define INCLUDED_IMATHCOLOR_H - -//---------------------------------------------------- -// -// A three and four component color class template. -// -//---------------------------------------------------- - -#include "ImathVec.h" -#include "half.h" - -namespace Imath { - - -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); -} - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathColorAlgo.cpp b/Source/OpenEXR/Imath/ImathColorAlgo.cpp deleted file mode 100644 index c624680..0000000 --- a/Source/OpenEXR/Imath/ImathColorAlgo.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. -// -/////////////////////////////////////////////////////////////////////////// - - -//---------------------------------------------------------------------------- -// -// Implementation of non-template items declared in ImathColorAlgo.h -// -//---------------------------------------------------------------------------- - -#include "ImathColorAlgo.h" - -namespace Imath { - - -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); -} - - -} // namespace Imath diff --git a/Source/OpenEXR/Imath/ImathColorAlgo.h b/Source/OpenEXR/Imath/ImathColorAlgo.h deleted file mode 100644 index 68703a1..0000000 --- a/Source/OpenEXR/Imath/ImathColorAlgo.h +++ /dev/null @@ -1,256 +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_IMATHCOLORALGO_H -#define INCLUDED_IMATHCOLORALGO_H - - -#include "ImathColor.h" -#include "ImathMath.h" -#include "ImathLimits.h" - -namespace Imath { - - -// -// Non-templated helper routines for color conversion. -// These routines eliminate type warnings under g++. -// - -Vec3 hsv2rgb_d(const Vec3 &hsv); - -Color4 hsv2rgb_d(const Color4 &hsv); - - -Vec3 rgb2hsv_d(const Vec3 &rgb); - -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; - } -} - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathEuler.h b/Source/OpenEXR/Imath/ImathEuler.h deleted file mode 100644 index c81b5eb..0000000 --- a/Source/OpenEXR/Imath/ImathEuler.h +++ /dev/null @@ -1,924 +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_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 - -namespace Imath { - -#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 - -} // namespace Imath - - -#endif diff --git a/Source/OpenEXR/Imath/ImathExc.h b/Source/OpenEXR/Imath/ImathExc.h deleted file mode 100644 index 43781c5..0000000 --- a/Source/OpenEXR/Imath/ImathExc.h +++ /dev/null @@ -1,73 +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_IMATHEXC_H -#define INCLUDED_IMATHEXC_H - - -//----------------------------------------------- -// -// Imath library-specific exceptions -// -//----------------------------------------------- - -#include "IexBaseExc.h" - -namespace Imath { - - -DEFINE_EXC (NullVecExc, ::Iex::MathExc) // Attempt to normalize - // null vector - -DEFINE_EXC (InfPointExc, ::Iex::MathExc) // Attempt to normalize - // a point at infinity - -DEFINE_EXC (NullQuatExc, ::Iex::MathExc) // Attempt to normalize - // null quaternion - -DEFINE_EXC (SingMatrixExc, ::Iex::MathExc) // Attempt to invert - // singular matrix - -DEFINE_EXC (ZeroScaleExc, ::Iex::MathExc) // Attempt to remove zero - // scaling from matrix - -DEFINE_EXC (IntVecNormalizeExc, ::Iex::MathExc) // Attempt to normalize - // a vector of whose elements - // are an integer type - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathFrame.h b/Source/OpenEXR/Imath/ImathFrame.h deleted file mode 100644 index 7291231..0000000 --- a/Source/OpenEXR/Imath/ImathFrame.h +++ /dev/null @@ -1,190 +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_IMATHFRAME_H -#define INCLUDED_IMATHFRAME_H - -namespace Imath { - -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::firstFrame( p[0], p[1], p[2] ); -// for( int i = 1; i < n - 1; i++ ) -// { -// m[i] = Imath::nextFrame( m[i-1], p[i-1], p[i], t[i-1], t[i] ); -// } -// m[n-1] = Imath::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; -} - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathFrustum.h b/Source/OpenEXR/Imath/ImathFrustum.h deleted file mode 100644 index ac49346..0000000 --- a/Source/OpenEXR/Imath/ImathFrustum.h +++ /dev/null @@ -1,739 +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_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 "IexMathExc.h" - -namespace Imath { - -// -// 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]); - void planes(Plane3 p[6], const Matrix44 &M); - - //---------------------- - // 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::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::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::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::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::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::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::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,-_nearPlane)); - 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::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::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::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::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::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::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::DivzeroExc - ("Bad viewing frustum: the near clipping plane is too " - "close to zero"); - } -} - -template -void Frustum::planes(Plane3 p[6]) -{ - // - // 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) -{ - // - // 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; - - -} // namespace Imath - - -#if defined _WIN32 || defined _WIN64 - #ifdef _redef_near - #define near - #endif - #ifdef _redef_far - #define far - #endif -#endif - -#endif diff --git a/Source/OpenEXR/Imath/ImathFrustumTest.h b/Source/OpenEXR/Imath/ImathFrustumTest.h deleted file mode 100644 index a726efc..0000000 --- a/Source/OpenEXR/Imath/ImathFrustumTest.h +++ /dev/null @@ -1,410 +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_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" - -namespace Imath { - -///////////////////////////////////////////////////////////////// -// 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(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(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::Matrix44 cameraMat() const {return cameraMatrix;} - Imath::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(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::abs(planeNormX[i].x), - Imath::abs(planeNormX[i].y), - Imath::abs(planeNormX[i].z)); - planeNormAbsY[i] = Vec3(Imath::abs(planeNormY[i].x), - Imath::abs(planeNormY[i].y), - Imath::abs(planeNormY[i].z)); - planeNormAbsZ[i] = Vec3(Imath::abs(planeNormZ[i].x), - Imath::abs(planeNormZ[i].y), - Imath::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 -{ - 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 -{ - 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; - -} //namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathFun.cpp b/Source/OpenEXR/Imath/ImathFun.cpp deleted file mode 100644 index defab93..0000000 --- a/Source/OpenEXR/Imath/ImathFun.cpp +++ /dev/null @@ -1,181 +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 "ImathFun.h" - -namespace Imath { - - -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.i > 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.i > 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; -} - - -} // namespace Imath diff --git a/Source/OpenEXR/Imath/ImathFun.h b/Source/OpenEXR/Imath/ImathFun.h deleted file mode 100644 index 0baf4ff..0000000 --- a/Source/OpenEXR/Imath/ImathFun.h +++ /dev/null @@ -1,267 +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_IMATHFUN_H -#define INCLUDED_IMATHFUN_H - -//----------------------------------------------------------------------------- -// -// Miscellaneous utility functions -// -//----------------------------------------------------------------------------- - -#include "ImathLimits.h" -#include "ImathInt64.h" - -namespace Imath { - -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::sign (a - b); -} - - -template -inline int -cmpt (T a, T b, T t) -{ - return (Imath::abs (a - b) <= t)? 0 : cmp (a, b); -} - - -template -inline bool -iszero (T a, T t) -{ - return (Imath::abs (a) <= t) ? 1 : 0; -} - - -template -inline bool -equal (T1 a, T2 b, T3 t) -{ - return Imath::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. -// -//---------------------------------------------------------- - -float succf (float f); -float predf (float f); - -double succd (double d); -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; -} - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathGL.h b/Source/OpenEXR/Imath/ImathGL.h deleted file mode 100644 index 36be0fd..0000000 --- a/Source/OpenEXR/Imath/ImathGL.h +++ /dev/null @@ -1,159 +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" - -inline void glVertex ( const Imath::V3f &v ) { glVertex3f(v.x,v.y,v.z); } -inline void glVertex ( const Imath::V2f &v ) { glVertex2f(v.x,v.y); } -inline void glNormal ( const Imath::V3f &n ) { glNormal3f(n.x,n.y,n.z); } -inline void glColor ( const Imath::V3f &c ) { glColor3f(c.x,c.y,c.z); } -inline void glTranslate ( const Imath::V3f &t ) { glTranslatef(t.x,t.y,t.z); } - -inline void glTexCoord( const Imath::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::finitef (f) || f < - GL_FLOAT_MAX || f > GL_FLOAT_MAX; -} - -} // namespace - -inline void -throwBadMatrix (const Imath::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::OverflowExc ("GL matrix overflow"); -} - -inline void -glMultMatrix( const Imath::M44f& m ) -{ - throwBadMatrix (m); - glMultMatrixf( (GLfloat*)m[0] ); -} - -inline void -glMultMatrix( const Imath::M44f* m ) -{ - throwBadMatrix (*m); - glMultMatrixf( (GLfloat*)(*m)[0] ); -} - -inline void -glLoadMatrix( const Imath::M44f& m ) -{ - throwBadMatrix (m); - glLoadMatrixf( (GLfloat*)m[0] ); -} - -inline void -glLoadMatrix( const Imath::M44f* m ) -{ - throwBadMatrix (*m); - glLoadMatrixf( (GLfloat*)(*m)[0] ); -} - - -namespace Imath { - -// -// 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(); } -}; - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathGLU.h b/Source/OpenEXR/Imath/ImathGLU.h deleted file mode 100644 index e43d560..0000000 --- a/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::V3f &pos, const Imath::V3f &interest, const Imath::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/Source/OpenEXR/Imath/ImathHalfLimits.h b/Source/OpenEXR/Imath/ImathHalfLimits.h deleted file mode 100644 index 2170f94..0000000 --- a/Source/OpenEXR/Imath/ImathHalfLimits.h +++ /dev/null @@ -1,66 +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_IMATHHALFLIMITS_H -#define INCLUDED_IMATHHALFLIMITS_H - -//-------------------------------------------------- -// -// Imath-style limits for class half. -// -//-------------------------------------------------- - -#include "ImathLimits.h" -#include "half.h" - -namespace Imath { - - -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;} -}; - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathInt64.h b/Source/OpenEXR/Imath/ImathInt64.h deleted file mode 100644 index 71ee4ec..0000000 --- a/Source/OpenEXR/Imath/ImathInt64.h +++ /dev/null @@ -1,61 +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_IMATH_INT64_H -#define INCLUDED_IMATH_INT64_H - -//---------------------------------------------------------------------------- -// -// Int64 -- unsigned 64-bit integers -// -//---------------------------------------------------------------------------- - -#include - -namespace Imath { - - -#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 - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathInterval.h b/Source/OpenEXR/Imath/ImathInterval.h deleted file mode 100644 index 2d9d7d3..0000000 --- a/Source/OpenEXR/Imath/ImathInterval.h +++ /dev/null @@ -1,224 +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_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" - -namespace Imath { - - -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; -} - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathLimits.h b/Source/OpenEXR/Imath/ImathLimits.h deleted file mode 100644 index 6ba74f6..0000000 --- a/Source/OpenEXR/Imath/ImathLimits.h +++ /dev/null @@ -1,267 +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_IMATHLIMITS_H -#define INCLUDED_IMATHLIMITS_H - -//---------------------------------------------------------------- -// -// Limitations of the basic C++ numerical data types -// -//---------------------------------------------------------------- - -#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 - -namespace Imath { - - -//----------------------------------------------------------------- -// -// 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;} -}; - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathLine.h b/Source/OpenEXR/Imath/ImathLine.h deleted file mode 100644 index 601fc6f..0000000 --- a/Source/OpenEXR/Imath/ImathLine.h +++ /dev/null @@ -1,184 +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_IMATHLINE_H -#define INCLUDED_IMATHLINE_H - -//------------------------------------- -// -// A 3D line class template -// -//------------------------------------- - -#include "ImathVec.h" -#include "ImathLimits.h" -#include "ImathMatrix.h" - -namespace Imath { - - -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 ); -} - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathLineAlgo.h b/Source/OpenEXR/Imath/ImathLineAlgo.h deleted file mode 100644 index 41855c9..0000000 --- a/Source/OpenEXR/Imath/ImathLineAlgo.h +++ /dev/null @@ -1,287 +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_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" - -namespace Imath { - - -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; -} - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathMath.h b/Source/OpenEXR/Imath/ImathMath.h deleted file mode 100644 index d5b4616..0000000 --- a/Source/OpenEXR/Imath/ImathMath.h +++ /dev/null @@ -1,208 +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_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 - -namespace Imath { - - -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); -} - - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathMatrix.h b/Source/OpenEXR/Imath/ImathMatrix.h deleted file mode 100644 index bbf8cd1..0000000 --- a/Source/OpenEXR/Imath/ImathMatrix.h +++ /dev/null @@ -1,3442 +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_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 -#include -#include -#include - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER -// suppress exception specification warnings -#pragma warning(disable:4290) -#endif - - -namespace Imath { - -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::MathExc); - - Matrix33 inverse (bool singExc = false) const - throw (Iex::MathExc); - - const Matrix33 & gjInvert (bool singExc = false) - throw (Iex::MathExc); - - Matrix33 gjInverse (bool singExc = false) const - throw (Iex::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::MathExc); - - Matrix44 inverse (bool singExc = false) const - throw (Iex::MathExc); - - const Matrix44 & gjInvert (bool singExc = false) - throw (Iex::MathExc); - - Matrix44 gjInverse (bool singExc = false) const - throw (Iex::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::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::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::MathExc) -{ - *this = gjInverse (singExc); - return *this; -} - -template -Matrix33 -Matrix33::gjInverse (bool singExc) const throw (Iex::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::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::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::MathExc) -{ - *this = inverse (singExc); - return *this; -} - -template -Matrix33 -Matrix33::inverse (bool singExc) const throw (Iex::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::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::abs (r) / limits::smallest(); - - for (int i = 0; i < 3; ++i) - { - for (int j = 0; j < 3; ++j) - { - if (mr > Imath::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::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::abs (r) / limits::smallest(); - - for (int i = 0; i < 2; ++i) - { - for (int j = 0; j < 2; ++j) - { - if (mr > Imath::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::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::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::MathExc) -{ - *this = gjInverse (singExc); - return *this; -} - -template -Matrix44 -Matrix44::gjInverse (bool singExc) const throw (Iex::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::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::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::MathExc) -{ - *this = inverse (singExc); - return *this; -} - -template -Matrix44 -Matrix44::inverse (bool singExc) const throw (Iex::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::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::abs (r) / limits::smallest(); - - for (int i = 0; i < 3; ++i) - { - for (int j = 0; j < 3; ++j) - { - if (mr > Imath::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); -} - -} // namespace Imath - - - -#endif diff --git a/Source/OpenEXR/Imath/ImathMatrixAlgo.cpp b/Source/OpenEXR/Imath/ImathMatrixAlgo.cpp deleted file mode 100644 index 8896c8d..0000000 --- a/Source/OpenEXR/Imath/ImathMatrixAlgo.cpp +++ /dev/null @@ -1,1251 +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. -// -/////////////////////////////////////////////////////////////////////////// - - - - - -//---------------------------------------------------------------------------- -// -// Implementation of non-template items declared in ImathMatrixAlgo.h -// -//---------------------------------------------------------------------------- - -#include "ImathMatrixAlgo.h" -#include - -#if defined(OPENEXR_DLL) - #define EXPORT_CONST __declspec(dllexport) -#else - #define EXPORT_CONST const -#endif - -namespace Imath { - -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::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 M44d procrustesRotationAndTranslation (const V3d* from, const V3d* to, const size_t numPoints, const bool doScale); -template M44d procrustesRotationAndTranslation (const V3f* from, const V3f* to, const size_t numPoints, const bool doScale); -template M44d procrustesRotationAndTranslation (const V3d* from, const V3d* to, const double* weights, const size_t numPoints, const bool doScale); -template 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::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::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::Matrix33& A, - Imath::Matrix33& U, - Imath::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::Matrix44& A, - int j, - int k, - Imath::Matrix44& U, - Imath::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::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::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::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::Matrix33 A, - Imath::Matrix33& U, - Imath::Vec3& S, - Imath::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::Matrix44 A, - Imath::Matrix44& U, - Imath::Vec4& S, - Imath::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::Vec4 uCol (U[0][i], U[1][i], U[2][i], U[3][i]); - const Imath::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::Matrix33& A, - Imath::Matrix33& U, - Imath::Vec3& S, - Imath::Matrix33& V, - const T tol, - const bool forcePositiveDeterminant) -{ - twoSidedJacobiSVD (A, U, S, V, tol, forcePositiveDeterminant); -} - -template -void -jacobiSVD (const Imath::Matrix44& A, - Imath::Matrix44& U, - Imath::Vec4& S, - Imath::Matrix44& V, - const T tol, - const bool forcePositiveDeterminant) -{ - twoSidedJacobiSVD (A, U, S, V, tol, forcePositiveDeterminant); -} - -template void jacobiSVD (const Imath::Matrix33& A, - Imath::Matrix33& U, - Imath::Vec3& S, - Imath::Matrix33& V, - const float tol, - const bool forcePositiveDeterminant); -template void jacobiSVD (const Imath::Matrix33& A, - Imath::Matrix33& U, - Imath::Vec3& S, - Imath::Matrix33& V, - const double tol, - const bool forcePositiveDeterminant); -template void jacobiSVD (const Imath::Matrix44& A, - Imath::Matrix44& U, - Imath::Vec4& S, - Imath::Matrix44& V, - const float tol, - const bool forcePositiveDeterminant); -template void jacobiSVD (const Imath::Matrix44& A, - Imath::Matrix44& U, - Imath::Vec4& S, - Imath::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 void jacobiEigenSolver (Matrix33& A, - Vec3& S, - Matrix33& V, - const float tol); -template void jacobiEigenSolver (Matrix33& A, - Vec3& S, - Matrix33& V, - const double tol); -template void jacobiEigenSolver (Matrix44& A, - Vec4& S, - Matrix44& V, - const float tol); -template void jacobiEigenSolver (Matrix44& A, - Vec4& S, - Matrix44& V, - const double tol); - -template void maxEigenVector (Matrix33& A, - Vec3& S); -template void maxEigenVector (Matrix44& A, - Vec4& S); -template void maxEigenVector (Matrix33& A, - Vec3& S); -template void maxEigenVector (Matrix44& A, - Vec4& S); - -template void minEigenVector (Matrix33& A, - Vec3& S); -template void minEigenVector (Matrix44& A, - Vec4& S); -template void minEigenVector (Matrix33& A, - Vec3& S); -template void minEigenVector (Matrix44& A, - Vec4& S); - -} // namespace Imath diff --git a/Source/OpenEXR/Imath/ImathMatrixAlgo.h b/Source/OpenEXR/Imath/ImathMatrixAlgo.h deleted file mode 100644 index 6cb1568..0000000 --- a/Source/OpenEXR/Imath/ImathMatrixAlgo.h +++ /dev/null @@ -1,1435 +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_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 "ImathMatrix.h" -#include "ImathQuat.h" -#include "ImathEuler.h" -#include "ImathExc.h" -#include "ImathVec.h" -#include "ImathLimits.h" -#include - - -#ifdef OPENEXR_DLL - #ifdef IMATH_EXPORTS - #define IMATH_EXPORT_CONST extern __declspec(dllexport) - #else - #define IMATH_EXPORT_CONST extern __declspec(dllimport) - #endif -#else - #define IMATH_EXPORT_CONST extern const -#endif - - -namespace Imath { - -//------------------ -// 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::abs (row[i][j]) > maxVal) - maxVal = Imath::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::Euler eXYZ (r, Imath::Euler::XYZ); - Imath::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::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::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::UNINITIALIZED ); - alignZAxisWithTargetDir (zAxis2FromDir, fromDir, Vec3 (0, 1, 0)); - - Matrix44 fromDir2zAxis = zAxis2FromDir.transposed (); - - Matrix44 zAxis2ToDir( Imath::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::abs (row[i][j]) > maxVal) - maxVal = Imath::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::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::M44d -procrustesRotationAndTranslation (const Imath::Vec3* A, // From these - const Imath::Vec3* B, // To these - const T* weights, - const size_t numPoints, - const bool doScaling = false); - -// Unweighted: -template -Imath::M44d -procrustesRotationAndTranslation (const Imath::Vec3* A, - const Imath::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::Matrix33& A, - Imath::Matrix33& U, - Imath::Vec3& S, - Imath::Matrix33& V, - const T tol = Imath::limits::epsilon(), - const bool forcePositiveDeterminant = false); - -template -void -jacobiSVD (const Imath::Matrix44& A, - Imath::Matrix44& U, - Imath::Vec4& S, - Imath::Matrix44& V, - const T tol = Imath::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); - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathPlane.h b/Source/OpenEXR/Imath/ImathPlane.h deleted file mode 100644 index aa59e3c..0000000 --- a/Source/OpenEXR/Imath/ImathPlane.h +++ /dev/null @@ -1,256 +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_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" - -namespace Imath { - - -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); -} - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathPlatform.h b/Source/OpenEXR/Imath/ImathPlatform.h deleted file mode 100644 index 91e82cc..0000000 --- a/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/Source/OpenEXR/Imath/ImathQuat.h b/Source/OpenEXR/Imath/ImathQuat.h deleted file mode 100644 index a6ee936..0000000 --- a/Source/OpenEXR/Imath/ImathQuat.h +++ /dev/null @@ -1,963 +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_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 - -namespace Imath { - -#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 - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathRandom.cpp b/Source/OpenEXR/Imath/ImathRandom.cpp deleted file mode 100644 index b261b39..0000000 --- a/Source/OpenEXR/Imath/ImathRandom.cpp +++ /dev/null @@ -1,195 +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 that generate pseudo-random numbers compatible -// with the standard erand48(), nrand48(), etc. functions. -// -//----------------------------------------------------------------------------- - -#include "ImathRandom.h" -#include "ImathInt64.h" - -namespace Imath { -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::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::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; -} - -} // namespace Imath diff --git a/Source/OpenEXR/Imath/ImathRandom.h b/Source/OpenEXR/Imath/ImathRandom.h deleted file mode 100644 index 4351975..0000000 --- a/Source/OpenEXR/Imath/ImathRandom.h +++ /dev/null @@ -1,398 +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_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 -#include - -namespace Imath { - -//----------------------------------------------- -// Fast random-number generator that generates -// a uniformly distributed sequence with a period -// length of 2^32. -//----------------------------------------------- - -class 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 -//--------------------------------- - -double erand48 (unsigned short state[3]); -double drand48 (); -long int nrand48 (unsigned short state[3]); -long int lrand48 (); -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 Imath::nrand48 (_state) & 1; -} - - -inline long int -Rand48::nexti () -{ - return Imath::nrand48 (_state); -} - - -inline double -Rand48::nextf () -{ - return Imath::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); -} - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathRoots.h b/Source/OpenEXR/Imath/ImathRoots.h deleted file mode 100644 index d915c63..0000000 --- a/Source/OpenEXR/Imath/ImathRoots.h +++ /dev/null @@ -1,219 +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_IMATHROOTS_H -#define INCLUDED_IMATHROOTS_H - -//--------------------------------------------------------------------- -// -// Functions to solve linear, quadratic or cubic equations -// -//--------------------------------------------------------------------- - -#include -#include - -namespace Imath { - -//-------------------------------------------------------------------------- -// 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); - } -} - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathShear.cpp b/Source/OpenEXR/Imath/ImathShear.cpp deleted file mode 100644 index 72541f5..0000000 --- a/Source/OpenEXR/Imath/ImathShear.cpp +++ /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. -// -/////////////////////////////////////////////////////////////////////////// - - - - -//---------------------------------------------------------------------------- -// -// Specializations of the Shear6 template. -// -//---------------------------------------------------------------------------- - -#include "ImathShear.h" - -namespace Imath { - - - -// empty - - - -} // namespace Imath diff --git a/Source/OpenEXR/Imath/ImathShear.h b/Source/OpenEXR/Imath/ImathShear.h deleted file mode 100644 index bad40a5..0000000 --- a/Source/OpenEXR/Imath/ImathShear.h +++ /dev/null @@ -1,659 +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_IMATHSHEAR_H -#define INCLUDED_IMATHSHEAR_H - -//---------------------------------------------------- -// -// Shear6 class template. -// -//---------------------------------------------------- - -#include "ImathExc.h" -#include "ImathLimits.h" -#include "ImathMath.h" -#include "ImathVec.h" - -#include - - -namespace Imath { - - - - -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::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::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); -} - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathSphere.h b/Source/OpenEXR/Imath/ImathSphere.h deleted file mode 100644 index 14d0365..0000000 --- a/Source/OpenEXR/Imath/ImathSphere.h +++ /dev/null @@ -1,177 +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_IMATHSPHERE_H -#define INCLUDED_IMATHSPHERE_H - -//------------------------------------- -// -// A 3D sphere class template -// -//------------------------------------- - -#include "ImathVec.h" -#include "ImathBox.h" -#include "ImathLine.h" - -namespace Imath { - -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; - } -} - - -} //namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathVec.cpp b/Source/OpenEXR/Imath/ImathVec.cpp deleted file mode 100644 index f692271..0000000 --- a/Source/OpenEXR/Imath/ImathVec.cpp +++ /dev/null @@ -1,540 +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. -// -/////////////////////////////////////////////////////////////////////////// - - - -//---------------------------------------------------------------------------- -// -// Specializations of the Vec2 and Vec3 templates. -// -//---------------------------------------------------------------------------- - -#include "ImathVec.h" - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER -// suppress exception specification warnings -#pragma warning(disable:4290) -#endif - - -namespace Imath { - -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 <> -short -Vec2::length () const -{ - float lenF = Math::sqrt ((float)dot (*this)); - short lenS = (short) (lenF + 0.5f); - return lenS; -} - -template <> -const Vec2 & -Vec2::normalize () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -const Vec2 & -Vec2::normalizeExc () throw (Iex::MathExc) -{ - if ((x == 0) && (y == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - normalizeOrThrow(*this); - return *this; -} - -template <> -const Vec2 & -Vec2::normalizeNonNull () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -Vec2 -Vec2::normalized () const -{ - Vec2 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -Vec2 -Vec2::normalizedExc () const throw (Iex::MathExc) -{ - if ((x == 0) && (y == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - Vec2 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -Vec2 -Vec2::normalizedNonNull () const -{ - Vec2 v(*this); - normalizeOrThrow(v); - return v; -} - - -// Vec2 - -template <> -int -Vec2::length () const -{ - float lenF = Math::sqrt ((float)dot (*this)); - int lenI = (int) (lenF + 0.5f); - return lenI; -} - -template <> -const Vec2 & -Vec2::normalize () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -const Vec2 & -Vec2::normalizeExc () throw (Iex::MathExc) -{ - if ((x == 0) && (y == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - normalizeOrThrow(*this); - return *this; -} - -template <> -const Vec2 & -Vec2::normalizeNonNull () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -Vec2 -Vec2::normalized () const -{ - Vec2 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -Vec2 -Vec2::normalizedExc () const throw (Iex::MathExc) -{ - if ((x == 0) && (y == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - Vec2 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -Vec2 -Vec2::normalizedNonNull () const -{ - Vec2 v(*this); - normalizeOrThrow(v); - return v; -} - - -// Vec3 - -template <> -short -Vec3::length () const -{ - float lenF = Math::sqrt ((float)dot (*this)); - short lenS = (short) (lenF + 0.5f); - return lenS; -} - -template <> -const Vec3 & -Vec3::normalize () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -const Vec3 & -Vec3::normalizeExc () throw (Iex::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - normalizeOrThrow(*this); - return *this; -} - -template <> -const Vec3 & -Vec3::normalizeNonNull () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -Vec3 -Vec3::normalized () const -{ - Vec3 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -Vec3 -Vec3::normalizedExc () const throw (Iex::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - Vec3 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -Vec3 -Vec3::normalizedNonNull () const -{ - Vec3 v(*this); - normalizeOrThrow(v); - return v; -} - - -// Vec3 - -template <> -int -Vec3::length () const -{ - float lenF = Math::sqrt ((float)dot (*this)); - int lenI = (int) (lenF + 0.5f); - return lenI; -} - -template <> -const Vec3 & -Vec3::normalize () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -const Vec3 & -Vec3::normalizeExc () throw (Iex::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - normalizeOrThrow(*this); - return *this; -} - -template <> -const Vec3 & -Vec3::normalizeNonNull () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -Vec3 -Vec3::normalized () const -{ - Vec3 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -Vec3 -Vec3::normalizedExc () const throw (Iex::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - Vec3 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -Vec3 -Vec3::normalizedNonNull () const -{ - Vec3 v(*this); - normalizeOrThrow(v); - return v; -} - - -// Vec4 - -template <> -short -Vec4::length () const -{ - float lenF = Math::sqrt ((float)dot (*this)); - short lenS = (short) (lenF + 0.5f); - return lenS; -} - -template <> -const Vec4 & -Vec4::normalize () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -const Vec4 & -Vec4::normalizeExc () throw (Iex::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0) && (w == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - normalizeOrThrow(*this); - return *this; -} - -template <> -const Vec4 & -Vec4::normalizeNonNull () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -Vec4 -Vec4::normalized () const -{ - Vec4 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -Vec4 -Vec4::normalizedExc () const throw (Iex::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0) && (w == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - Vec4 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -Vec4 -Vec4::normalizedNonNull () const -{ - Vec4 v(*this); - normalizeOrThrow(v); - return v; -} - - -// Vec4 - -template <> -int -Vec4::length () const -{ - float lenF = Math::sqrt ((float)dot (*this)); - int lenI = (int) (lenF + 0.5f); - return lenI; -} - -template <> -const Vec4 & -Vec4::normalize () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -const Vec4 & -Vec4::normalizeExc () throw (Iex::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0) && (w == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - normalizeOrThrow(*this); - return *this; -} - -template <> -const Vec4 & -Vec4::normalizeNonNull () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -Vec4 -Vec4::normalized () const -{ - Vec4 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -Vec4 -Vec4::normalizedExc () const throw (Iex::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0) && (w == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - Vec4 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -Vec4 -Vec4::normalizedNonNull () const -{ - Vec4 v(*this); - normalizeOrThrow(v); - return v; -} - -} // namespace Imath diff --git a/Source/OpenEXR/Imath/ImathVec.h b/Source/OpenEXR/Imath/ImathVec.h deleted file mode 100644 index e6d2b79..0000000 --- a/Source/OpenEXR/Imath/ImathVec.h +++ /dev/null @@ -1,2226 +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_IMATHVEC_H -#define INCLUDED_IMATHVEC_H - -//---------------------------------------------------- -// -// 2D, 3D and 4D point/vector class templates -// -//---------------------------------------------------- - -#include "ImathExc.h" -#include "ImathLimits.h" -#include "ImathMath.h" - -#include - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER -// suppress exception specification warnings -#pragma warning(push) -#pragma warning(disable:4290) -#endif - - -namespace Imath { - -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::MathExc); - const Vec2 & normalizeNonNull (); - - Vec2 normalized () const; // does not modify *this - Vec2 normalizedExc () const throw (Iex::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::MathExc); - const Vec3 & normalizeNonNull (); - - Vec3 normalized () const; // does not modify *this - Vec3 normalizedExc () const throw (Iex::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::MathExc); - const Vec4 & normalizeNonNull (); - - Vec4 normalized () const; // does not modify *this - Vec4 normalizedExc () const throw (Iex::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::MathExc); - -template <> const Vec2 & -Vec2::normalizeNonNull (); - -template <> Vec2 -Vec2::normalized () const; - -template <> Vec2 -Vec2::normalizedExc () const throw (Iex::MathExc); - -template <> Vec2 -Vec2::normalizedNonNull () const; - - -// Vec2 - -template <> int -Vec2::length () const; - -template <> const Vec2 & -Vec2::normalize (); - -template <> const Vec2 & -Vec2::normalizeExc () throw (Iex::MathExc); - -template <> const Vec2 & -Vec2::normalizeNonNull (); - -template <> Vec2 -Vec2::normalized () const; - -template <> Vec2 -Vec2::normalizedExc () const throw (Iex::MathExc); - -template <> Vec2 -Vec2::normalizedNonNull () const; - - -// Vec3 - -template <> short -Vec3::length () const; - -template <> const Vec3 & -Vec3::normalize (); - -template <> const Vec3 & -Vec3::normalizeExc () throw (Iex::MathExc); - -template <> const Vec3 & -Vec3::normalizeNonNull (); - -template <> Vec3 -Vec3::normalized () const; - -template <> Vec3 -Vec3::normalizedExc () const throw (Iex::MathExc); - -template <> Vec3 -Vec3::normalizedNonNull () const; - - -// Vec3 - -template <> int -Vec3::length () const; - -template <> const Vec3 & -Vec3::normalize (); - -template <> const Vec3 & -Vec3::normalizeExc () throw (Iex::MathExc); - -template <> const Vec3 & -Vec3::normalizeNonNull (); - -template <> Vec3 -Vec3::normalized () const; - -template <> Vec3 -Vec3::normalizedExc () const throw (Iex::MathExc); - -template <> Vec3 -Vec3::normalizedNonNull () const; - -// Vec4 - -template <> short -Vec4::length () const; - -template <> const Vec4 & -Vec4::normalize (); - -template <> const Vec4 & -Vec4::normalizeExc () throw (Iex::MathExc); - -template <> const Vec4 & -Vec4::normalizeNonNull (); - -template <> Vec4 -Vec4::normalized () const; - -template <> Vec4 -Vec4::normalizedExc () const throw (Iex::MathExc); - -template <> Vec4 -Vec4::normalizedNonNull () const; - - -// Vec4 - -template <> int -Vec4::length () const; - -template <> const Vec4 & -Vec4::normalize (); - -template <> const Vec4 & -Vec4::normalizeExc () throw (Iex::MathExc); - -template <> const Vec4 & -Vec4::normalizeNonNull (); - -template <> Vec4 -Vec4::normalized () const; - -template <> Vec4 -Vec4::normalizedExc () const throw (Iex::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::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::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::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::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::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::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::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::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::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::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::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::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 - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/ImathVecAlgo.h b/Source/OpenEXR/Imath/ImathVecAlgo.h deleted file mode 100644 index 33e2c12..0000000 --- a/Source/OpenEXR/Imath/ImathVecAlgo.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_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" - -namespace Imath { - - -//----------------------------------------------------------------- -// 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; -} - - -} // namespace Imath - -#endif diff --git a/Source/OpenEXR/Imath/Makefile.am b/Source/OpenEXR/Imath/Makefile.am deleted file mode 100644 index 6752428..0000000 --- a/Source/OpenEXR/Imath/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -## Process this file with automake to produce Makefile.in - -lib_LTLIBRARIES = libImath.la - -libImath_la_SOURCES = ImathShear.cpp ImathMatrixAlgo.cpp ImathVec.cpp \ - ImathColorAlgo.cpp ImathFun.cpp \ - ImathColorAlgo.h ImathMatrixAlgo.h ImathVec.h \ - ImathShear.h ImathFun.h ImathBox.h ImathBoxAlgo.h \ - ImathEuler.h ImathExc.h ImathLimits.h ImathLine.h \ - ImathLineAlgo.h ImathMatrix.h ImathPlane.h \ - ImathSphere.h ImathVecAlgo.h ImathQuat.h \ - ImathFrustum.h ImathMath.h ImathGL.h \ - ImathColor.h ImathRandom.h ImathRoots.h \ - ImathHalfLimits.h ImathInterval.h ImathGLU.h \ - ImathFrame.h ImathPlatform.h \ - ImathBox.cpp ImathRandom.cpp ImathInt64.h \ - ImathFrustumTest.h - -libImath_la_LDFLAGS = -version-info @LIBTOOL_VERSION@ -no-undefined -libImath_la_LIBADD = ../Iex/libIex.la - -libImathincludedir = $(includedir)/OpenEXR - -libImathinclude_HEADERS = ImathColorAlgo.h ImathMatrixAlgo.h ImathVec.h \ - ImathShear.h ImathFun.h ImathBox.h ImathBoxAlgo.h \ - ImathEuler.h ImathExc.h ImathLimits.h ImathLine.h \ - ImathLineAlgo.h ImathMatrix.h ImathPlane.h \ - ImathSphere.h ImathVecAlgo.h ImathQuat.h \ - ImathFrustum.h ImathMath.h ImathGL.h \ - ImathColor.h ImathRandom.h ImathRoots.h \ - ImathHalfLimits.h ImathInterval.h ImathGLU.h \ - ImathFrame.h ImathPlatform.h ImathInt64.h - -INCLUDES = -I$(top_builddir) -I$(top_srcdir)/Iex -I$(top_srcdir)/Half \ - -I$(top_srcdir)/config diff --git a/Source/OpenEXR/Imath/Makefile.in b/Source/OpenEXR/Imath/Makefile.in deleted file mode 100644 index bc415dd..0000000 --- a/Source/OpenEXR/Imath/Makefile.in +++ /dev/null @@ -1,547 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = Imath -DIST_COMMON = $(libImathinclude_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/threads.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/IlmBaseConfig.h -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(libImathincludedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libImath_la_DEPENDENCIES = ../Iex/libIex.la -am_libImath_la_OBJECTS = ImathShear.lo ImathMatrixAlgo.lo ImathVec.lo \ - ImathColorAlgo.lo ImathFun.lo ImathBox.lo ImathRandom.lo -libImath_la_OBJECTS = $(am_libImath_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libImath_la_SOURCES) -DIST_SOURCES = $(libImath_la_SOURCES) -libImathincludeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(libImathinclude_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AM_CFLAGS = @AM_CFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HAVE_UCONTEXT_H = @HAVE_UCONTEXT_H@ -ILMBASE_VERSION = @ILMBASE_VERSION@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_VERSION = @LIBTOOL_VERSION@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_LIPO = @ac_ct_LIPO@ -ac_ct_NMEDIT = @ac_ct_NMEDIT@ -ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ -ac_ct_OTOOL = @ac_ct_OTOOL@ -ac_ct_OTOOL64 = @ac_ct_OTOOL64@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -acx_pthread_config = @acx_pthread_config@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -lib_LTLIBRARIES = libImath.la -libImath_la_SOURCES = ImathShear.cpp ImathMatrixAlgo.cpp ImathVec.cpp \ - ImathColorAlgo.cpp ImathFun.cpp \ - ImathColorAlgo.h ImathMatrixAlgo.h ImathVec.h \ - ImathShear.h ImathFun.h ImathBox.h ImathBoxAlgo.h \ - ImathEuler.h ImathExc.h ImathLimits.h ImathLine.h \ - ImathLineAlgo.h ImathMatrix.h ImathPlane.h \ - ImathSphere.h ImathVecAlgo.h ImathQuat.h \ - ImathFrustum.h ImathMath.h ImathGL.h \ - ImathColor.h ImathRandom.h ImathRoots.h \ - ImathHalfLimits.h ImathInterval.h ImathGLU.h \ - ImathFrame.h ImathPlatform.h \ - ImathBox.cpp ImathRandom.cpp ImathInt64.h \ - ImathFrustumTest.h - -libImath_la_LDFLAGS = -version-info @LIBTOOL_VERSION@ -no-undefined -libImath_la_LIBADD = ../Iex/libIex.la -libImathincludedir = $(includedir)/OpenEXR -libImathinclude_HEADERS = ImathColorAlgo.h ImathMatrixAlgo.h ImathVec.h \ - ImathShear.h ImathFun.h ImathBox.h ImathBoxAlgo.h \ - ImathEuler.h ImathExc.h ImathLimits.h ImathLine.h \ - ImathLineAlgo.h ImathMatrix.h ImathPlane.h \ - ImathSphere.h ImathVecAlgo.h ImathQuat.h \ - ImathFrustum.h ImathMath.h ImathGL.h \ - ImathColor.h ImathRandom.h ImathRoots.h \ - ImathHalfLimits.h ImathInterval.h ImathGLU.h \ - ImathFrame.h ImathPlatform.h ImathInt64.h - -INCLUDES = -I$(top_builddir) -I$(top_srcdir)/Iex -I$(top_srcdir)/Half \ - -I$(top_srcdir)/config - -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Imath/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Imath/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libImath.la: $(libImath_la_OBJECTS) $(libImath_la_DEPENDENCIES) - $(CXXLINK) -rpath $(libdir) $(libImath_la_LDFLAGS) $(libImath_la_OBJECTS) $(libImath_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImathBox.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImathColorAlgo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImathFun.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImathMatrixAlgo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImathRandom.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImathShear.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImathVec.Plo@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-libImathincludeHEADERS: $(libImathinclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libImathincludedir)" || $(mkdir_p) "$(DESTDIR)$(libImathincludedir)" - @list='$(libImathinclude_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libImathincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libImathincludedir)/$$f'"; \ - $(libImathincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libImathincludedir)/$$f"; \ - done - -uninstall-libImathincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libImathinclude_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libImathincludedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libImathincludedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libImathincludedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-libImathincludeHEADERS - -install-exec-am: install-libLTLIBRARIES - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-libImathincludeHEADERS \ - uninstall-libLTLIBRARIES - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am \ - install-libImathincludeHEADERS install-libLTLIBRARIES \ - install-man install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am \ - uninstall-libImathincludeHEADERS uninstall-libLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/Source/OpenEXR/OpenEXR.2003.vcproj b/Source/OpenEXR/OpenEXR.2003.vcproj deleted file mode 100644 index 3f6e346..0000000 --- a/Source/OpenEXR/OpenEXR.2003.vcproj +++ /dev/null @@ -1,746 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/OpenEXR/OpenEXR.2005.vcproj b/Source/OpenEXR/OpenEXR.2005.vcproj deleted file mode 100644 index fc62dff..0000000 --- a/Source/OpenEXR/OpenEXR.2005.vcproj +++ /dev/null @@ -1,1155 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/OpenEXR/OpenEXR.2008.vcproj b/Source/OpenEXR/OpenEXR.2008.vcproj deleted file mode 100644 index d1f8b41..0000000 --- a/Source/OpenEXR/OpenEXR.2008.vcproj +++ /dev/null @@ -1,1156 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/OpenEXR/OpenEXRConfig.h b/Source/OpenEXR/OpenEXRConfig.h deleted file mode 100644 index cc8bb9d..0000000 --- a/Source/OpenEXR/OpenEXRConfig.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// Define and set to 1 if the target system has POSIX thread support -// and you want OpenEXR to use it for multithreaded file I/O. -// - -#undef HAVE_PTHREAD // currently disabled in FreeImage - -// -// 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. -// - -#undef HAVE_POSIX_SEMAPHORES - -// -// Define and set to 1 if the target system is a Darwin-based system -// (e.g., OS X). -// - -#undef HAVE_DARWIN - -// -// 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 HAVE_LINUX_PROCFS - -// -// Define and set to 1 if the target system includes the NVIDIA Cg -// runtime. The exrdisplay program will use a fragment shader to -// accelerate the display of OpenEXR images. -// - -#undef HAVE_FRAGMENT_SHADERS - -// -// Define and set to 1 if the target system has a complete -// implementation, specifically if it supports the std::right -// formatter. -// - -#undef HAVE_COMPLETE_IOMANIP diff --git a/Source/ZLib/ChangeLog b/Source/ZLib/ChangeLog deleted file mode 100644 index 2c985f8..0000000 --- a/Source/ZLib/ChangeLog +++ /dev/null @@ -1,1409 +0,0 @@ - - ChangeLog file for zlib - -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 libary 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.7 2012/05/13 12:18:39 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 generated 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/Source/ZLib/FAQ b/Source/ZLib/FAQ deleted file mode 100644 index 99b7cf9..0000000 --- a/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/Source/ZLib/INDEX b/Source/ZLib/INDEX deleted file mode 100644 index 2ba0641..0000000 --- a/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/Source/ZLib/Makefile b/Source/ZLib/Makefile deleted file mode 100644 index 6bba86c..0000000 --- a/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/Source/ZLib/Makefile.in b/Source/ZLib/Makefile.in deleted file mode 100644 index 241deed..0000000 --- a/Source/ZLib/Makefile.in +++ /dev/null @@ -1,288 +0,0 @@ -# Makefile for zlib -# Copyright (C) 1995-2011 Jean-loup Gailly. -# 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 -DDEBUG -#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.7 -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 - -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=`mktemp fooXXXXXX`; \ - 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=`mktemp fooXXXXXX`; \ - 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=`mktemp fooXXXXXX`; \ - 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: test/infcover.c zlib.h zconf.h - $(CC) $(CFLAGS) -I. -c -o $@ 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: test/example.c zlib.h zconf.h - $(CC) $(CFLAGS) -I. -c -o $@ test/example.c - -minigzip.o: test/minigzip.c zlib.h zconf.h - $(CC) $(CFLAGS) -I. -c -o $@ test/minigzip.c - -example64.o: test/example.c zlib.h zconf.h - $(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ test/example.c - -minigzip64.o: test/minigzip.c zlib.h zconf.h - $(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ test/minigzip.c - -.SUFFIXES: .lo - -.c.lo: - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $< - -@mv objs/$*.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 - cp $(STATICLIB) $(DESTDIR)$(libdir) - chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB) - -@($(RANLIB) $(DESTDIR)$(libdir)/libz.a || true) >/dev/null 2>&1 - -@if test -n "$(SHAREDLIBV)"; then \ - 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 - cp zlib.3 $(DESTDIR)$(man3dir) - chmod 644 $(DESTDIR)$(man3dir)/zlib.3 - 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 - cp 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: zlib.3 - groff -mandoc -f H -T ps zlib.3 | ps2pdf - zlib.3.pdf - -zconf.h.cmakein: zconf.h.in - -@ TEMPFILE=`mktemp __XXXXXX`; \ - echo "/#define ZCONF_H/ a\\\\\n#cmakedefine Z_PREFIX\\\\\n#cmakedefine Z_HAVE_UNISTD_H\n" >> $$TEMPFILE &&\ - sed -f $$TEMPFILE zconf.h.in > zconf.h.cmakein &&\ - touch -r zconf.h.in zconf.h.cmakein &&\ - rm $$TEMPFILE - -zconf: zconf.h.in - cp -p 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 - -@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 Makefile.in Makefile - -tags: - etags *.[ch] - -depend: - makedepend -- $(CFLAGS) -- *.[ch] - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -adler32.o zutil.o: zutil.h zlib.h zconf.h -gzclose.o gzlib.o gzread.o gzwrite.o: zlib.h zconf.h gzguts.h -compress.o example.o minigzip.o uncompr.o: zlib.h zconf.h -crc32.o: zutil.h zlib.h zconf.h crc32.h -deflate.o: deflate.h zutil.h zlib.h zconf.h -infback.o inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h -inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -inftrees.o: zutil.h zlib.h zconf.h inftrees.h -trees.o: deflate.h zutil.h zlib.h zconf.h trees.h - -adler32.lo zutil.lo: zutil.h zlib.h zconf.h -gzclose.lo gzlib.lo gzread.lo gzwrite.lo: zlib.h zconf.h gzguts.h -compress.lo example.lo minigzip.lo uncompr.lo: zlib.h zconf.h -crc32.lo: zutil.h zlib.h zconf.h crc32.h -deflate.lo: deflate.h zutil.h zlib.h zconf.h -infback.lo inflate.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h -inffast.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -inftrees.lo: zutil.h zlib.h zconf.h inftrees.h -trees.lo: deflate.h zutil.h zlib.h zconf.h trees.h diff --git a/Source/ZLib/README b/Source/ZLib/README deleted file mode 100644 index 6f1255f..0000000 --- a/Source/ZLib/README +++ /dev/null @@ -1,115 +0,0 @@ -ZLIB DATA COMPRESSION LIBRARY - -zlib 1.2.7 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.7 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-2012 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/Source/ZLib/ZLib.2003.vcproj b/Source/ZLib/ZLib.2003.vcproj deleted file mode 100644 index 656408a..0000000 --- a/Source/ZLib/ZLib.2003.vcproj +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/ZLib/ZLib.2005.vcproj b/Source/ZLib/ZLib.2005.vcproj deleted file mode 100644 index 0eff871..0000000 --- a/Source/ZLib/ZLib.2005.vcproj +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/ZLib/ZLib.2008.vcproj b/Source/ZLib/ZLib.2008.vcproj deleted file mode 100644 index 0817f43..0000000 --- a/Source/ZLib/ZLib.2008.vcproj +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/ZLib/adler32.c b/Source/ZLib/adler32.c deleted file mode 100644 index 49dee68..0000000 --- a/Source/ZLib/adler32.c +++ /dev/null @@ -1,179 +0,0 @@ -/* adler32.c -- compute the Adler-32 checksum of a data stream - * Copyright (C) 1995-2011 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id: adler32.c,v 1.9 2012/05/13 12:18:39 drolon Exp $ */ - -#include "zutil.h" - -#define local static - -local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); - -#define BASE 65521 /* 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(adler, buf, len) - uLong adler; - const Bytef *buf; - uInt 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); -} - -/* ========================================================================= */ -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 >= (BASE << 1)) sum2 -= (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/Source/ZLib/compress.c b/Source/ZLib/compress.c deleted file mode 100644 index 2ee86dd..0000000 --- a/Source/ZLib/compress.c +++ /dev/null @@ -1,80 +0,0 @@ -/* compress.c -- compress a memory buffer - * Copyright (C) 1995-2005 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id: compress.c,v 1.9 2012/05/13 12:18:39 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; - - stream.next_in = (Bytef*)source; - stream.avail_in = (uInt)sourceLen; -#ifdef MAXSEG_64K - /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; -#endif - stream.next_out = dest; - stream.avail_out = (uInt)*destLen; - if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; - - stream.zalloc = (alloc_func)0; - stream.zfree = (free_func)0; - stream.opaque = (voidpf)0; - - err = deflateInit(&stream, level); - if (err != Z_OK) return err; - - err = deflate(&stream, Z_FINISH); - if (err != Z_STREAM_END) { - deflateEnd(&stream); - return err == Z_OK ? Z_BUF_ERROR : err; - } - *destLen = stream.total_out; - - err = deflateEnd(&stream); - return 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/Source/ZLib/configure b/Source/ZLib/configure deleted file mode 100644 index 36c7d8e..0000000 --- a/Source/ZLib/configure +++ /dev/null @@ -1,818 +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 - -# 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' < zlib.h` -VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h` -VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` -VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < 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 -build64=0 -gcc=0 -old_cc="$CC" -old_cflags="$CFLAGS" -OBJC='$(OBJZ) $(OBJG)' -PIC_OBJC='$(PIC_OBJZ) $(PIC_OBJG)' - -# process command line options -while test $# -ge 1 -do -case "$1" in - -h* | --help) - echo 'usage:' | tee -a configure.log - echo ' configure [--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 ;; - *) echo "unknown option: $1"; echo "$0 --help for help" | tee -a configure.log; exit 1 ;; - esac -done - -# define functions for testing compiler and library characteristics and logging the results -test=ztest$$ - -show() -{ - case "$*" in - *$test.c*) - echo === $test.c === >> configure.log - cat $test.c >> configure.log - echo === >> configure.log;; - esac - echo $* >> configure.log -} - -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" = "" -} - -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 ;; -esac - -show $cc -c $cflags $test.c -if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) >> configure.log 2>&1; then - echo ... using gcc >> configure.log - CC="$cc" - CFLAGS="${CFLAGS--O3} ${ARCHS}" - SFLAGS="${CFLAGS--O3} -fPIC" - LDFLAGS="${LDFLAGS} ${ARCHS}" - if test $build64 -eq 1; then - CFLAGS="${CFLAGS} -m64" - SFLAGS="${SFLAGS} -m64" - fi - if test "${ZLIBGCCWARN}" = "YES"; then - CFLAGS="${CFLAGS} -Wall -Wextra -pedantic" - 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,zlib.map"} ;; - *BSD | *bsd* | DragonFly) - LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,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 - exit 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"} - AR="/usr/bin/libtool" - 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 - ;; - 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 - -# see if shared library build supported -if test $shared -eq 1; then - echo Checking for shared library support... | tee -a configure.log - # we must test in two steps (cc then ld), required at least on SunOS 4.x - if try $CC -w -c $SFLAGS $test.c && - try $LDSHARED $SFLAGS -o $test$shared_ext $test.o; then - echo Building shared library $SHAREDLIBV with $CC. | tee -a configure.log - elif test -z "$old_cc" -a -z "$old_cflags"; then - echo No shared library support. | tee -a configure.log - shared=0; - else - echo 'No shared library support; try without defining CC and CFLAGS' | tee -a configure.log - shared=0; - fi -fi -if test $shared -eq 0; then - LDSHARED="$CC" - ALL="static" - TEST="all teststatic" - SHAREDLIB="" - SHAREDLIBV="" - SHAREDLIBM="" - echo Building static library $STATICLIB version $VER with $CC. | tee -a configure.log -else - ALL="static shared" - TEST="all teststatic testshared" -fi - -echo >> configure.log - -# check for underscores in external names for use by assembler code -CPP=${CPP-"$CC -E"} -case $CFLAGS in - *ASMV*) - echo >> 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 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 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 - -# find a four-byte unsiged integer type for crc calculations -cat > $test.c < -#define is32(n,t) for(n=1,k=0;n;n<<=1,k++);if(k==32){puts(t);return 0;} -int main() { - int k; - unsigned i; - unsigned long l; - unsigned short s; - is32(i, "unsigned") - is32(l, "unsigned long") - is32(s, "unsigned short") - return 1; -} -EOF -Z_U4="" -if try $CC $CFLAGS $test.c -o $test && Z_U4=`./$test` && test -n "$Z_U4"; then - sed < zconf.h "/#define Z_U4/s/\/\* \.\/configure may/#define Z_U4 $Z_U4 \/* .\/configure put the/" > zconf.temp.h - mv zconf.temp.h zconf.h - echo "Looking for a four-byte integer type... Found." | tee -a configure.log -else - echo "Looking for a four-byte integer type... Not found." | tee -a configure.log -fi - -# clean up files produced by running the compiler and linker -rm -f $test.[co] $test $test$shared_ext $test.gcno - -# show the results in the log -echo >> 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 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 -echo -------------------- >> configure.log -echo >> configure.log -echo >> configure.log - -# udpate Makefile with the configure results -sed < 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# -/^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 < 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 diff --git a/Source/ZLib/crc32.c b/Source/ZLib/crc32.c deleted file mode 100644 index 4e5df20..0000000 --- a/Source/ZLib/crc32.c +++ /dev/null @@ -1,425 +0,0 @@ -/* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-2006, 2010, 2011, 2012 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.9 2012/05/13 12:18:39 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 */ - -#define local static - -/* 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 *, unsigned)); - local unsigned long crc32_big OF((unsigned long, - const unsigned char FAR *, unsigned)); -# 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(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - uInt 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; -} - -#ifdef BYFOUR - -/* ========================================================================= */ -#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; - unsigned 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; - unsigned 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; - buf4--; - while (len >= 32) { - DOBIG32; - len -= 32; - } - while (len >= 4) { - DOBIG4; - len -= 4; - } - buf4++; - 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/Source/ZLib/crc32.h b/Source/ZLib/crc32.h deleted file mode 100644 index 9e0c778..0000000 --- a/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/Source/ZLib/deflate.c b/Source/ZLib/deflate.c deleted file mode 100644 index 7fa23b4..0000000 --- a/Source/ZLib/deflate.c +++ /dev/null @@ -1,1965 +0,0 @@ -/* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2012 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.9 2012/05/13 12:18:39 drolon Exp $ */ - -#include "deflate.h" - -const char deflate_copyright[] = - " deflate 1.2.7 Copyright 1995-2012 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 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 int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); -#ifdef ASMV - 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 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. - */ - -#define EQUAL 0 -/* result of memcmp for equal strings */ - -#ifndef NO_DUMMY_DECL -struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ -#endif - -/* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */ -#define RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0)) - -/* =========================================================================== - * Update a hash value with the given input byte - * IN assertion: all calls to 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 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)); - -/* ========================================================================= */ -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) { - 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->wrap = wrap; - s->gzhead = Z_NULL; - s->w_bits = windowBits; - s->w_size = 1 << s->w_bits; - s->w_mask = s->w_size - 1; - - s->hash_bits = 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 = (char*)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); -} - -/* ========================================================================= */ -int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) - z_streamp strm; - const Bytef *dictionary; - uInt dictLength; -{ - deflate_state *s; - uInt str, n; - int wrap; - unsigned avail; - unsigned char *next; - - if (strm == Z_NULL || strm->state == Z_NULL || 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 = (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 deflateResetKeep (strm) - z_streamp strm; -{ - deflate_state *s; - - if (strm == Z_NULL || strm->state == Z_NULL || - strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) { - 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 = 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 (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - if (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 (strm == Z_NULL || strm->state == Z_NULL) 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 (strm == Z_NULL || strm->state == Z_NULL) 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; - int err = Z_OK; - - if (strm == Z_NULL || strm->state == Z_NULL) 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) && - strm->total_in != 0) { - /* Flush the last buffer: */ - err = deflate(strm, Z_BLOCK); - } - if (s->level != level) { - 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 err; -} - -/* ========================================================================= */ -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 (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - s = strm->state; - s->good_match = good_length; - s->max_lazy_match = max_lazy; - s->nice_match = nice_length; - s->max_chain_length = 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; - Bytef *str; - - /* 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 (strm == Z_NULL || strm->state == Z_NULL) - 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; - case 2: /* gzip wrapper */ - wraplen = 18; - if (s->gzhead != Z_NULL) { /* user-supplied gzip header */ - 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; - 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 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; - } -} - -/* ========================================================================= */ -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 (strm == Z_NULL || strm->state == Z_NULL || - flush > Z_BLOCK || flush < 0) { - return Z_STREAM_ERROR; - } - s = strm->state; - - if (strm->next_out == Z_NULL || - (strm->next_in == Z_NULL && strm->avail_in != 0) || - (s->status == FINISH_STATE && flush != Z_FINISH)) { - ERR_RETURN(strm, Z_STREAM_ERROR); - } - if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); - - s->strm = strm; /* just in case */ - old_flush = s->last_flush; - s->last_flush = flush; - - /* Write the header */ - if (s->status == INIT_STATE) { -#ifdef GZIP - if (s->wrap == 2) { - 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; - } - 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; - } - } - else -#endif - { - 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); - - s->status = BUSY_STATE; - 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); - } - } -#ifdef GZIP - if (s->status == EXTRA_STATE) { - if (s->gzhead->extra != Z_NULL) { - uInt beg = s->pending; /* start of bytes to update crc */ - - while (s->gzindex < (s->gzhead->extra_len & 0xffff)) { - if (s->pending == s->pending_buf_size) { - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - flush_pending(strm); - beg = s->pending; - if (s->pending == s->pending_buf_size) - break; - } - put_byte(s, s->gzhead->extra[s->gzindex]); - s->gzindex++; - } - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - if (s->gzindex == s->gzhead->extra_len) { - s->gzindex = 0; - s->status = NAME_STATE; - } - } - else - s->status = NAME_STATE; - } - if (s->status == NAME_STATE) { - if (s->gzhead->name != Z_NULL) { - uInt beg = s->pending; /* start of bytes to update crc */ - int val; - - do { - if (s->pending == s->pending_buf_size) { - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - flush_pending(strm); - beg = s->pending; - if (s->pending == s->pending_buf_size) { - val = 1; - break; - } - } - val = s->gzhead->name[s->gzindex++]; - put_byte(s, val); - } while (val != 0); - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - if (val == 0) { - s->gzindex = 0; - s->status = COMMENT_STATE; - } - } - else - s->status = COMMENT_STATE; - } - if (s->status == COMMENT_STATE) { - if (s->gzhead->comment != Z_NULL) { - uInt beg = s->pending; /* start of bytes to update crc */ - int val; - - do { - if (s->pending == s->pending_buf_size) { - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - flush_pending(strm); - beg = s->pending; - if (s->pending == s->pending_buf_size) { - val = 1; - break; - } - } - val = s->gzhead->comment[s->gzindex++]; - put_byte(s, val); - } while (val != 0); - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - if (val == 0) - s->status = HCRC_STATE; - } - else - 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 + 2 <= s->pending_buf_size) { - 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; - } - } - else - s->status = BUSY_STATE; - } -#endif - - /* 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); - } - - /* 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->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; - } - } - } - Assert(strm->avail_out > 0, "bug2"); - - 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 (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - - status = strm->state->status; - if (status != INIT_STATE && - status != EXTRA_STATE && - status != NAME_STATE && - status != COMMENT_STATE && - status != HCRC_STATE && - status != BUSY_STATE && - status != FINISH_STATE) { - return Z_STREAM_ERROR; - } - - /* 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 (source == Z_NULL || dest == Z_NULL || source->state == 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 int 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 (int)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 = 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 = 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 DEBUG -/* =========================================================================== - * 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 /* 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; -{ - register unsigned n, m; - register Posf *p; - 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); - s->match_start -= wsize; - s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ - s->block_start -= (long) wsize; - - /* Slide the hash table (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. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - 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 - 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; \ -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -local block_state deflate_stored(s, flush) - deflate_state *s; - int flush; -{ - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - ulg max_block_size = 0xffff; - ulg max_start; - - if (max_block_size > s->pending_buf_size - 5) { - max_block_size = s->pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s->lookahead <= 1) { - - Assert(s->strstart < s->w_size+MAX_DIST(s) || - s->block_start >= (long)s->w_size, "slide too late"); - - fill_window(s); - if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more; - - if (s->lookahead == 0) break; /* flush the current block */ - } - Assert(s->block_start >= 0L, "block gone"); - - s->strstart += s->lookahead; - s->lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - max_start = s->block_start + max_block_size; - if (s->strstart == 0 || (ulg)s->strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s->lookahead = (uInt)(s->strstart - max_start); - s->strstart = (uInt)max_start; - FLUSH_BLOCK(s, 0); - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) { - FLUSH_BLOCK(s, 0); - } - } - s->insert = 0; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if ((long)s->strstart > s->block_start) - FLUSH_BLOCK(s, 0); - return block_done; -} - -/* =========================================================================== - * 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 - (int)(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/Source/ZLib/deflate.h b/Source/ZLib/deflate.h deleted file mode 100644 index e289b13..0000000 --- a/Source/ZLib/deflate.h +++ /dev/null @@ -1,346 +0,0 @@ -/* deflate.h -- internal compression state - * Copyright (C) 1995-2012 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.9 2012/05/13 12:18:39 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 -#define EXTRA_STATE 69 -#define NAME_STATE 73 -#define COMMENT_STATE 91 -#define HCRC_STATE 103 -#define BUSY_STATE 113 -#define FINISH_STATE 666 -/* 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 */ - 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 */ - uInt 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 */ - uInt gzindex; /* where in extra, name, or comment */ - Byte method; /* STORED (for zip only) or 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 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++] = (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 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 = (length); \ - ush dist = (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/Source/ZLib/gzclose.c b/Source/ZLib/gzclose.c deleted file mode 100644 index caeb99a..0000000 --- a/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/Source/ZLib/gzguts.h b/Source/ZLib/gzguts.h deleted file mode 100644 index ee3f281..0000000 --- a/Source/ZLib/gzguts.h +++ /dev/null @@ -1,193 +0,0 @@ -/* gzguts.h -- zlib internal header definitions for gz* operations - * Copyright (C) 2004, 2005, 2010, 2011, 2012 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 -#include - -#ifdef _WIN32 -# include -#endif - -#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) -# include -#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 - -#ifndef local -# define local static -#endif -/* 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 */ -#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 */ - 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/Source/ZLib/gzlib.c b/Source/ZLib/gzlib.c deleted file mode 100644 index ca55c6e..0000000 --- a/Source/ZLib/gzlib.c +++ /dev/null @@ -1,620 +0,0 @@ -/* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004, 2010, 2011, 2012 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -#if defined(_WIN32) && !defined(__BORLANDC__) -# define LSEEK _lseeki64 -#else -#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 -# define LSEEK lseek64 -#else -# define LSEEK lseek -#endif -#endif - -/* 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; - 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 = 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; - case 'T': - state->direct = 1; - 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 _WIN32 - if (fd == -2) { - len = wcstombs(NULL, path, 0); - if (len == (size_t)-1) - len = 0; - } - else -#endif - len = strlen(path); - state->path = malloc(len + 1); - if (state->path == NULL) { - free(state); - return NULL; - } -#ifdef _WIN32 - if (fd == -2) - if (len) - wcstombs(state->path, path, len + 1); - else - *(state->path) = 0; - else -#endif - strcpy(state->path, path); - - /* 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 _WIN32 - fd == -2 ? _wopen(path, oflag, 0666) : -#endif - open(path, oflag, 0666)); - if (state->fd == -1) { - free(state->path); - free(state); - return NULL; - } - if (state->mode == GZ_APPEND) - 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 = malloc(7 + 3 * sizeof(int))) == NULL) - return NULL; - sprintf(path, "", fd); /* for debugging */ - gz = gz_open(path, fd, mode); - free(path); - return gz; -} - -/* -- see zlib.h -- */ -#ifdef _WIN32 -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 < 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->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, save as static string */ - if (err == Z_MEM_ERROR) { - state->msg = (char *)msg; - return; - } - - /* construct error message with path */ - if ((state->msg = malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) { - state->err = Z_MEM_ERROR; - state->msg = (char *)"out of memory"; - return; - } - strcpy(state->msg, state->path); - strcat(state->msg, ": "); - strcat(state->msg, msg); - return; -} - -#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/Source/ZLib/gzread.c b/Source/ZLib/gzread.c deleted file mode 100644 index 3493d34..0000000 --- a/Source/ZLib/gzread.c +++ /dev/null @@ -1,589 +0,0 @@ -/* gzread.c -- zlib functions for reading gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012 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)); - -/* 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; - - *have = 0; - do { - ret = read(state->fd, buf + *have, len - *have); - if (ret <= 0) - break; - *have += 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, *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 = malloc(state->want); - state->out = malloc(state->want << 1); - if (state->in == NULL || state->out == NULL) { - if (state->out != NULL) - free(state->out); - if (state->in != NULL) - 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; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzread(file, buf, len) - gzFile file; - voidp buf; - unsigned len; -{ - unsigned got, n; - 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 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 the flaw in the interface) */ - if ((int)len < 0) { - gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); - return -1; - } - - /* 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 -1; - } - - /* get len bytes to buf, or less than len if at the end */ - got = 0; - do { - /* first just try copying data from the output buffer */ - if (state->x.have) { - n = state->x.have > len ? len : 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 && 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 || len < (state->size << 1)) { - /* get more output, looking for header if required */ - if (gz_fetch(state) == -1) - return -1; - 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, buf, len, &n) == -1) - return -1; - } - - /* large len -- decompress directly into user buffer */ - else { /* state->how == GZIP */ - strm->avail_out = len; - strm->next_out = buf; - if (gz_decomp(state) == -1) - return -1; - 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 (will fit in int) */ - return (int)got; -} - -/* -- see zlib.h -- */ -#undef gzgetc -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 gzread() */ - ret = gzread(file, 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] = 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] = 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 = 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/Source/ZLib/gzwrite.c b/Source/ZLib/gzwrite.c deleted file mode 100644 index 27cb342..0000000 --- a/Source/ZLib/gzwrite.c +++ /dev/null @@ -1,565 +0,0 @@ -/* gzwrite.c -- zlib functions for writing gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012 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)); - -/* Initialize state for writing a gzip file. Mark initialization by setting - state->size to non-zero. Return -1 on failure or 0 on success. */ -local int gz_init(state) - gz_statep state; -{ - int ret; - z_streamp strm = &(state->strm); - - /* allocate input buffer */ - state->in = malloc(state->want); - 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 = 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; - } - } - - /* 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, 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, got; - unsigned have; - 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) { - got = write(state->fd, strm->next_in, strm->avail_in); - if (got < 0 || (unsigned)got != strm->avail_in) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - strm->avail_in = 0; - 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))) { - have = (unsigned)(strm->next_out - state->x.next); - if (have && ((got = write(state->fd, state->x.next, have)) < 0 || - (unsigned)got != have)) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - if (strm->avail_out == 0) { - strm->avail_out = state->size; - strm->next_out = state->out; - } - state->x.next = strm->next_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 error, 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; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzwrite(file, buf, len) - gzFile file; - voidpc buf; - unsigned len; -{ - unsigned put = len; - unsigned n; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return 0; - 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 0; - - /* since an int is returned, make sure len fits in one, otherwise return - with an error (this avoids the flaw in the interface) */ - if ((int)len < 0) { - gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); - return 0; - } - - /* 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 { - if (strm->avail_in == 0) - strm->next_in = state->in; - n = state->size - strm->avail_in; - if (n > len) - n = len; - memcpy(strm->next_in + strm->avail_in, buf, n); - strm->avail_in += n; - state->x.pos += n; - buf = (char *)buf + n; - len -= n; - if (len && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - } while (len); - } - else { - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - - /* directly compress user buffer to file */ - strm->avail_in = len; - strm->next_in = (voidp)buf; - state->x.pos += len; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - } - - /* input was all buffered or compressed (put will fit in int) */ - return (int)put; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzputc(file, c) - gzFile file; - int c; -{ - 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 (strm->avail_in < state->size) { - if (strm->avail_in == 0) - strm->next_in = state->in; - strm->next_in[strm->avail_in++] = c; - state->x.pos++; - return c & 0xff; - } - - /* no room in buffer or not initialized, use gz_write() */ - buf[0] = c; - if (gzwrite(file, buf, 1) != 1) - return -1; - return c & 0xff; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzputs(file, str) - gzFile file; - const char *str; -{ - int ret; - unsigned len; - - /* write string */ - len = (unsigned)strlen(str); - ret = gzwrite(file, str, len); - return ret == 0 && len != 0 ? -1 : ret; -} - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -#include - -/* -- see zlib.h -- */ -int ZEXPORTVA gzprintf (gzFile file, const char *format, ...) -{ - int size, len; - gz_statep state; - z_streamp strm; - va_list va; - - /* 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 0; - - /* make sure we have some buffer space */ - 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; - } - - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - - /* do the printf() into the input buffer, put length in len */ - size = (int)(state->size); - state->in[size - 1] = 0; - va_start(va, format); -#ifdef NO_vsnprintf -# ifdef HAS_vsprintf_void - (void)vsprintf((char *)(state->in), format, va); - va_end(va); - for (len = 0; len < size; len++) - if (state->in[len] == 0) break; -# else - len = vsprintf((char *)(state->in), format, va); - va_end(va); -# endif -#else -# ifdef HAS_vsnprintf_void - (void)vsnprintf((char *)(state->in), size, format, va); - va_end(va); - len = strlen((char *)(state->in)); -# else - len = vsnprintf((char *)(state->in), size, format, va); - va_end(va); -# endif -#endif - - /* check that printf() results fit in buffer */ - if (len <= 0 || len >= (int)size || state->in[size - 1] != 0) - return 0; - - /* update buffer and position, defer compression until needed */ - strm->avail_in = (unsigned)len; - strm->next_in = state->in; - state->x.pos += len; - return len; -} - -#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; -{ - int size, len; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that can really pass pointer in ints */ - if (sizeof(int) != sizeof(void *)) - return 0; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return 0; - - /* make sure we have some buffer space */ - 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; - } - - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - - /* do the printf() into the input buffer, put length in len */ - size = (int)(state->size); - state->in[size - 1] = 0; -#ifdef NO_snprintf -# ifdef HAS_sprintf_void - sprintf((char *)(state->in), 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 (state->in[len] == 0) break; -# else - len = sprintf((char *)(state->in), 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((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - len = strlen((char *)(state->in)); -# else - len = snprintf((char *)(state->in), 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 >= (int)size || state->in[size - 1] != 0) - return 0; - - /* update buffer and position, defer compression until needed */ - strm->avail_in = (unsigned)len; - strm->next_in = state->in; - state->x.pos += len; - return len; -} - -#endif - -/* -- see zlib.h -- */ -int ZEXPORT gzflush(file, flush) - gzFile file; - int flush; -{ - 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 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 -1; - } - - /* compress remaining data with requested flush */ - 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 -1; - } - - /* 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_PARTIAL_FLUSH) == -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 (state->size) { - if (gz_comp(state, Z_FINISH) == -1) - ret = state->err; - 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/Source/ZLib/infback.c b/Source/ZLib/infback.c deleted file mode 100644 index 981aff1..0000000 --- a/Source/ZLib/infback.c +++ /dev/null @@ -1,640 +0,0 @@ -/* infback.c -- inflate using a call-back interface - * Copyright (C) 1995-2011 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 = 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; - 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/Source/ZLib/inffast.c b/Source/ZLib/inffast.c deleted file mode 100644 index 2f1d60b..0000000 --- a/Source/ZLib/inffast.c +++ /dev/null @@ -1,340 +0,0 @@ -/* inffast.c -- fast decoding - * Copyright (C) 1995-2008, 2010 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" - -#ifndef ASMINF - -/* Allow machine dependent optimization for post-increment or pre-increment. - Based on testing to date, - Pre-increment preferred for: - - PowerPC G3 (Adler) - - MIPS R5000 (Randers-Pehrson) - Post-increment preferred for: - - none - No measurable difference: - - Pentium III (Anderson) - - M68060 (Nikl) - */ -#ifdef POSTINC -# define OFF 0 -# define PUP(a) *(a)++ -#else -# define OFF 1 -# define PUP(a) *++(a) -#endif - -/* - 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; - unsigned char FAR *in; /* local strm->next_in */ - unsigned char FAR *last; /* while in < last, enough input available */ - 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 - OFF; - last = in + (strm->avail_in - 5); - out = strm->next_out - OFF; - 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)(PUP(in)) << bits; - bits += 8; - hold += (unsigned long)(PUP(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)); - PUP(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)(PUP(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)(PUP(in)) << bits; - bits += 8; - hold += (unsigned long)(PUP(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)(PUP(in)) << bits; - bits += 8; - if (bits < op) { - hold += (unsigned long)(PUP(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 { - PUP(out) = 0; - } while (--len); - continue; - } - len -= op - whave; - do { - PUP(out) = 0; - } while (--op > whave); - if (op == 0) { - from = out - dist; - do { - PUP(out) = PUP(from); - } while (--len); - continue; - } -#endif - } - from = window - OFF; - if (wnext == 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - PUP(out) = PUP(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 { - PUP(out) = PUP(from); - } while (--op); - from = window - OFF; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - PUP(out) = PUP(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 { - PUP(out) = PUP(from); - } while (--op); - from = out - dist; /* rest from output */ - } - } - while (len > 2) { - PUP(out) = PUP(from); - PUP(out) = PUP(from); - PUP(out) = PUP(from); - len -= 3; - } - if (len) { - PUP(out) = PUP(from); - if (len > 1) - PUP(out) = PUP(from); - } - } - else { - from = out - dist; /* copy direct from output */ - do { /* minimum length is three */ - PUP(out) = PUP(from); - PUP(out) = PUP(from); - PUP(out) = PUP(from); - len -= 3; - } while (len > 2); - if (len) { - PUP(out) = PUP(from); - if (len > 1) - PUP(out) = PUP(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 + OFF; - strm->next_out = out + OFF; - 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/Source/ZLib/inffast.h b/Source/ZLib/inffast.h deleted file mode 100644 index e5c1aa4..0000000 --- a/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/Source/ZLib/inffixed.h b/Source/ZLib/inffixed.h deleted file mode 100644 index d628327..0000000 --- a/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/Source/ZLib/inflate.c b/Source/ZLib/inflate.c deleted file mode 100644 index 47418a1..0000000 --- a/Source/ZLib/inflate.c +++ /dev/null @@ -1,1496 +0,0 @@ -/* inflate.c -- zlib decompression - * Copyright (C) 1995-2012 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 void fixedtables OF((struct inflate_state FAR *state)); -local int updatewindow OF((z_streamp strm, unsigned out)); -#ifdef BUILDFIXED - void makefixed OF((void)); -#endif -local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf, - unsigned len)); - -int ZEXPORT inflateResetKeep(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - - if (strm == Z_NULL || strm->state == Z_NULL) 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 (strm == Z_NULL || strm->state == Z_NULL) 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 (strm == Z_NULL || strm->state == Z_NULL) 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) + 1; -#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->window = Z_NULL; - 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 (strm == Z_NULL || strm->state == Z_NULL) 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 + bits > 32) return Z_STREAM_ERROR; - value &= (1L << bits) - 1; - state->hold += value << state->bits; - state->bits += 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, out) -z_streamp strm; -unsigned out; -{ - struct inflate_state FAR *state; - unsigned copy, 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 */ - copy = out - strm->avail_out; - if (copy >= state->wsize) { - zmemcpy(state->window, strm->next_out - 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, strm->next_out - copy, dist); - copy -= dist; - if (copy) { - zmemcpy(state->window, strm->next_out - 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; - 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 (strm == Z_NULL || strm->state == Z_NULL || 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 */ - 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; - else if (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) 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) 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) 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) 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->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++] = len; - } while (len && copy < have); - if (state->flags & 0x0200) - 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++] = len; - } while (len && copy < have); - if (state->flags & 0x0200) - 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 (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 = (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")); - 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 = (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_; - 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 (out) - strm->adler = state->check = - UPDATE(state->check, put - out, out); - out = left; - if (( -#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, 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 && out) - strm->adler = state->check = - UPDATE(state->check, strm->next_out - out, out); - strm->data_type = 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 (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) - 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 inflateSetDictionary(strm, dictionary, dictLength) -z_streamp strm; -const Bytef *dictionary; -uInt dictLength; -{ - struct inflate_state FAR *state; - unsigned long dictid; - unsigned char *next; - unsigned avail; - int ret; - - /* check state */ - if (strm == Z_NULL || strm->state == Z_NULL) 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 */ - next = strm->next_out; - avail = strm->avail_out; - strm->next_out = (Bytef *)dictionary + dictLength; - strm->avail_out = 0; - ret = updatewindow(strm, dictLength); - strm->avail_out = avail; - strm->next_out = next; - 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 (strm == Z_NULL || strm->state == Z_NULL) 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; -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 (strm == Z_NULL || strm->state == Z_NULL) 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 (strm == Z_NULL || strm->state == Z_NULL) 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 (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL || - source->zalloc == (alloc_func)0 || source->zfree == (free_func)0) - 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)); - 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 (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - state->sane = !subvert; -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - return Z_OK; -#else - state->sane = 1; - return Z_DATA_ERROR; -#endif -} - -long ZEXPORT inflateMark(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - - if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; - state = (struct inflate_state FAR *)strm->state; - return ((long)(state->back) << 16) + - (state->mode == COPY ? state->length : - (state->mode == MATCH ? state->was - state->length : 0)); -} diff --git a/Source/ZLib/inflate.h b/Source/ZLib/inflate.h deleted file mode 100644 index 95f4986..0000000 --- a/Source/ZLib/inflate.h +++ /dev/null @@ -1,122 +0,0 @@ -/* inflate.h -- internal inflate state definition - * Copyright (C) 1995-2009 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, /* 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 10K bytes. */ -struct inflate_state { - 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 */ - 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/Source/ZLib/inftrees.c b/Source/ZLib/inftrees.c deleted file mode 100644 index abcd7c4..0000000 --- a/Source/ZLib/inftrees.c +++ /dev/null @@ -1,306 +0,0 @@ -/* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2012 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.7 Copyright 1995-2012 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 */ - int end; /* use base and extra for symbol > end */ - 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, 78, 68}; - 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 */ - end = 19; - break; - case LENS: - base = lbase; - base -= 257; - extra = lext; - extra -= 257; - end = 256; - break; - default: /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* 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 ((int)(work[sym]) < end) { - here.op = (unsigned char)0; - here.val = work[sym]; - } - else if ((int)(work[sym]) > end) { - here.op = (unsigned char)(extra[work[sym]]); - here.val = base[work[sym]]; - } - 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/Source/ZLib/inftrees.h b/Source/ZLib/inftrees.h deleted file mode 100644 index baa53a0..0000000 --- a/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/Source/ZLib/trees.c b/Source/ZLib/trees.c deleted file mode 100644 index ac2696b..0000000 --- a/Source/ZLib/trees.c +++ /dev/null @@ -1,1224 +0,0 @@ -/* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2012 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.9 2012/05/13 12:18:39 drolon Exp $ */ - -/* #define GEN_TREES_H */ - -#include "deflate.h" - -#ifdef 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 static_tree_desc static_l_desc = -{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; - -local static_tree_desc static_d_desc = -{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; - -local 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, ct_data *ltree, - 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)); -local void copy_block OF((deflate_state *s, charf *buf, unsigned len, - int header)); - -#ifdef GEN_TREES_H -local void gen_trees_header OF((void)); -#endif - -#ifndef 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 /* 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 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 /* !DEBUG */ - -#define send_bits(s, value, length) \ -{ int len = length;\ - if (s->bi_valid > (int)Buf_size - len) {\ - int val = 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 /* 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 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 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 * (bits + xbits); - if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits); - } - if (overflow == 0) return; - - Trace((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) { - Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s->opt_len += ((long)bits - (long)tree[m].Len) - *(long)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 */ - ush 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++) { - next_code[bits] = code = (code + bl_count[bits-1]) << 1; - } - /* 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*(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 */ -#ifdef DEBUG - s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; - s->compressed_len += (stored_len + 4) << 3; -#endif - copy_block(s, buf, (unsigned)stored_len, 1); /* with header */ -} - -/* =========================================================================== - * 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 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 output the encoded block to the zip file. - */ -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, (ct_data *)static_ltree, (ct_data *)static_dtree); -#ifdef 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, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree); -#ifdef 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 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; - ct_data *ltree; /* literal tree */ - 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 -= 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 DEBUG - s->bits_sent = (s->bits_sent+7) & ~7; -#endif -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -local void copy_block(s, buf, len, header) - deflate_state *s; - charf *buf; /* the input data */ - unsigned len; /* its length */ - int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, (ush)len); - put_short(s, (ush)~len); -#ifdef DEBUG - s->bits_sent += 2*16; -#endif - } -#ifdef DEBUG - s->bits_sent += (ulg)len<<3; -#endif - while (len--) { - put_byte(s, *buf++); - } -} diff --git a/Source/ZLib/trees.h b/Source/ZLib/trees.h deleted file mode 100644 index d35639d..0000000 --- a/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/Source/ZLib/uncompr.c b/Source/ZLib/uncompr.c deleted file mode 100644 index bd4041e..0000000 --- a/Source/ZLib/uncompr.c +++ /dev/null @@ -1,59 +0,0 @@ -/* uncompr.c -- decompress a memory buffer - * Copyright (C) 1995-2003, 2010 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id: uncompr.c,v 1.9 2012/05/13 12:18:39 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 actual size of the compressed buffer. - - 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. -*/ -int ZEXPORT uncompress (dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; -{ - z_stream stream; - int err; - - stream.next_in = (Bytef*)source; - stream.avail_in = (uInt)sourceLen; - /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; - - stream.next_out = dest; - stream.avail_out = (uInt)*destLen; - if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; - - stream.zalloc = (alloc_func)0; - stream.zfree = (free_func)0; - - err = inflateInit(&stream); - if (err != Z_OK) return err; - - err = inflate(&stream, Z_FINISH); - if (err != Z_STREAM_END) { - inflateEnd(&stream); - if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0)) - return Z_DATA_ERROR; - return err; - } - *destLen = stream.total_out; - - err = inflateEnd(&stream); - return err; -} diff --git a/Source/ZLib/zconf.h b/Source/ZLib/zconf.h deleted file mode 100644 index 05ee2ff..0000000 --- a/Source/ZLib/zconf.h +++ /dev/null @@ -1,506 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2012 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id: zconf.h,v 1.9 2012/05/13 12:18:39 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 */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# 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 -# 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 deflate z_deflate -# define deflateBound z_deflateBound -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# 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 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 gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetHeader z_inflateGetHeader -# 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 inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateResetKeep z_inflateResetKeep -# 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 -# 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 - -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL -#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 a few 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 - -/* ./configure may #define Z_U4 here */ - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# else -# if (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# else -# if (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -# endif -# 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 - -#ifdef _WIN32 -# include /* for wchar_t */ -#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/Source/ZLib/zconf.h.in b/Source/ZLib/zconf.h.in deleted file mode 100644 index ce1cb33..0000000 --- a/Source/ZLib/zconf.h.in +++ /dev/null @@ -1,506 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2012 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id: zconf.h.in,v 1.4 2012/05/13 12:18:39 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 */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# 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 -# 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 deflate z_deflate -# define deflateBound z_deflateBound -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# 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 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 gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetHeader z_inflateGetHeader -# 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 inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateResetKeep z_inflateResetKeep -# 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 -# 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 - -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL -#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 a few 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 - -/* ./configure may #define Z_U4 here */ - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# else -# if (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# else -# if (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -# endif -# 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 - -#ifdef _WIN32 -# include /* for wchar_t */ -#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/Source/ZLib/zlib.3 b/Source/ZLib/zlib.3 deleted file mode 100644 index 79d3402..0000000 --- a/Source/ZLib/zlib.3 +++ /dev/null @@ -1,151 +0,0 @@ -.TH ZLIB 3 "2 May 2012" -.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 available in Java using the java.util.zip package: -.IP -http://java.sun.com/developer/technicalArticles/Programming/compression/ -.LP -A Perl interface to -.IR zlib , -written by Paul Marquess (pmqs@cpan.org), -is available at CPAN (Comprehensive Perl Archive Network) sites, -including: -.IP -http://search.cpan.org/~pmqs/IO-Compress-Zlib/ -.LP -A Python interface to -.IR zlib , -written by A.M. Kuchling (amk@magnet.com), -is available in Python 1.5 and later versions: -.IP -http://docs.python.org/library/zlib.html -.LP -.I zlib -is built into -.IR tcl: -.IP -http://wiki.tcl.tk/4610 -.LP -An experimental package to read and write files in .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 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 -Version 1.2.7 -Copyright (C) 1995-2012 Jean-loup Gailly (jloup@gzip.org) -and Mark Adler (madler@alumni.caltech.edu). -.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. -See the distribution directory with respect to requirements -governing redistribution. -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/Source/ZLib/zlib.h b/Source/ZLib/zlib.h deleted file mode 100644 index 3edf3ac..0000000 --- a/Source/ZLib/zlib.h +++ /dev/null @@ -1,1744 +0,0 @@ -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.7, May 2nd, 2012 - - Copyright (C) 1995-2012 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.7" -#define ZLIB_VERNUM 0x1270 -#define ZLIB_VER_MAJOR 1 -#define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 7 -#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 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 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 should be put there */ - 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 */ - uLong adler; /* adler32 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. - - 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 in 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 (though see inflate()) */ - -#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(). - - - Provide 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 (in interactive applications). Some - output may be provided even if flush is not set. - - 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. - - 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 code - 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, 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 immediately after deflateInit if all the compression - is to be done in a single step. In this case, 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 adler32 checksum of all input read - so far (that is, total_in bytes). - - deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). 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), 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. If next_in is not Z_NULL and avail_in is large enough (the - exact value depends on the compression method), inflateInit determines the - compression method from the zlib header and allocates all data structures - accordingly; otherwise the allocation will be deferred to the first call of - inflate. 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 - 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 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), next_in is updated and processing will - resume at this point for the next call of inflate(). - - - Provide 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. 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. - Also to assist in this, on return inflate() will set 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 adler32 - 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, so applications that need that information should - instead use raw inflate, see inflateInit2() below, or inflateBack() and - perform their own processing of the gzip header and trailer. When processing - gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output - producted so far. The CRC-32 is checked against the gzip trailer. - - 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), Z_STREAM_ERROR if the stream structure was inconsistent (for example - next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory, - Z_BUF_ERROR if no progress is 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 desired. -*/ - - -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, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a - static string (which must not be deallocated). -*/ - - - /* 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. - - 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 an adler32 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 255 (unknown). If a - gzip stream is being written, strm->adler is a crc32 instead of an adler32. - - 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 adler32 value - of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The adler32 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 - adler32 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 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 all the internal compression state. The - stream will keep the same compression level and any other attributes that - may have been set by deflateInit2. - - 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 level is changed, the input available so far is - compressed with the old level (and may be flushed); the new level will take - effect only at the next call of deflate(). - - Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to be - compressed and flushed. In particular, strm->avail_out must be non-zero. - - deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if - strm->avail_out was zero. -*/ - -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 adler32 or a crc32 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 - crc32 instead of an adler32. - - 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 adler32 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 adler32 value). inflateSetDictionary does not - perform any decompression: this will be done by subsequent calls of - inflate(). -*/ - -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 occurences 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 all 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. - - 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 -1 << 16 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 *, 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 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. This - function 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 normal - behavior of inflate(), which expects either a zlib or gzip 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: 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 buffer. - - 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 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. -*/ - -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 buffer. - - 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. -*/ - - /* 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. Two buffers are allocated, either both of the specified size when - writing, or one of the specified size and the other twice that size when - reading. 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. - - gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not - opened for writing. -*/ - -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. -*/ - -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 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 0 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 - concatented 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 CRC32 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_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_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)); -#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)) - -#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 */ - -/* hack for buggy compilers */ -#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; -#endif - -/* 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 inflateResetKeep OF((z_streamp)); -ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); -#if defined(_WIN32) && !defined(Z_SOLO) -ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, - const char *mode)); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* ZLIB_H */ diff --git a/Source/ZLib/zutil.c b/Source/ZLib/zutil.c deleted file mode 100644 index b11e5b5..0000000 --- a/Source/ZLib/zutil.c +++ /dev/null @@ -1,324 +0,0 @@ -/* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id: zutil.c,v 1.9 2012/05/13 12:18:39 drolon Exp $ */ - -#include "zutil.h" -#ifndef Z_SOLO -# include "gzguts.h" -#endif - -#ifndef NO_DUMMY_DECL -struct internal_state {int dummy;}; /* for buggy compilers */ -#endif - -const char * const z_errmsg[10] = { -"need dictionary", /* Z_NEED_DICT 2 */ -"stream end", /* Z_STREAM_END 1 */ -"", /* Z_OK 0 */ -"file error", /* Z_ERRNO (-1) */ -"stream error", /* Z_STREAM_ERROR (-2) */ -"data error", /* Z_DATA_ERROR (-3) */ -"insufficient memory", /* Z_MEM_ERROR (-4) */ -"buffer error", /* Z_BUF_ERROR (-5) */ -"incompatible version",/* Z_VERSION_ERROR (-6) */ -""}; - - -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 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 DEBUG - -# 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 = opaque; /* just to make some compilers happy */ - ulg bsize = (ulg)items*size; - - /* 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; - 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; - } - ptr = opaque; /* just to make some compilers happy */ - 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) -{ - if (opaque) opaque = 0; /* to make compiler happy */ - return _halloc((long)items, size); -} - -void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) -{ - if (opaque) opaque = 0; /* to make compiler happy */ - _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; -{ - if (opaque) items += size - size; /* make compiler happy */ - return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : - (voidpf)calloc(items, size); -} - -void ZLIB_INTERNAL zcfree (opaque, ptr) - voidpf opaque; - voidpf ptr; -{ - free(ptr); - if (opaque) return; /* make compiler happy */ -} - -#endif /* MY_ZCALLOC */ - -#endif /* !Z_SOLO */ diff --git a/Source/ZLib/zutil.h b/Source/ZLib/zutil.h deleted file mode 100644 index 12eeab2..0000000 --- a/Source/ZLib/zutil.h +++ /dev/null @@ -1,252 +0,0 @@ -/* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2012 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: zutil.h,v 1.9 2012/05/13 12:18:39 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 -/* 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 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 = (char*)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 0x01 -#endif - -#if defined(VAXC) || defined(VMS) -# define OS_CODE 0x02 -# define F_OPEN(name, mode) \ - fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") -#endif - -#if defined(ATARI) || defined(atarist) -# define OS_CODE 0x05 -#endif - -#ifdef OS2 -# define OS_CODE 0x06 -# if defined(M_I86) && !defined(Z_SOLO) -# include -# endif -#endif - -#if defined(MACOS) || defined(TARGET_OS_MAC) -# define OS_CODE 0x07 -# 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 TOPS20 -# define OS_CODE 0x0a -#endif - -#ifdef WIN32 -# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */ -# define OS_CODE 0x0b -# endif -#endif - -#ifdef __50SERIES /* Prime/PRIMOS */ -# define OS_CODE 0x0f -#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 0x03 /* 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 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 */ -- 1.8.2.3