rfreeimage 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +1 -0
- data/Rakefile +34 -0
- data/ext/rfreeimage/extconf.rb +35 -0
- data/ext/rfreeimage/rfi_main.c +389 -0
- data/lib/rfreeimage/image.rb +26 -0
- data/lib/rfreeimage/version.rb +3 -0
- data/lib/rfreeimage.rb +3 -0
- data/rfreeimage.gemspec +32 -0
- data/vendor/FreeImage/Makefile +34 -0
- data/vendor/FreeImage/Makefile.cygwin +74 -0
- data/vendor/FreeImage/Makefile.fip +84 -0
- data/vendor/FreeImage/Makefile.gnu +83 -0
- data/vendor/FreeImage/Makefile.iphone +96 -0
- data/vendor/FreeImage/Makefile.mingw +136 -0
- data/vendor/FreeImage/Makefile.osx +115 -0
- data/vendor/FreeImage/Makefile.solaris +66 -0
- data/vendor/FreeImage/Makefile.srcs +6 -0
- data/vendor/FreeImage/README.iphone +19 -0
- data/vendor/FreeImage/README.linux +50 -0
- data/vendor/FreeImage/README.minGW +236 -0
- data/vendor/FreeImage/README.osx +44 -0
- data/vendor/FreeImage/README.solaris +67 -0
- data/vendor/FreeImage/Source/CacheFile.h +92 -0
- data/vendor/FreeImage/Source/DeprecationManager/Deprecated.cpp +36 -0
- data/vendor/FreeImage/Source/DeprecationManager/DeprecationMgr.cpp +103 -0
- data/vendor/FreeImage/Source/DeprecationManager/DeprecationMgr.h +83 -0
- data/vendor/FreeImage/Source/FreeImage/BitmapAccess.cpp +1573 -0
- data/vendor/FreeImage/Source/FreeImage/CacheFile.cpp +271 -0
- data/vendor/FreeImage/Source/FreeImage/ColorLookup.cpp +785 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion.cpp +551 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion16_555.cpp +209 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion16_565.cpp +204 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion24.cpp +252 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion32.cpp +345 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion4.cpp +246 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion8.cpp +305 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionFloat.cpp +194 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionRGB16.cpp +144 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionRGBA16.cpp +147 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionRGBAF.cpp +250 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionRGBF.cpp +243 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionType.cpp +699 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionUINT16.cpp +134 -0
- data/vendor/FreeImage/Source/FreeImage/FreeImage.cpp +226 -0
- data/vendor/FreeImage/Source/FreeImage/FreeImageC.c +22 -0
- data/vendor/FreeImage/Source/FreeImage/FreeImageIO.cpp +175 -0
- data/vendor/FreeImage/Source/FreeImage/GetType.cpp +92 -0
- data/vendor/FreeImage/Source/FreeImage/Halftoning.cpp +474 -0
- data/vendor/FreeImage/Source/FreeImage/J2KHelper.cpp +591 -0
- data/vendor/FreeImage/Source/FreeImage/J2KHelper.h +36 -0
- data/vendor/FreeImage/Source/FreeImage/LFPQuantizer.cpp +208 -0
- data/vendor/FreeImage/Source/FreeImage/MNGHelper.cpp +1320 -0
- data/vendor/FreeImage/Source/FreeImage/MemoryIO.cpp +237 -0
- data/vendor/FreeImage/Source/FreeImage/MultiPage.cpp +974 -0
- data/vendor/FreeImage/Source/FreeImage/NNQuantizer.cpp +507 -0
- data/vendor/FreeImage/Source/FreeImage/PSDParser.cpp +1057 -0
- data/vendor/FreeImage/Source/FreeImage/PSDParser.h +271 -0
- data/vendor/FreeImage/Source/FreeImage/PixelAccess.cpp +197 -0
- data/vendor/FreeImage/Source/FreeImage/Plugin.cpp +822 -0
- data/vendor/FreeImage/Source/FreeImage/PluginBMP.cpp +1494 -0
- data/vendor/FreeImage/Source/FreeImage/PluginCUT.cpp +240 -0
- data/vendor/FreeImage/Source/FreeImage/PluginDDS.cpp +655 -0
- data/vendor/FreeImage/Source/FreeImage/PluginEXR.cpp +773 -0
- data/vendor/FreeImage/Source/FreeImage/PluginG3.cpp +433 -0
- data/vendor/FreeImage/Source/FreeImage/PluginGIF.cpp +1407 -0
- data/vendor/FreeImage/Source/FreeImage/PluginHDR.cpp +722 -0
- data/vendor/FreeImage/Source/FreeImage/PluginICO.cpp +824 -0
- data/vendor/FreeImage/Source/FreeImage/PluginIFF.cpp +459 -0
- data/vendor/FreeImage/Source/FreeImage/PluginJ2K.cpp +328 -0
- data/vendor/FreeImage/Source/FreeImage/PluginJNG.cpp +162 -0
- data/vendor/FreeImage/Source/FreeImage/PluginJP2.cpp +328 -0
- data/vendor/FreeImage/Source/FreeImage/PluginJPEG.cpp +1706 -0
- data/vendor/FreeImage/Source/FreeImage/PluginJXR.cpp +1475 -0
- data/vendor/FreeImage/Source/FreeImage/PluginKOALA.cpp +243 -0
- data/vendor/FreeImage/Source/FreeImage/PluginMNG.cpp +153 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPCD.cpp +251 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPCX.cpp +659 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPFM.cpp +409 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPICT.cpp +1343 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPNG.cpp +1115 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPNM.cpp +838 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPSD.cpp +131 -0
- data/vendor/FreeImage/Source/FreeImage/PluginRAS.cpp +512 -0
- data/vendor/FreeImage/Source/FreeImage/PluginRAW.cpp +793 -0
- data/vendor/FreeImage/Source/FreeImage/PluginSGI.cpp +425 -0
- data/vendor/FreeImage/Source/FreeImage/PluginTARGA.cpp +1591 -0
- data/vendor/FreeImage/Source/FreeImage/PluginTIFF.cpp +2631 -0
- data/vendor/FreeImage/Source/FreeImage/PluginWBMP.cpp +372 -0
- data/vendor/FreeImage/Source/FreeImage/PluginWebP.cpp +698 -0
- data/vendor/FreeImage/Source/FreeImage/PluginXBM.cpp +399 -0
- data/vendor/FreeImage/Source/FreeImage/PluginXPM.cpp +487 -0
- data/vendor/FreeImage/Source/FreeImage/TIFFLogLuv.cpp +65 -0
- data/vendor/FreeImage/Source/FreeImage/ToneMapping.cpp +75 -0
- data/vendor/FreeImage/Source/FreeImage/WuQuantizer.cpp +559 -0
- data/vendor/FreeImage/Source/FreeImage/ZLibInterface.cpp +223 -0
- data/vendor/FreeImage/Source/FreeImage/tmoColorConvert.cpp +479 -0
- data/vendor/FreeImage/Source/FreeImage/tmoDrago03.cpp +295 -0
- data/vendor/FreeImage/Source/FreeImage/tmoFattal02.cpp +689 -0
- data/vendor/FreeImage/Source/FreeImage/tmoReinhard05.cpp +260 -0
- data/vendor/FreeImage/Source/FreeImage.h +1153 -0
- data/vendor/FreeImage/Source/FreeImageIO.h +63 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/BSplineRotate.cpp +730 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Background.cpp +895 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Channels.cpp +488 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp +917 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Colors.cpp +967 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp +861 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Display.cpp +230 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Filters.h +287 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Flip.cpp +166 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp +623 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp +505 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Rescale.cpp +192 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Resize.cpp +2116 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Resize.h +196 -0
- data/vendor/FreeImage/Source/LibJPEG/ansi2knr.c +739 -0
- data/vendor/FreeImage/Source/LibJPEG/cderror.h +134 -0
- data/vendor/FreeImage/Source/LibJPEG/cdjpeg.c +181 -0
- data/vendor/FreeImage/Source/LibJPEG/cdjpeg.h +187 -0
- data/vendor/FreeImage/Source/LibJPEG/cjpeg.c +664 -0
- data/vendor/FreeImage/Source/LibJPEG/ckconfig.c +402 -0
- data/vendor/FreeImage/Source/LibJPEG/djpeg.c +617 -0
- data/vendor/FreeImage/Source/LibJPEG/example.c +433 -0
- data/vendor/FreeImage/Source/LibJPEG/jaricom.c +153 -0
- data/vendor/FreeImage/Source/LibJPEG/jcapimin.c +288 -0
- data/vendor/FreeImage/Source/LibJPEG/jcapistd.c +162 -0
- data/vendor/FreeImage/Source/LibJPEG/jcarith.c +944 -0
- data/vendor/FreeImage/Source/LibJPEG/jccoefct.c +454 -0
- data/vendor/FreeImage/Source/LibJPEG/jccolor.c +604 -0
- data/vendor/FreeImage/Source/LibJPEG/jcdctmgr.c +477 -0
- data/vendor/FreeImage/Source/LibJPEG/jchuff.c +1573 -0
- data/vendor/FreeImage/Source/LibJPEG/jcinit.c +84 -0
- data/vendor/FreeImage/Source/LibJPEG/jcmainct.c +297 -0
- data/vendor/FreeImage/Source/LibJPEG/jcmarker.c +719 -0
- data/vendor/FreeImage/Source/LibJPEG/jcmaster.c +856 -0
- data/vendor/FreeImage/Source/LibJPEG/jcomapi.c +106 -0
- data/vendor/FreeImage/Source/LibJPEG/jconfig.h +161 -0
- data/vendor/FreeImage/Source/LibJPEG/jcparam.c +675 -0
- data/vendor/FreeImage/Source/LibJPEG/jcprepct.c +358 -0
- data/vendor/FreeImage/Source/LibJPEG/jcsample.c +545 -0
- data/vendor/FreeImage/Source/LibJPEG/jctrans.c +385 -0
- data/vendor/FreeImage/Source/LibJPEG/jdapimin.c +399 -0
- data/vendor/FreeImage/Source/LibJPEG/jdapistd.c +276 -0
- data/vendor/FreeImage/Source/LibJPEG/jdarith.c +796 -0
- data/vendor/FreeImage/Source/LibJPEG/jdatadst.c +270 -0
- data/vendor/FreeImage/Source/LibJPEG/jdatasrc.c +275 -0
- data/vendor/FreeImage/Source/LibJPEG/jdcoefct.c +741 -0
- data/vendor/FreeImage/Source/LibJPEG/jdcolor.c +748 -0
- data/vendor/FreeImage/Source/LibJPEG/jdct.h +393 -0
- data/vendor/FreeImage/Source/LibJPEG/jddctmgr.c +384 -0
- data/vendor/FreeImage/Source/LibJPEG/jdhuff.c +1554 -0
- data/vendor/FreeImage/Source/LibJPEG/jdinput.c +662 -0
- data/vendor/FreeImage/Source/LibJPEG/jdmainct.c +513 -0
- data/vendor/FreeImage/Source/LibJPEG/jdmarker.c +1511 -0
- data/vendor/FreeImage/Source/LibJPEG/jdmaster.c +543 -0
- data/vendor/FreeImage/Source/LibJPEG/jdmerge.c +401 -0
- data/vendor/FreeImage/Source/LibJPEG/jdpostct.c +290 -0
- data/vendor/FreeImage/Source/LibJPEG/jdsample.c +361 -0
- data/vendor/FreeImage/Source/LibJPEG/jdtrans.c +140 -0
- data/vendor/FreeImage/Source/LibJPEG/jerror.c +253 -0
- data/vendor/FreeImage/Source/LibJPEG/jerror.h +304 -0
- data/vendor/FreeImage/Source/LibJPEG/jfdctflt.c +174 -0
- data/vendor/FreeImage/Source/LibJPEG/jfdctfst.c +230 -0
- data/vendor/FreeImage/Source/LibJPEG/jfdctint.c +4406 -0
- data/vendor/FreeImage/Source/LibJPEG/jidctflt.c +235 -0
- data/vendor/FreeImage/Source/LibJPEG/jidctfst.c +368 -0
- data/vendor/FreeImage/Source/LibJPEG/jidctint.c +5179 -0
- data/vendor/FreeImage/Source/LibJPEG/jinclude.h +91 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemansi.c +167 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemdos.c +638 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemmac.c +289 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemmgr.c +1119 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemname.c +276 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemnobs.c +109 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemsys.h +198 -0
- data/vendor/FreeImage/Source/LibJPEG/jmorecfg.h +442 -0
- data/vendor/FreeImage/Source/LibJPEG/jpegint.h +426 -0
- data/vendor/FreeImage/Source/LibJPEG/jpeglib.h +1180 -0
- data/vendor/FreeImage/Source/LibJPEG/jpegtran.c +577 -0
- data/vendor/FreeImage/Source/LibJPEG/jquant1.c +857 -0
- data/vendor/FreeImage/Source/LibJPEG/jquant2.c +1311 -0
- data/vendor/FreeImage/Source/LibJPEG/jutils.c +227 -0
- data/vendor/FreeImage/Source/LibJPEG/jversion.h +14 -0
- data/vendor/FreeImage/Source/LibJPEG/rdbmp.c +480 -0
- data/vendor/FreeImage/Source/LibJPEG/rdcolmap.c +253 -0
- data/vendor/FreeImage/Source/LibJPEG/rdgif.c +38 -0
- data/vendor/FreeImage/Source/LibJPEG/rdjpgcom.c +515 -0
- data/vendor/FreeImage/Source/LibJPEG/rdppm.c +459 -0
- data/vendor/FreeImage/Source/LibJPEG/rdrle.c +387 -0
- data/vendor/FreeImage/Source/LibJPEG/rdswitch.c +365 -0
- data/vendor/FreeImage/Source/LibJPEG/rdtarga.c +500 -0
- data/vendor/FreeImage/Source/LibJPEG/transupp.c +1763 -0
- data/vendor/FreeImage/Source/LibJPEG/transupp.h +219 -0
- data/vendor/FreeImage/Source/LibJPEG/wrbmp.c +442 -0
- data/vendor/FreeImage/Source/LibJPEG/wrgif.c +399 -0
- data/vendor/FreeImage/Source/LibJPEG/wrjpgcom.c +583 -0
- data/vendor/FreeImage/Source/LibJPEG/wrppm.c +269 -0
- data/vendor/FreeImage/Source/LibJPEG/wrrle.c +305 -0
- data/vendor/FreeImage/Source/LibJPEG/wrtarga.c +253 -0
- data/vendor/FreeImage/Source/LibJXR/common/include/guiddef.h +230 -0
- data/vendor/FreeImage/Source/LibJXR/common/include/wmsal.h +757 -0
- data/vendor/FreeImage/Source/LibJXR/common/include/wmspecstring.h +342 -0
- data/vendor/FreeImage/Source/LibJXR/common/include/wmspecstrings_adt.h +71 -0
- data/vendor/FreeImage/Source/LibJXR/common/include/wmspecstrings_strict.h +1096 -0
- data/vendor/FreeImage/Source/LibJXR/common/include/wmspecstrings_undef.h +406 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/JXRTranscode.c +987 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/decode.c +200 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/decode.h +143 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/postprocess.c +288 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/segdec.c +1205 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/strInvTransform.c +1888 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/strPredQuantDec.c +539 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/strdec.c +3628 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/strdec_x86.c +1640 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/encode.c +144 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/encode.h +113 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/segenc.c +1186 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/strFwdTransform.c +1111 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/strPredQuantEnc.c +511 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/strenc.c +2370 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/strenc_x86.c +409 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/adapthuff.c +511 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/ansi.h +61 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/common.h +131 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/image.c +183 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/perfTimer.h +115 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/perfTimerANSI.c +274 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/strPredQuant.c +306 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/strTransform.c +85 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/strTransform.h +50 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/strcodec.c +1251 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/strcodec.h +681 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/windowsmediaphoto.h +515 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/xplatform_image.h +84 -0
- data/vendor/FreeImage/Source/LibJXR/image/x86/x86.h +58 -0
- data/vendor/FreeImage/Source/LibJXR/jxrgluelib/JXRGlue.c +930 -0
- data/vendor/FreeImage/Source/LibJXR/jxrgluelib/JXRGlue.h +636 -0
- data/vendor/FreeImage/Source/LibJXR/jxrgluelib/JXRGlueJxr.c +2246 -0
- data/vendor/FreeImage/Source/LibJXR/jxrgluelib/JXRGluePFC.c +2338 -0
- data/vendor/FreeImage/Source/LibJXR/jxrgluelib/JXRMeta.c +905 -0
- data/vendor/FreeImage/Source/LibJXR/jxrgluelib/JXRMeta.h +258 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/bio.c +188 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/bio.h +128 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/cidx_manager.c +239 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/cidx_manager.h +68 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/cio.c +644 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/cio.h +393 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/dwt.c +919 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/dwt.h +116 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/event.c +141 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/event.h +97 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/function_list.c +114 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/function_list.h +126 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/image.c +235 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/image.h +63 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/indexbox_manager.h +148 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/invert.c +289 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/invert.h +59 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/j2k.c +10238 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/j2k.h +838 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/jp2.c +2776 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/jp2.h +490 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/mct.c +319 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/mct.h +149 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/mqc.c +604 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/mqc.h +201 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/openjpeg.c +955 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/openjpeg.h +1475 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_clock.c +59 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_clock.h +54 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_codec.h +160 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_config.h +9 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_config_private.h +16 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_includes.h +175 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_intmath.h +172 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_inttypes.h +43 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_malloc.h +180 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_stdint.h +47 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/phix_manager.c +191 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/pi.c +1870 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/pi.h +182 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/ppix_manager.c +194 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/raw.c +89 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/raw.h +100 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/t1.c +1751 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/t1.h +157 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/t1_generate_luts.c +276 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/t1_luts.h +143 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/t2.c +1334 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/t2.h +127 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/tcd.c +2123 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/tcd.h +348 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/tgt.c +331 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/tgt.h +140 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/thix_manager.c +134 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/tpix_manager.c +185 -0
- data/vendor/FreeImage/Source/LibPNG/example.c +1061 -0
- data/vendor/FreeImage/Source/LibPNG/png.c +4493 -0
- data/vendor/FreeImage/Source/LibPNG/png.h +3282 -0
- data/vendor/FreeImage/Source/LibPNG/pngconf.h +644 -0
- data/vendor/FreeImage/Source/LibPNG/pngdebug.h +154 -0
- data/vendor/FreeImage/Source/LibPNG/pngerror.c +963 -0
- data/vendor/FreeImage/Source/LibPNG/pngget.c +1213 -0
- data/vendor/FreeImage/Source/LibPNG/pnginfo.h +260 -0
- data/vendor/FreeImage/Source/LibPNG/pnglibconf.h +218 -0
- data/vendor/FreeImage/Source/LibPNG/pngmem.c +281 -0
- data/vendor/FreeImage/Source/LibPNG/pngpread.c +1168 -0
- data/vendor/FreeImage/Source/LibPNG/pngpriv.h +1944 -0
- data/vendor/FreeImage/Source/LibPNG/pngread.c +4121 -0
- data/vendor/FreeImage/Source/LibPNG/pngrio.c +120 -0
- data/vendor/FreeImage/Source/LibPNG/pngrtran.c +4994 -0
- data/vendor/FreeImage/Source/LibPNG/pngrutil.c +4474 -0
- data/vendor/FreeImage/Source/LibPNG/pngset.c +1611 -0
- data/vendor/FreeImage/Source/LibPNG/pngstruct.h +489 -0
- data/vendor/FreeImage/Source/LibPNG/pngtest.c +2011 -0
- data/vendor/FreeImage/Source/LibPNG/pngtrans.c +849 -0
- data/vendor/FreeImage/Source/LibPNG/pngwio.c +168 -0
- data/vendor/FreeImage/Source/LibPNG/pngwrite.c +2455 -0
- data/vendor/FreeImage/Source/LibPNG/pngwtran.c +574 -0
- data/vendor/FreeImage/Source/LibPNG/pngwutil.c +3029 -0
- data/vendor/FreeImage/Source/LibRawLite/dcraw/dcraw.c +15462 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/aahd_demosaic.cpp +706 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/dcb_demosaicing.c +710 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/dcraw_common.cpp +13593 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/dcraw_fileio.cpp +240 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/defines.h +167 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/demosaic_packs.cpp +99 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/dht_demosaic.cpp +873 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/libraw_internal_funcs.h +282 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/libraw_x3f.cpp +1919 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/var_defines.h +216 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/wf_filtering.cpp +1950 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw.h +338 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw_alloc.h +99 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw_const.h +233 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw_datastream.h +238 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw_internal.h +225 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw_types.h +442 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw_version.h +62 -0
- data/vendor/FreeImage/Source/LibRawLite/src/libraw_c_api.cpp +230 -0
- data/vendor/FreeImage/Source/LibRawLite/src/libraw_cxx.cpp +4533 -0
- data/vendor/FreeImage/Source/LibRawLite/src/libraw_datastream.cpp +703 -0
- data/vendor/FreeImage/Source/LibTIFF4/mkg3states.c +451 -0
- data/vendor/FreeImage/Source/LibTIFF4/mkspans.c +82 -0
- data/vendor/FreeImage/Source/LibTIFF4/t4.h +292 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_aux.c +358 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_close.c +140 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_codec.c +166 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_color.c +287 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_compress.c +304 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_config.h +97 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_config.vc.h +74 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_config.wince.h +71 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_dir.c +1700 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_dir.h +308 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_dirinfo.c +959 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_dirread.c +5640 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_dirwrite.c +2910 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_dumpmode.c +143 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_error.c +80 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_extension.c +118 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_fax3.c +1595 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_fax3.h +538 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_fax3sm.c +1260 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_flush.c +118 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_getimage.c +2890 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_jbig.c +213 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_jpeg.c +2354 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_jpeg_12.c +65 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_luv.c +1683 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_lzma.c +495 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_lzw.c +1169 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_next.c +181 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_ojpeg.c +2501 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_open.c +725 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_packbits.c +300 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_pixarlog.c +1442 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_predict.c +764 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_predict.h +77 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_print.c +716 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_read.c +1086 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_strip.c +383 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_swab.c +310 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_thunder.c +207 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_tile.c +299 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_unix.c +325 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_version.c +40 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_vms.c +603 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_warning.c +81 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_win32.c +443 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_wince.c +293 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_write.c +771 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_zip.c +472 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiff.h +681 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiffconf.h +170 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiffconf.vc.h +160 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiffconf.wince.h +121 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiffio.h +557 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiffiop.h +367 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiffvers.h +9 -0
- data/vendor/FreeImage/Source/LibTIFF4/uvcode.h +180 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/alphai.h +55 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.alpha.c +167 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.buffer.c +249 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.frame.c +827 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.idec.c +857 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.io.c +640 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.quant.c +110 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.tree.c +525 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.vp8.c +663 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.vp8l.c +1584 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.webp.c +834 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/decode_vp8.h +185 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/vp8i.h +353 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/vp8li.h +136 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/webpi.h +120 -0
- data/vendor/FreeImage/Source/LibWebP/src/demux/demux.demux.c +957 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.alpha_processing.c +377 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.alpha_processing_mips_dsp_r2.c +139 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.alpha_processing_sse2.c +296 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.argb.c +68 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.argb_mips_dsp_r2.c +108 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.argb_sse2.c +62 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.cost.c +412 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.cost_mips32.c +154 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.cost_mips_dsp_r2.c +107 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.cost_sse2.c +121 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.cpu.c +138 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.dec.c +760 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.dec_clip_tables.c +366 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.dec_mips32.c +585 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c +992 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.dec_neon.c +1489 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.dec_sse2.c +1284 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.enc.c +788 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.enc_avx2.c +24 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.enc_mips32.c +670 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.enc_mips_dsp_r2.c +1510 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.enc_neon.c +932 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.enc_sse2.c +940 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.filters.c +240 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c +404 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.filters_sse2.c +349 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.h +434 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.lossless.c +1838 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.lossless_mips32.c +416 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c +921 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.lossless_neon.c +357 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.lossless_sse2.c +535 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.rescaler.c +115 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.rescaler_mips32.c +192 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.rescaler_mips_dsp_r2.c +210 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.upsampling.c +252 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c +280 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.upsampling_neon.c +267 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.upsampling_sse2.c +214 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.yuv.c +166 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.yuv_mips32.c +100 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c +131 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.yuv_sse2.c +322 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/lossless.h +313 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/mips_macro.h +200 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/neon.h +82 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/yuv.h +321 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/yuv_tables_sse2.h +536 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/backward_references.h +202 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/cost.h +69 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.alpha.c +440 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.analysis.c +501 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.backward_references.c +1076 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.config.c +163 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.cost.c +355 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.filter.c +296 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.frame.c +850 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.histogram.c +897 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.iterator.c +456 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.near_lossless.c +160 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.picture.c +290 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.picture_csp.c +1100 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.picture_psnr.c +150 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.picture_rescale.c +285 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.picture_tools.c +206 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.quant.c +1191 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.syntax.c +383 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.token.c +285 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.tree.c +504 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.vp8l.c +1437 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.webpenc.c +379 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/histogram.h +114 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/vp8enci.h +551 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/vp8li.h +78 -0
- data/vendor/FreeImage/Source/LibWebP/src/mux/mux.anim_encode.c +1241 -0
- data/vendor/FreeImage/Source/LibWebP/src/mux/mux.muxedit.c +696 -0
- data/vendor/FreeImage/Source/LibWebP/src/mux/mux.muxinternal.c +551 -0
- data/vendor/FreeImage/Source/LibWebP/src/mux/mux.muxread.c +544 -0
- data/vendor/FreeImage/Source/LibWebP/src/mux/muxi.h +232 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/bit_reader.h +168 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/bit_reader_inl.h +172 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/bit_writer.h +120 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/color_cache.h +74 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/endian_inl.h +100 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/filters.h +32 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/huffman.h +67 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/huffman_encode.h +60 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/quant_levels.h +36 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/quant_levels_dec.h +35 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/random.h +63 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/rescaler.h +78 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/thread.h +93 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.bit_reader.c +208 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.bit_writer.c +308 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.color_cache.c +49 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.filters.c +76 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.h +121 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.huffman.c +205 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.huffman_encode.c +417 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.quant_levels.c +140 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.quant_levels_dec.c +279 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.random.c +43 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.rescaler.c +82 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.thread.c +309 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.utils.c +211 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/decode.h +493 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/demux.h +224 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/encode.h +515 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/format_constants.h +88 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/mux.h +507 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/mux_types.h +97 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/types.h +52 -0
- data/vendor/FreeImage/Source/MapIntrospector.h +212 -0
- data/vendor/FreeImage/Source/Metadata/Exif.cpp +1253 -0
- data/vendor/FreeImage/Source/Metadata/FIRational.cpp +176 -0
- data/vendor/FreeImage/Source/Metadata/FIRational.h +108 -0
- data/vendor/FreeImage/Source/Metadata/FreeImageTag.cpp +353 -0
- data/vendor/FreeImage/Source/Metadata/FreeImageTag.h +500 -0
- data/vendor/FreeImage/Source/Metadata/IPTC.cpp +342 -0
- data/vendor/FreeImage/Source/Metadata/TagConversion.cpp +1094 -0
- data/vendor/FreeImage/Source/Metadata/TagLib.cpp +1618 -0
- data/vendor/FreeImage/Source/Metadata/XTIFF.cpp +766 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/eLut.cpp +114 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/eLut.h +71 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/half.cpp +310 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/half.h +757 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/halfExport.h +27 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/halfFunction.h +179 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/halfLimits.h +102 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/toFloat.cpp +164 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/toFloat.h +16391 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/Iex.h +60 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexBaseExc.cpp +156 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexBaseExc.h +264 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexErrnoExc.h +208 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexExport.h +51 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexForward.h +229 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexMacros.h +170 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexMathExc.h +57 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexNamespace.h +112 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexThrowErrnoExc.cpp +873 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexThrowErrnoExc.h +97 -0
- data/vendor/FreeImage/Source/OpenEXR/IexMath/IexMathFloatExc.cpp +113 -0
- data/vendor/FreeImage/Source/OpenEXR/IexMath/IexMathFloatExc.h +146 -0
- data/vendor/FreeImage/Source/OpenEXR/IexMath/IexMathFpu.cpp +530 -0
- data/vendor/FreeImage/Source/OpenEXR/IexMath/IexMathFpu.h +91 -0
- data/vendor/FreeImage/Source/OpenEXR/IexMath/IexMathIeeeExc.h +62 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmBaseConfig.h +61 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfAcesFile.cpp +633 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfAcesFile.h +324 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfArray.h +285 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfAttribute.cpp +158 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfAttribute.h +407 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfAutoArray.h +95 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfB44Compressor.cpp +1072 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfB44Compressor.h +118 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfBoxAttribute.cpp +111 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfBoxAttribute.h +87 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp +1438 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCRgbaFile.h +555 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChannelList.cpp +322 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChannelList.h +436 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp +150 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChannelListAttribute.h +74 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCheckedArithmetic.h +163 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticities.cpp +151 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticities.h +131 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp +87 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.h +73 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp +591 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.h +142 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompression.h +84 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp +78 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompressionAttribute.h +64 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompressor.cpp +226 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompressor.h +265 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfConvert.cpp +143 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfConvert.h +107 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepCompositing.cpp +110 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepCompositing.h +132 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepFrameBuffer.cpp +230 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepFrameBuffer.h +339 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageState.h +96 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.cpp +78 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.h +68 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.cpp +2025 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.h +276 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.cpp +149 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.h +181 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.cpp +1552 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.h +244 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.cpp +107 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.h +168 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.cpp +1979 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.h +437 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.cpp +273 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.h +362 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.cpp +2055 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.h +475 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.cpp +250 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.h +394 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDoubleAttribute.cpp +57 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDoubleAttribute.h +59 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressor.cpp +3424 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressor.h +210 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressorSimd.h +2145 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmap.cpp +335 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmap.h +336 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp +76 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.h +68 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfExport.h +46 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFastHuf.cpp +768 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFastHuf.h +148 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFloatAttribute.cpp +57 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFloatAttribute.h +58 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.cpp +84 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.h +76 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfForward.h +127 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp +228 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFrameBuffer.h +386 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp +76 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFramesPerSecond.h +94 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfGenericInputFile.cpp +76 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfGenericInputFile.h +58 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfGenericOutputFile.cpp +112 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfGenericOutputFile.h +62 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfHeader.cpp +1283 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfHeader.h +699 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfHuf.cpp +1114 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfHuf.h +82 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfIO.cpp +110 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfIO.h +255 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputFile.cpp +895 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputFile.h +240 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputPart.cpp +114 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputPart.h +84 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputPartData.cpp +51 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputPartData.h +69 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputStreamMutex.h +68 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInt64.h +56 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfIntAttribute.cpp +57 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfIntAttribute.h +58 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCode.cpp +217 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCode.h +167 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp +99 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.h +73 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrder.h +69 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp +78 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.h +72 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfLut.cpp +178 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfLut.h +188 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp +263 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMatrixAttribute.h +83 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMisc.cpp +1872 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMisc.h +466 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartInputFile.cpp +783 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartInputFile.h +128 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.cpp +519 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.h +118 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMultiView.cpp +435 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMultiView.h +187 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfName.h +150 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfNamespace.h +115 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp +126 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.h +110 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOptimizedPixelReading.h +646 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputFile.cpp +1378 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputFile.h +263 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPart.cpp +105 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPart.h +77 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPartData.cpp +52 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPartData.h +62 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputStreamMutex.h +70 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPartHelper.h +262 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPartType.cpp +63 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPartType.h +62 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPixelType.h +67 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPizCompressor.cpp +667 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPizCompressor.h +117 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImage.cpp +104 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImage.h +135 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp +103 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.h +70 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp +553 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPxr24Compressor.h +109 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRational.cpp +127 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRational.h +98 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp +74 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRationalAttribute.h +69 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRgba.h +109 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaFile.cpp +1405 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaFile.h +346 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaYca.cpp +497 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaYca.h +259 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRle.cpp +157 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRle.h +63 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRleCompressor.cpp +220 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRleCompressor.h +80 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp +1702 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfScanLineInputFile.h +210 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfSimd.h +59 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp +125 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStandardAttributes.h +382 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStdIO.cpp +242 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStdIO.h +160 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStringAttribute.cpp +80 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStringAttribute.h +71 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp +100 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.h +74 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp +129 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfSystemSpecific.h +172 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTestFile.cpp +216 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTestFile.h +97 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfThreading.cpp +62 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfThreading.h +95 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescription.h +107 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp +86 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.h +72 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTileOffsets.cpp +552 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTileOffsets.h +125 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp +1533 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputFile.h +401 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputPart.cpp +208 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputPart.h +100 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledMisc.cpp +389 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledMisc.h +106 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp +1841 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputFile.h +495 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputPart.cpp +228 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputPart.h +105 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp +1163 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.h +482 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCode.cpp +431 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCode.h +242 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp +79 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.h +74 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfVecAttribute.cpp +217 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfVecAttribute.h +100 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfVersion.cpp +60 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfVersion.h +136 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfWav.cpp +391 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfWav.h +78 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfXdr.h +927 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfZip.cpp +196 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfZip.h +78 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfZipCompressor.cpp +127 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfZipCompressor.h +89 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/b44ExpLogTable.cpp +136 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/b44ExpLogTable.h +16396 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/dwaLookups.cpp +573 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/dwaLookups.h +98334 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThread.cpp +80 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThread.h +143 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadExport.h +46 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadForward.h +52 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutex.cpp +59 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutex.h +160 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutexPosix.cpp +85 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutexWin32.cpp +79 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadNamespace.h +114 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPool.cpp +483 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPool.h +160 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPosix.cpp +98 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp +60 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphore.h +112 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosix.cpp +106 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosixCompat.cpp +155 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphoreWin32.cpp +153 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadWin32.cpp +100 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathBox.cpp +37 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathBox.h +849 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathBoxAlgo.h +1016 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathColor.h +736 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathColorAlgo.cpp +178 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathColorAlgo.h +257 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathEuler.h +926 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathExc.h +73 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathExport.h +46 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathForward.h +72 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathFrame.h +192 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathFrustum.h +741 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathFrustumTest.h +417 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathFun.cpp +181 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathFun.h +269 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathGL.h +166 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathGLU.h +54 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathHalfLimits.h +68 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathInt64.h +62 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathInterval.h +226 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathLimits.h +268 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathLine.h +185 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathLineAlgo.h +288 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathMath.h +208 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathMatrix.h +3441 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathMatrixAlgo.cpp +1252 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathMatrixAlgo.h +1425 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathNamespace.h +115 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathPlane.h +257 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathPlatform.h +112 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathQuat.h +964 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathRandom.cpp +194 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathRandom.h +401 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathRoots.h +219 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathShear.cpp +54 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathShear.h +656 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathSphere.h +177 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathVec.cpp +583 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathVec.h +2227 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathVecAlgo.h +147 -0
- data/vendor/FreeImage/Source/OpenEXR/OpenEXRConfig.h +72 -0
- data/vendor/FreeImage/Source/Plugin.h +144 -0
- data/vendor/FreeImage/Source/Quantizers.h +354 -0
- data/vendor/FreeImage/Source/ToneMapping.h +44 -0
- data/vendor/FreeImage/Source/Utilities.h +516 -0
- data/vendor/FreeImage/Source/ZLib/adler32.c +179 -0
- data/vendor/FreeImage/Source/ZLib/compress.c +80 -0
- data/vendor/FreeImage/Source/ZLib/crc32.c +425 -0
- data/vendor/FreeImage/Source/ZLib/crc32.h +441 -0
- data/vendor/FreeImage/Source/ZLib/deflate.c +1967 -0
- data/vendor/FreeImage/Source/ZLib/deflate.h +346 -0
- data/vendor/FreeImage/Source/ZLib/gzclose.c +25 -0
- data/vendor/FreeImage/Source/ZLib/gzguts.h +209 -0
- data/vendor/FreeImage/Source/ZLib/gzlib.c +634 -0
- data/vendor/FreeImage/Source/ZLib/gzread.c +594 -0
- data/vendor/FreeImage/Source/ZLib/gzwrite.c +577 -0
- data/vendor/FreeImage/Source/ZLib/infback.c +640 -0
- data/vendor/FreeImage/Source/ZLib/inffast.c +340 -0
- data/vendor/FreeImage/Source/ZLib/inffast.h +11 -0
- data/vendor/FreeImage/Source/ZLib/inffixed.h +94 -0
- data/vendor/FreeImage/Source/ZLib/inflate.c +1512 -0
- data/vendor/FreeImage/Source/ZLib/inflate.h +122 -0
- data/vendor/FreeImage/Source/ZLib/inftrees.c +306 -0
- data/vendor/FreeImage/Source/ZLib/inftrees.h +62 -0
- data/vendor/FreeImage/Source/ZLib/trees.c +1226 -0
- data/vendor/FreeImage/Source/ZLib/trees.h +128 -0
- data/vendor/FreeImage/Source/ZLib/uncompr.c +59 -0
- data/vendor/FreeImage/Source/ZLib/zconf.h +511 -0
- data/vendor/FreeImage/Source/ZLib/zlib.h +1768 -0
- data/vendor/FreeImage/Source/ZLib/zutil.c +324 -0
- data/vendor/FreeImage/Source/ZLib/zutil.h +253 -0
- metadata +931 -0
@@ -0,0 +1,873 @@
|
|
1
|
+
/* -*- C++ -*-
|
2
|
+
* File: dht_demosaic.cpp
|
3
|
+
* Copyright 2013 Anton Petrusevich
|
4
|
+
* Created: Tue Apr 9, 2013
|
5
|
+
*
|
6
|
+
* This code is licensed under one of three licenses as you choose:
|
7
|
+
*
|
8
|
+
* 1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
|
9
|
+
* (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
|
10
|
+
*
|
11
|
+
* 2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
12
|
+
* (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
|
13
|
+
*
|
14
|
+
* 3. LibRaw Software License 27032010
|
15
|
+
* (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details).
|
16
|
+
*
|
17
|
+
*/
|
18
|
+
|
19
|
+
/*
|
20
|
+
* функция вычисляет яркостную дистанцию.
|
21
|
+
* если две яркости отличаются в два раза, например 10 и 20, то они имеют такой же вес
|
22
|
+
* при принятии решения об интерполировании, как и 100 и 200 -- фотографическая яркость между ними 1 стоп.
|
23
|
+
* дистанция всегда >=1
|
24
|
+
*/
|
25
|
+
static inline float calc_dist(float c1, float c2) {
|
26
|
+
return c1 > c2 ? c1 / c2 : c2 / c1;
|
27
|
+
}
|
28
|
+
|
29
|
+
struct DHT {
|
30
|
+
int nr_height, nr_width;
|
31
|
+
static const int nr_topmargin = 4, nr_leftmargin = 4;
|
32
|
+
float (*nraw)[3];
|
33
|
+
ushort channel_maximum[3];
|
34
|
+
float channel_minimum[3];
|
35
|
+
LibRaw &libraw;
|
36
|
+
enum {
|
37
|
+
HVSH = 1,
|
38
|
+
HOR = 2,
|
39
|
+
VER = 4,
|
40
|
+
HORSH = HOR | HVSH,
|
41
|
+
VERSH = VER | HVSH,
|
42
|
+
DIASH = 8,
|
43
|
+
LURD = 16,
|
44
|
+
RULD = 32,
|
45
|
+
LURDSH = LURD | DIASH,
|
46
|
+
RULDSH = RULD | DIASH,
|
47
|
+
HOT = 64
|
48
|
+
};
|
49
|
+
static inline float Thot(void) throw () {
|
50
|
+
return 64.0f;
|
51
|
+
}
|
52
|
+
static inline float Tg(void) throw () {
|
53
|
+
return 256.0f;
|
54
|
+
}
|
55
|
+
static inline float T(void) throw () {
|
56
|
+
return 1.4f;
|
57
|
+
}
|
58
|
+
char *ndir;
|
59
|
+
inline int nr_offset(int row, int col) throw () {
|
60
|
+
return (row * nr_width + col);
|
61
|
+
}
|
62
|
+
int get_hv_grb(int x, int y, int kc) {
|
63
|
+
float hv1 = 2 * nraw[nr_offset(y - 1, x)][1]
|
64
|
+
/ (nraw[nr_offset(y - 2, x)][kc] + nraw[nr_offset(y, x)][kc]);
|
65
|
+
float hv2 = 2 * nraw[nr_offset(y + 1, x)][1]
|
66
|
+
/ (nraw[nr_offset(y + 2, x)][kc] + nraw[nr_offset(y, x)][kc]);
|
67
|
+
float kv = calc_dist(hv1, hv2)
|
68
|
+
* calc_dist(nraw[nr_offset(y, x)][kc] * nraw[nr_offset(y, x)][kc],
|
69
|
+
(nraw[nr_offset(y - 2, x)][kc] * nraw[nr_offset(y + 2, x)][kc]));
|
70
|
+
kv *= kv;
|
71
|
+
kv *= kv;
|
72
|
+
kv *= kv;
|
73
|
+
float dv = kv
|
74
|
+
* calc_dist(nraw[nr_offset(y - 3, x)][1] * nraw[nr_offset(y + 3, x)][1],
|
75
|
+
nraw[nr_offset(y - 1, x)][1] * nraw[nr_offset(y + 1, x)][1]);
|
76
|
+
float hh1 = 2 * nraw[nr_offset(y, x - 1)][1]
|
77
|
+
/ (nraw[nr_offset(y, x - 2)][kc] + nraw[nr_offset(y, x)][kc]);
|
78
|
+
float hh2 = 2 * nraw[nr_offset(y, x + 1)][1]
|
79
|
+
/ (nraw[nr_offset(y, x + 2)][kc] + nraw[nr_offset(y, x)][kc]);
|
80
|
+
float kh = calc_dist(hh1, hh2)
|
81
|
+
* calc_dist(nraw[nr_offset(y, x)][kc] * nraw[nr_offset(y, x)][kc],
|
82
|
+
(nraw[nr_offset(y, x - 2)][kc] * nraw[nr_offset(y, x + 2)][kc]));
|
83
|
+
kh *= kh;
|
84
|
+
kh *= kh;
|
85
|
+
kh *= kh;
|
86
|
+
float dh = kh
|
87
|
+
* calc_dist(nraw[nr_offset(y, x - 3)][1] * nraw[nr_offset(y, x + 3)][1],
|
88
|
+
nraw[nr_offset(y, x - 1)][1] * nraw[nr_offset(y, x + 1)][1]);
|
89
|
+
float e = calc_dist(dh, dv);
|
90
|
+
char d = dh < dv ? (e > Tg() ? HORSH : HOR) : (e > Tg() ? VERSH : VER);
|
91
|
+
return d;
|
92
|
+
}
|
93
|
+
int get_hv_rbg(int x, int y, int hc) {
|
94
|
+
float hv1 = 2 * nraw[nr_offset(y - 1, x)][hc ^ 2]
|
95
|
+
/ (nraw[nr_offset(y - 2, x)][1] + nraw[nr_offset(y, x)][1]);
|
96
|
+
float hv2 = 2 * nraw[nr_offset(y + 1, x)][hc ^ 2]
|
97
|
+
/ (nraw[nr_offset(y + 2, x)][1] + nraw[nr_offset(y, x)][1]);
|
98
|
+
float kv = calc_dist(hv1, hv2)
|
99
|
+
* calc_dist(nraw[nr_offset(y, x)][1] * nraw[nr_offset(y, x)][1],
|
100
|
+
(nraw[nr_offset(y - 2, x)][1] * nraw[nr_offset(y + 2, x)][1]));
|
101
|
+
kv *= kv;
|
102
|
+
kv *= kv;
|
103
|
+
kv *= kv;
|
104
|
+
float dv = kv
|
105
|
+
* calc_dist(nraw[nr_offset(y - 3, x)][hc ^ 2] * nraw[nr_offset(y + 3, x)][hc ^ 2],
|
106
|
+
nraw[nr_offset(y - 1, x)][hc ^ 2] * nraw[nr_offset(y + 1, x)][hc ^ 2]);
|
107
|
+
float hh1 = 2 * nraw[nr_offset(y, x - 1)][hc]
|
108
|
+
/ (nraw[nr_offset(y, x - 2)][1] + nraw[nr_offset(y, x)][1]);
|
109
|
+
float hh2 = 2 * nraw[nr_offset(y, x + 1)][hc]
|
110
|
+
/ (nraw[nr_offset(y, x + 2)][1] + nraw[nr_offset(y, x)][1]);
|
111
|
+
float kh = calc_dist(hh1, hh2)
|
112
|
+
* calc_dist(nraw[nr_offset(y, x)][1] * nraw[nr_offset(y, x)][1],
|
113
|
+
(nraw[nr_offset(y, x - 2)][1] * nraw[nr_offset(y, x + 2)][1]));
|
114
|
+
kh *= kh;
|
115
|
+
kh *= kh;
|
116
|
+
kh *= kh;
|
117
|
+
float dh = kh
|
118
|
+
* calc_dist(nraw[nr_offset(y, x - 3)][hc] * nraw[nr_offset(y, x + 3)][hc],
|
119
|
+
nraw[nr_offset(y, x - 1)][hc] * nraw[nr_offset(y, x + 1)][hc]);
|
120
|
+
float e = calc_dist(dh, dv);
|
121
|
+
char d = dh < dv ? (e > Tg() ? HORSH : HOR) : (e > Tg() ? VERSH : VER);
|
122
|
+
return d;
|
123
|
+
}
|
124
|
+
int get_diag_grb(int x, int y, int kc) {
|
125
|
+
float hlu = nraw[nr_offset(y - 1, x - 1)][1] / nraw[nr_offset(y - 1, x - 1)][kc];
|
126
|
+
float hrd = nraw[nr_offset(y + 1, x + 1)][1] / nraw[nr_offset(y + 1, x + 1)][kc];
|
127
|
+
float hru = nraw[nr_offset(y - 1, x + 1)][1] / nraw[nr_offset(y - 1, x + 1)][kc];
|
128
|
+
float hld = nraw[nr_offset(y + 1, x - 1)][1] / nraw[nr_offset(y + 1, x - 1)][kc];
|
129
|
+
float dlurd = calc_dist(hlu, hrd)
|
130
|
+
* calc_dist(nraw[nr_offset(y - 1, x - 1)][1] * nraw[nr_offset(y + 1, x + 1)][1],
|
131
|
+
nraw[nr_offset(y, x)][1] * nraw[nr_offset(y, x)][1]);
|
132
|
+
float druld = calc_dist(hlu, hrd)
|
133
|
+
* calc_dist(nraw[nr_offset(y - 1, x + 1)][1] * nraw[nr_offset(y + 1, x - 1)][1],
|
134
|
+
nraw[nr_offset(y, x)][1] * nraw[nr_offset(y, x)][1]);
|
135
|
+
float e = calc_dist(dlurd, druld);
|
136
|
+
char d = druld < dlurd ? (e > T() ? RULDSH : RULD) : (e > T() ? LURDSH : LURD);
|
137
|
+
return d;
|
138
|
+
}
|
139
|
+
int get_diag_rbg(int x, int y, int hc) {
|
140
|
+
float dlurd = calc_dist(nraw[nr_offset(y - 1, x - 1)][1] * nraw[nr_offset(y + 1, x + 1)][1],
|
141
|
+
nraw[nr_offset(y, x)][1] * nraw[nr_offset(y, x)][1]);
|
142
|
+
float druld = calc_dist(nraw[nr_offset(y - 1, x + 1)][1] * nraw[nr_offset(y + 1, x - 1)][1],
|
143
|
+
nraw[nr_offset(y, x)][1] * nraw[nr_offset(y, x)][1]);
|
144
|
+
float e = calc_dist(dlurd, druld);
|
145
|
+
char d = druld < dlurd ? (e > T() ? RULDSH : RULD) : (e > T() ? LURDSH : LURD);
|
146
|
+
return d;
|
147
|
+
}
|
148
|
+
static inline float scale_over(float ec, float base) {
|
149
|
+
float s = base * .4;
|
150
|
+
float o = ec - base;
|
151
|
+
return base + sqrt(s * (o + s)) - s;
|
152
|
+
}
|
153
|
+
static inline float scale_under(float ec, float base) {
|
154
|
+
float s = base * .6;
|
155
|
+
float o = base - ec;
|
156
|
+
return base - sqrt(s * (o + s)) + s;
|
157
|
+
}
|
158
|
+
~DHT();
|
159
|
+
DHT(LibRaw &_libraw);
|
160
|
+
void copy_to_image();
|
161
|
+
void make_greens();
|
162
|
+
void make_diag_dirs();
|
163
|
+
void make_hv_dirs();
|
164
|
+
void refine_hv_dirs(int i, int js);
|
165
|
+
void refine_diag_dirs(int i, int js);
|
166
|
+
void refine_ihv_dirs(int i);
|
167
|
+
void refine_idiag_dirs(int i);
|
168
|
+
void illustrate_dirs();
|
169
|
+
void illustrate_dline(int i);
|
170
|
+
void make_hv_dline(int i);
|
171
|
+
void make_diag_dline(int i);
|
172
|
+
void make_gline(int i);
|
173
|
+
void make_rbdiag(int i);
|
174
|
+
void make_rbhv(int i);
|
175
|
+
void make_rb();
|
176
|
+
void hide_hots();
|
177
|
+
void restore_hots();
|
178
|
+
};
|
179
|
+
|
180
|
+
typedef float float3[3];
|
181
|
+
|
182
|
+
/*
|
183
|
+
* информация о цветах копируется во float в общем то с одной целью -- чтобы вместо 0 можно было писать 0.5,
|
184
|
+
* что больше подходит для вычисления яркостной разницы.
|
185
|
+
* причина: в целых числах разница в 1 стоп составляет ряд 8,4,2,1,0 -- последнее число должно быть 0.5,
|
186
|
+
* которое непредствамио в целых числах.
|
187
|
+
* так же это изменение позволяет не думать о специальных случаях деления на ноль.
|
188
|
+
*
|
189
|
+
* альтернативное решение: умножить все данные на 2 и в младший бит внести 1. правда,
|
190
|
+
* всё равно придётся следить, чтобы при интерпретации зелёного цвета не получился 0 при округлении,
|
191
|
+
* иначе проблема при интерпретации синих и красных.
|
192
|
+
*
|
193
|
+
*/
|
194
|
+
DHT::DHT(LibRaw& _libraw) :
|
195
|
+
libraw(_libraw) {
|
196
|
+
nr_height = libraw.imgdata.sizes.iheight + nr_topmargin * 2;
|
197
|
+
nr_width = libraw.imgdata.sizes.iwidth + nr_leftmargin * 2;
|
198
|
+
nraw = (float3*) malloc(nr_height * nr_width * sizeof(float3));
|
199
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
200
|
+
ndir = (char*) calloc(nr_height * nr_width, 1);
|
201
|
+
channel_maximum[0] = channel_maximum[1] = channel_maximum[2] = 0;
|
202
|
+
channel_minimum[0] = libraw.imgdata.image[0][0];
|
203
|
+
channel_minimum[1] = libraw.imgdata.image[0][1];
|
204
|
+
channel_minimum[2] = libraw.imgdata.image[0][2];
|
205
|
+
for (int i = 0; i < nr_height * nr_width; ++i)
|
206
|
+
nraw[i][0] = nraw[i][1] = nraw[i][2] = 0.5;
|
207
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
208
|
+
int col_cache[48];
|
209
|
+
for (int j = 0; j < 48; ++j) {
|
210
|
+
int l = libraw.COLOR(i, j);
|
211
|
+
if (l == 3)
|
212
|
+
l = 1;
|
213
|
+
col_cache[j] = l;
|
214
|
+
}
|
215
|
+
for (int j = 0; j < iwidth; ++j) {
|
216
|
+
int l = col_cache[j % 48];
|
217
|
+
unsigned short c = libraw.imgdata.image[i * iwidth + j][l];
|
218
|
+
if (c != 0) {
|
219
|
+
if (channel_maximum[l] < c)
|
220
|
+
channel_maximum[l] = c;
|
221
|
+
if (channel_minimum[l] > c)
|
222
|
+
channel_minimum[l] = c;
|
223
|
+
nraw[nr_offset(i + nr_topmargin, j + nr_leftmargin)][l] = (float) c;
|
224
|
+
}
|
225
|
+
}
|
226
|
+
}
|
227
|
+
channel_minimum[0] += .5;
|
228
|
+
channel_minimum[1] += .5;
|
229
|
+
channel_minimum[2] += .5;
|
230
|
+
}
|
231
|
+
|
232
|
+
void DHT::hide_hots() {
|
233
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
234
|
+
#if defined(LIBRAW_USE_OPENMP)
|
235
|
+
#pragma omp parallel for schedule(guided) firstprivate(iwidth)
|
236
|
+
#endif
|
237
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
238
|
+
int js = libraw.COLOR(i, 0) & 1;
|
239
|
+
int kc = libraw.COLOR(i, js);
|
240
|
+
/*
|
241
|
+
* js -- начальная х-координата, которая попадает мимо известного зелёного
|
242
|
+
* kc -- известный цвет в точке интерполирования
|
243
|
+
*/
|
244
|
+
for (int j = js; j < iwidth; j += 2) {
|
245
|
+
int x = j + nr_leftmargin;
|
246
|
+
int y = i + nr_topmargin;
|
247
|
+
float c = nraw[nr_offset(y, x)][kc];
|
248
|
+
if ((c > nraw[nr_offset(y, x + 2)][kc] && c > nraw[nr_offset(y, x - 2)][kc]
|
249
|
+
&& c > nraw[nr_offset(y - 2, x)][kc] && c > nraw[nr_offset(y + 2, x)][kc]
|
250
|
+
&& c > nraw[nr_offset(y, x + 1)][1] && c > nraw[nr_offset(y, x - 1)][1]
|
251
|
+
&& c > nraw[nr_offset(y - 1, x)][1] && c > nraw[nr_offset(y + 1, x)][1])
|
252
|
+
|| (c < nraw[nr_offset(y, x + 2)][kc] && c < nraw[nr_offset(y, x - 2)][kc]
|
253
|
+
&& c < nraw[nr_offset(y - 2, x)][kc]
|
254
|
+
&& c < nraw[nr_offset(y + 2, x)][kc] && c < nraw[nr_offset(y, x + 1)][1]
|
255
|
+
&& c < nraw[nr_offset(y, x - 1)][1] && c < nraw[nr_offset(y - 1, x)][1]
|
256
|
+
&& c < nraw[nr_offset(y + 1, x)][1])) {
|
257
|
+
float avg = 0;
|
258
|
+
for (int k = -2; k < 3; k += 2)
|
259
|
+
for (int m = -2; m < 3; m += 2)
|
260
|
+
if (m == 0 && k == 0)
|
261
|
+
continue;
|
262
|
+
else
|
263
|
+
avg += nraw[nr_offset(y + k, x + m)][kc];
|
264
|
+
avg /= 8;
|
265
|
+
// float dev = 0;
|
266
|
+
// for (int k = -2; k < 3; k += 2)
|
267
|
+
// for (int l = -2; l < 3; l += 2)
|
268
|
+
// if (k == 0 && l == 0)
|
269
|
+
// continue;
|
270
|
+
// else {
|
271
|
+
// float t = nraw[nr_offset(y + k, x + l)][kc] - avg;
|
272
|
+
// dev += t * t;
|
273
|
+
// }
|
274
|
+
// dev /= 8;
|
275
|
+
// dev = sqrt(dev);
|
276
|
+
if (calc_dist(c, avg) > Thot()) {
|
277
|
+
ndir[nr_offset(y, x)] |= HOT;
|
278
|
+
float dv = calc_dist(
|
279
|
+
nraw[nr_offset(y - 2, x)][kc] * nraw[nr_offset(y - 1, x)][1],
|
280
|
+
nraw[nr_offset(y + 2, x)][kc] * nraw[nr_offset(y + 1, x)][1]);
|
281
|
+
float dh = calc_dist(
|
282
|
+
nraw[nr_offset(y, x - 2)][kc] * nraw[nr_offset(y, x - 1)][1],
|
283
|
+
nraw[nr_offset(y, x + 2)][kc] * nraw[nr_offset(y, x + 1)][1]);
|
284
|
+
if (dv > dh)
|
285
|
+
nraw[nr_offset(y, x)][kc] = (nraw[nr_offset(y, x + 2)][kc]
|
286
|
+
+ nraw[nr_offset(y, x - 2)][kc]) / 2;
|
287
|
+
else
|
288
|
+
nraw[nr_offset(y, x)][kc] = (nraw[nr_offset(y - 2, x)][kc]
|
289
|
+
+ nraw[nr_offset(y + 2, x)][kc]) / 2;
|
290
|
+
}
|
291
|
+
}
|
292
|
+
}
|
293
|
+
for (int j = js ^ 1; j < iwidth; j += 2) {
|
294
|
+
int x = j + nr_leftmargin;
|
295
|
+
int y = i + nr_topmargin;
|
296
|
+
float c = nraw[nr_offset(y, x)][1];
|
297
|
+
if ((c > nraw[nr_offset(y, x + 2)][1] && c > nraw[nr_offset(y, x - 2)][1]
|
298
|
+
&& c > nraw[nr_offset(y - 2, x)][1] && c > nraw[nr_offset(y + 2, x)][1]
|
299
|
+
&& c > nraw[nr_offset(y, x + 1)][kc] && c > nraw[nr_offset(y, x - 1)][kc]
|
300
|
+
&& c > nraw[nr_offset(y - 1, x)][kc ^ 2]
|
301
|
+
&& c > nraw[nr_offset(y + 1, x)][kc ^ 2])
|
302
|
+
|| (c < nraw[nr_offset(y, x + 2)][1] && c < nraw[nr_offset(y, x - 2)][1]
|
303
|
+
&& c < nraw[nr_offset(y - 2, x)][1] && c < nraw[nr_offset(y + 2, x)][1]
|
304
|
+
&& c < nraw[nr_offset(y, x + 1)][kc]
|
305
|
+
&& c < nraw[nr_offset(y, x - 1)][kc]
|
306
|
+
&& c < nraw[nr_offset(y - 1, x)][kc ^ 2]
|
307
|
+
&& c < nraw[nr_offset(y + 1, x)][kc ^ 2])) {
|
308
|
+
float avg = 0;
|
309
|
+
for (int k = -2; k < 3; k += 2)
|
310
|
+
for (int m = -2; m < 3; m += 2)
|
311
|
+
if (k == 0 && m == 0)
|
312
|
+
continue;
|
313
|
+
else
|
314
|
+
avg += nraw[nr_offset(y + k, x + m)][1];
|
315
|
+
avg /= 8;
|
316
|
+
// float dev = 0;
|
317
|
+
// for (int k = -2; k < 3; k += 2)
|
318
|
+
// for (int l = -2; l < 3; l += 2)
|
319
|
+
// if (k == 0 && l == 0)
|
320
|
+
// continue;
|
321
|
+
// else {
|
322
|
+
// float t = nraw[nr_offset(y + k, x + l)][1] - avg;
|
323
|
+
// dev += t * t;
|
324
|
+
// }
|
325
|
+
// dev /= 8;
|
326
|
+
// dev = sqrt(dev);
|
327
|
+
if (calc_dist(c, avg) > Thot()) {
|
328
|
+
ndir[nr_offset(y, x)] |= HOT;
|
329
|
+
float dv = calc_dist(
|
330
|
+
nraw[nr_offset(y - 2, x)][1] * nraw[nr_offset(y - 1, x)][kc ^ 2],
|
331
|
+
nraw[nr_offset(y + 2, x)][1] * nraw[nr_offset(y + 1, x)][kc ^ 2]);
|
332
|
+
float dh = calc_dist(
|
333
|
+
nraw[nr_offset(y, x - 2)][1] * nraw[nr_offset(y, x - 1)][kc],
|
334
|
+
nraw[nr_offset(y, x + 2)][1] * nraw[nr_offset(y, x + 1)][kc]);
|
335
|
+
if (dv > dh)
|
336
|
+
nraw[nr_offset(y, x)][1] = (nraw[nr_offset(y, x + 2)][1]
|
337
|
+
+ nraw[nr_offset(y, x - 2)][1]) / 2;
|
338
|
+
else
|
339
|
+
nraw[nr_offset(y, x)][1] = (nraw[nr_offset(y - 2, x)][1]
|
340
|
+
+ nraw[nr_offset(y + 2, x)][1]) / 2;
|
341
|
+
}
|
342
|
+
}
|
343
|
+
}
|
344
|
+
}
|
345
|
+
}
|
346
|
+
|
347
|
+
void DHT::restore_hots() {
|
348
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
349
|
+
#if defined(LIBRAW_USE_OPENMP)
|
350
|
+
#ifdef WIN32
|
351
|
+
#pragma omp parallel for firstprivate(iwidth)
|
352
|
+
#else
|
353
|
+
#pragma omp parallel for schedule(guided) firstprivate(iwidth) collapse(2)
|
354
|
+
#endif
|
355
|
+
#endif
|
356
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
357
|
+
for (int j = 0; j < iwidth; ++j) {
|
358
|
+
int x = j + nr_leftmargin;
|
359
|
+
int y = i + nr_topmargin;
|
360
|
+
if (ndir[nr_offset(y, x)] & HOT) {
|
361
|
+
int l = libraw.COLOR(i, j);
|
362
|
+
nraw[nr_offset(i + nr_topmargin, j + nr_leftmargin)][l] = libraw.imgdata.image[i
|
363
|
+
* iwidth + j][l];
|
364
|
+
}
|
365
|
+
}
|
366
|
+
}
|
367
|
+
}
|
368
|
+
|
369
|
+
void DHT::make_diag_dirs() {
|
370
|
+
#if defined(LIBRAW_USE_OPENMP)
|
371
|
+
#pragma omp parallel for schedule(guided)
|
372
|
+
#endif
|
373
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
374
|
+
make_diag_dline(i);
|
375
|
+
}
|
376
|
+
//#if defined(LIBRAW_USE_OPENMP)
|
377
|
+
//#pragma omp parallel for schedule(guided)
|
378
|
+
//#endif
|
379
|
+
// for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
380
|
+
// refine_diag_dirs(i, i & 1);
|
381
|
+
// }
|
382
|
+
//#if defined(LIBRAW_USE_OPENMP)
|
383
|
+
//#pragma omp parallel for schedule(guided)
|
384
|
+
//#endif
|
385
|
+
// for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
386
|
+
// refine_diag_dirs(i, (i & 1) ^ 1);
|
387
|
+
// }
|
388
|
+
#if defined(LIBRAW_USE_OPENMP)
|
389
|
+
#pragma omp parallel for schedule(guided)
|
390
|
+
#endif
|
391
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
392
|
+
refine_idiag_dirs(i);
|
393
|
+
}
|
394
|
+
}
|
395
|
+
|
396
|
+
void DHT::make_hv_dirs() {
|
397
|
+
#if defined(LIBRAW_USE_OPENMP)
|
398
|
+
#pragma omp parallel for schedule(guided)
|
399
|
+
#endif
|
400
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
401
|
+
make_hv_dline(i);
|
402
|
+
}
|
403
|
+
#if defined(LIBRAW_USE_OPENMP)
|
404
|
+
#pragma omp parallel for schedule(guided)
|
405
|
+
#endif
|
406
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
407
|
+
refine_hv_dirs(i, i & 1);
|
408
|
+
}
|
409
|
+
#if defined(LIBRAW_USE_OPENMP)
|
410
|
+
#pragma omp parallel for schedule(guided)
|
411
|
+
#endif
|
412
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
413
|
+
refine_hv_dirs(i, (i & 1) ^ 1);
|
414
|
+
}
|
415
|
+
#if defined(LIBRAW_USE_OPENMP)
|
416
|
+
#pragma omp parallel for schedule(guided)
|
417
|
+
#endif
|
418
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
419
|
+
refine_ihv_dirs(i);
|
420
|
+
}
|
421
|
+
}
|
422
|
+
|
423
|
+
void DHT::refine_hv_dirs(int i, int js) {
|
424
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
425
|
+
for (int j = js; j < iwidth; j += 2) {
|
426
|
+
int x = j + nr_leftmargin;
|
427
|
+
int y = i + nr_topmargin;
|
428
|
+
if (ndir[nr_offset(y, x)] & HVSH)
|
429
|
+
continue;
|
430
|
+
int nv = (ndir[nr_offset(y - 1, x)] & VER) + (ndir[nr_offset(y + 1, x)] & VER)
|
431
|
+
+ (ndir[nr_offset(y, x - 1)] & VER) + (ndir[nr_offset(y, x + 1)] & VER);
|
432
|
+
int nh = (ndir[nr_offset(y - 1, x)] & HOR) + (ndir[nr_offset(y + 1, x)] & HOR)
|
433
|
+
+ (ndir[nr_offset(y, x - 1)] & HOR) + (ndir[nr_offset(y, x + 1)] & HOR);
|
434
|
+
bool codir =
|
435
|
+
(ndir[nr_offset(y, x)] & VER) ?
|
436
|
+
((ndir[nr_offset(y - 1, x)] & VER) || (ndir[nr_offset(y + 1, x)] & VER)) :
|
437
|
+
((ndir[nr_offset(y, x - 1)] & HOR) || (ndir[nr_offset(y, x + 1)] & HOR));
|
438
|
+
nv /= VER;
|
439
|
+
nh /= HOR;
|
440
|
+
if ((ndir[nr_offset(y, x)] & VER) && (nh > 2 && !codir)) {
|
441
|
+
ndir[nr_offset(y, x)] &= ~VER;
|
442
|
+
ndir[nr_offset(y, x)] |= HOR;
|
443
|
+
}
|
444
|
+
if ((ndir[nr_offset(y, x)] & HOR) && (nv > 2 && !codir)) {
|
445
|
+
ndir[nr_offset(y, x)] &= ~HOR;
|
446
|
+
ndir[nr_offset(y, x)] |= VER;
|
447
|
+
}
|
448
|
+
}
|
449
|
+
}
|
450
|
+
|
451
|
+
void DHT::refine_ihv_dirs(int i) {
|
452
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
453
|
+
for (int j = 0; j < iwidth; j++) {
|
454
|
+
int x = j + nr_leftmargin;
|
455
|
+
int y = i + nr_topmargin;
|
456
|
+
if (ndir[nr_offset(y, x)] & HVSH)
|
457
|
+
continue;
|
458
|
+
int nv = (ndir[nr_offset(y - 1, x)] & VER) + (ndir[nr_offset(y + 1, x)] & VER)
|
459
|
+
+ (ndir[nr_offset(y, x - 1)] & VER) + (ndir[nr_offset(y, x + 1)] & VER);
|
460
|
+
int nh = (ndir[nr_offset(y - 1, x)] & HOR) + (ndir[nr_offset(y + 1, x)] & HOR)
|
461
|
+
+ (ndir[nr_offset(y, x - 1)] & HOR) + (ndir[nr_offset(y, x + 1)] & HOR);
|
462
|
+
nv /= VER;
|
463
|
+
nh /= HOR;
|
464
|
+
if ((ndir[nr_offset(y, x)] & VER) && nh > 3) {
|
465
|
+
ndir[nr_offset(y, x)] &= ~VER;
|
466
|
+
ndir[nr_offset(y, x)] |= HOR;
|
467
|
+
}
|
468
|
+
if ((ndir[nr_offset(y, x)] & HOR) && nv > 3) {
|
469
|
+
ndir[nr_offset(y, x)] &= ~HOR;
|
470
|
+
ndir[nr_offset(y, x)] |= VER;
|
471
|
+
}
|
472
|
+
}
|
473
|
+
}
|
474
|
+
void DHT::make_hv_dline(int i) {
|
475
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
476
|
+
int js = libraw.COLOR(i, 0) & 1;
|
477
|
+
int kc = libraw.COLOR(i, js);
|
478
|
+
/*
|
479
|
+
* js -- начальная х-координата, которая попадает мимо известного зелёного
|
480
|
+
* kc -- известный цвет в точке интерполирования
|
481
|
+
*/
|
482
|
+
for (int j = 0; j < iwidth; j++) {
|
483
|
+
int x = j + nr_leftmargin;
|
484
|
+
int y = i + nr_topmargin;
|
485
|
+
char d = 0;
|
486
|
+
if ((j & 1) == js) {
|
487
|
+
d = get_hv_grb(x, y, kc);
|
488
|
+
} else {
|
489
|
+
d = get_hv_rbg(x, y, kc);
|
490
|
+
}
|
491
|
+
ndir[nr_offset(y, x)] |= d;
|
492
|
+
}
|
493
|
+
}
|
494
|
+
|
495
|
+
void DHT::make_diag_dline(int i) {
|
496
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
497
|
+
int js = libraw.COLOR(i, 0) & 1;
|
498
|
+
int kc = libraw.COLOR(i, js);
|
499
|
+
/*
|
500
|
+
* js -- начальная х-координата, которая попадает мимо известного зелёного
|
501
|
+
* kc -- известный цвет в точке интерполирования
|
502
|
+
*/
|
503
|
+
for (int j = 0; j < iwidth; j++) {
|
504
|
+
int x = j + nr_leftmargin;
|
505
|
+
int y = i + nr_topmargin;
|
506
|
+
char d = 0;
|
507
|
+
if ((j & 1) == js) {
|
508
|
+
d = get_diag_grb(x, y, kc);
|
509
|
+
} else {
|
510
|
+
d = get_diag_rbg(x, y, kc);
|
511
|
+
}
|
512
|
+
ndir[nr_offset(y, x)] |= d;
|
513
|
+
}
|
514
|
+
}
|
515
|
+
|
516
|
+
void DHT::refine_diag_dirs(int i, int js) {
|
517
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
518
|
+
for (int j = js; j < iwidth; j += 2) {
|
519
|
+
int x = j + nr_leftmargin;
|
520
|
+
int y = i + nr_topmargin;
|
521
|
+
if (ndir[nr_offset(y, x)] & DIASH)
|
522
|
+
continue;
|
523
|
+
int nv = (ndir[nr_offset(y - 1, x)] & LURD) + (ndir[nr_offset(y + 1, x)] & LURD)
|
524
|
+
+ (ndir[nr_offset(y, x - 1)] & LURD) + (ndir[nr_offset(y, x + 1)] & LURD)
|
525
|
+
+ (ndir[nr_offset(y - 1, x - 1)] & LURD) + (ndir[nr_offset(y - 1, x + 1)] & LURD)
|
526
|
+
+ (ndir[nr_offset(y + 1, x - 1)] & LURD) + (ndir[nr_offset(y + 1, x + 1)] & LURD);
|
527
|
+
int nh = (ndir[nr_offset(y - 1, x)] & RULD) + (ndir[nr_offset(y + 1, x)] & RULD)
|
528
|
+
+ (ndir[nr_offset(y, x - 1)] & RULD) + (ndir[nr_offset(y, x + 1)] & RULD)
|
529
|
+
+ (ndir[nr_offset(y - 1, x - 1)] & RULD) + (ndir[nr_offset(y - 1, x + 1)] & RULD)
|
530
|
+
+ (ndir[nr_offset(y + 1, x - 1)] & RULD) + (ndir[nr_offset(y + 1, x + 1)] & RULD);
|
531
|
+
bool codir =
|
532
|
+
(ndir[nr_offset(y, x)] & LURD) ?
|
533
|
+
((ndir[nr_offset(y - 1, x - 1)] & LURD)
|
534
|
+
|| (ndir[nr_offset(y + 1, x + 1)] & LURD)) :
|
535
|
+
((ndir[nr_offset(y - 1, x + 1)] & RULD)
|
536
|
+
|| (ndir[nr_offset(y + 1, x - 1)] & RULD));
|
537
|
+
nv /= LURD;
|
538
|
+
nh /= RULD;
|
539
|
+
if ((ndir[nr_offset(y, x)] & LURD) && (nh > 4 && !codir)) {
|
540
|
+
ndir[nr_offset(y, x)] &= ~LURD;
|
541
|
+
ndir[nr_offset(y, x)] |= RULD;
|
542
|
+
}
|
543
|
+
if ((ndir[nr_offset(y, x)] & RULD) && (nv > 4 && !codir)) {
|
544
|
+
ndir[nr_offset(y, x)] &= ~RULD;
|
545
|
+
ndir[nr_offset(y, x)] |= LURD;
|
546
|
+
}
|
547
|
+
}
|
548
|
+
}
|
549
|
+
|
550
|
+
void DHT::refine_idiag_dirs(int i) {
|
551
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
552
|
+
for (int j = 0; j < iwidth; j++) {
|
553
|
+
int x = j + nr_leftmargin;
|
554
|
+
int y = i + nr_topmargin;
|
555
|
+
if (ndir[nr_offset(y, x)] & DIASH)
|
556
|
+
continue;
|
557
|
+
int nv = (ndir[nr_offset(y - 1, x)] & LURD) + (ndir[nr_offset(y + 1, x)] & LURD)
|
558
|
+
+ (ndir[nr_offset(y, x - 1)] & LURD) + (ndir[nr_offset(y, x + 1)] & LURD)
|
559
|
+
+ (ndir[nr_offset(y - 1, x - 1)] & LURD) + (ndir[nr_offset(y - 1, x + 1)] & LURD)
|
560
|
+
+ (ndir[nr_offset(y + 1, x - 1)] & LURD) + (ndir[nr_offset(y + 1, x + 1)] & LURD);
|
561
|
+
int nh = (ndir[nr_offset(y - 1, x)] & RULD) + (ndir[nr_offset(y + 1, x)] & RULD)
|
562
|
+
+ (ndir[nr_offset(y, x - 1)] & RULD) + (ndir[nr_offset(y, x + 1)] & RULD)
|
563
|
+
+ (ndir[nr_offset(y - 1, x - 1)] & RULD) + (ndir[nr_offset(y - 1, x + 1)] & RULD)
|
564
|
+
+ (ndir[nr_offset(y + 1, x - 1)] & RULD) + (ndir[nr_offset(y + 1, x + 1)] & RULD);
|
565
|
+
bool codir =
|
566
|
+
(ndir[nr_offset(y, x)] & LURD) ?
|
567
|
+
((ndir[nr_offset(y - 1, x - 1)] & LURD)
|
568
|
+
|| (ndir[nr_offset(y + 1, x + 1)] & LURD)) :
|
569
|
+
((ndir[nr_offset(y - 1, x + 1)] & RULD)
|
570
|
+
|| (ndir[nr_offset(y + 1, x - 1)] & RULD));
|
571
|
+
nv /= LURD;
|
572
|
+
nh /= RULD;
|
573
|
+
if ((ndir[nr_offset(y, x)] & LURD) && nh > 7) {
|
574
|
+
ndir[nr_offset(y, x)] &= ~LURD;
|
575
|
+
ndir[nr_offset(y, x)] |= RULD;
|
576
|
+
}
|
577
|
+
if ((ndir[nr_offset(y, x)] & RULD) && nv > 7) {
|
578
|
+
ndir[nr_offset(y, x)] &= ~RULD;
|
579
|
+
ndir[nr_offset(y, x)] |= LURD;
|
580
|
+
}
|
581
|
+
}
|
582
|
+
}
|
583
|
+
|
584
|
+
/*
|
585
|
+
* вычисление недостающих зелёных точек.
|
586
|
+
*/
|
587
|
+
void DHT::make_greens() {
|
588
|
+
#if defined(LIBRAW_USE_OPENMP)
|
589
|
+
#pragma omp parallel for schedule(guided)
|
590
|
+
#endif
|
591
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
592
|
+
make_gline(i);
|
593
|
+
}
|
594
|
+
}
|
595
|
+
|
596
|
+
void DHT::make_gline(int i) {
|
597
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
598
|
+
int js = libraw.COLOR(i, 0) & 1;
|
599
|
+
int kc = libraw.COLOR(i, js);
|
600
|
+
/*
|
601
|
+
* js -- начальная х-координата, которая попадает мимо известного зелёного
|
602
|
+
* kc -- известный цвет в точке интерполирования
|
603
|
+
*/
|
604
|
+
for (int j = js; j < iwidth; j += 2) {
|
605
|
+
int x = j + nr_leftmargin;
|
606
|
+
int y = i + nr_topmargin;
|
607
|
+
int dx, dy, dx2, dy2;
|
608
|
+
float h1, h2;
|
609
|
+
if (ndir[nr_offset(y, x)] & VER) {
|
610
|
+
dx = dx2 = 0;
|
611
|
+
dy = -1;
|
612
|
+
dy2 = 1;
|
613
|
+
h1 = 2 * nraw[nr_offset(y - 1, x)][1]
|
614
|
+
/ (nraw[nr_offset(y - 2, x)][kc] + nraw[nr_offset(y, x)][kc]);
|
615
|
+
h2 = 2 * nraw[nr_offset(y + 1, x)][1]
|
616
|
+
/ (nraw[nr_offset(y + 2, x)][kc] + nraw[nr_offset(y, x)][kc]);
|
617
|
+
} else {
|
618
|
+
dy = dy2 = 0;
|
619
|
+
dx = 1;
|
620
|
+
dx2 = -1;
|
621
|
+
h1 = 2 * nraw[nr_offset(y, x + 1)][1]
|
622
|
+
/ (nraw[nr_offset(y, x + 2)][kc] + nraw[nr_offset(y, x)][kc]);
|
623
|
+
h2 = 2 * nraw[nr_offset(y, x - 1)][1]
|
624
|
+
/ (nraw[nr_offset(y, x - 2)][kc] + nraw[nr_offset(y, x)][kc]);
|
625
|
+
}
|
626
|
+
float b1 = 1
|
627
|
+
/ calc_dist(nraw[nr_offset(y, x)][kc], nraw[nr_offset(y + dy * 2, x + dx * 2)][kc]);
|
628
|
+
float b2 = 1
|
629
|
+
/ calc_dist(nraw[nr_offset(y, x)][kc],
|
630
|
+
nraw[nr_offset(y + dy2 * 2, x + dx2 * 2)][kc]);
|
631
|
+
b1 *= b1;
|
632
|
+
b2 *= b2;
|
633
|
+
float eg = nraw[nr_offset(y, x)][kc] * (b1 * h1 + b2 * h2) / (b1 + b2);
|
634
|
+
float min, max;
|
635
|
+
min = MIN(nraw[nr_offset(y + dy, x + dx)][1], nraw[nr_offset(y + dy2, x + dx2)][1]);
|
636
|
+
max = MAX(nraw[nr_offset(y + dy, x + dx)][1], nraw[nr_offset(y + dy2, x + dx2)][1]);
|
637
|
+
min /= 1.2;
|
638
|
+
max *= 1.2;
|
639
|
+
if (eg < min)
|
640
|
+
eg = scale_under(eg, min);
|
641
|
+
else if (eg > max)
|
642
|
+
eg = scale_over(eg, max);
|
643
|
+
if (eg > channel_maximum[1])
|
644
|
+
eg = channel_maximum[1];
|
645
|
+
else if (eg < channel_minimum[1])
|
646
|
+
eg = channel_minimum[1];
|
647
|
+
nraw[nr_offset(y, x)][1] = eg;
|
648
|
+
}
|
649
|
+
}
|
650
|
+
|
651
|
+
/*
|
652
|
+
* отладочная функция
|
653
|
+
*/
|
654
|
+
|
655
|
+
void DHT::illustrate_dirs() {
|
656
|
+
#if defined(LIBRAW_USE_OPENMP)
|
657
|
+
#pragma omp parallel for schedule(guided)
|
658
|
+
#endif
|
659
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
660
|
+
illustrate_dline(i);
|
661
|
+
}
|
662
|
+
}
|
663
|
+
|
664
|
+
void DHT::illustrate_dline(int i) {
|
665
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
666
|
+
for (int j = 0; j < iwidth; j++) {
|
667
|
+
int x = j + nr_leftmargin;
|
668
|
+
int y = i + nr_topmargin;
|
669
|
+
nraw[nr_offset(y, x)][0] = nraw[nr_offset(y, x)][1] = nraw[nr_offset(y, x)][2] = 0.5;
|
670
|
+
int l = ndir[nr_offset(y, x)] & 8;
|
671
|
+
// l >>= 3; // WTF?
|
672
|
+
l = 1;
|
673
|
+
if (ndir[nr_offset(y, x)] & HOT)
|
674
|
+
nraw[nr_offset(y, x)][0] = l * channel_maximum[0] / 4 + channel_maximum[0] / 4;
|
675
|
+
else
|
676
|
+
nraw[nr_offset(y, x)][2] = l * channel_maximum[2] / 4 + channel_maximum[2] / 4;
|
677
|
+
}
|
678
|
+
|
679
|
+
}
|
680
|
+
|
681
|
+
/*
|
682
|
+
* интерполяция красных и синих.
|
683
|
+
*
|
684
|
+
* сначала интерполируются недостающие цвета, по диагональным направлениям от которых находятся известные,
|
685
|
+
* затем ситуация сводится к тому как интерполировались зелёные.
|
686
|
+
*/
|
687
|
+
|
688
|
+
void DHT::make_rbdiag(int i) {
|
689
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
690
|
+
int js = libraw.COLOR(i, 0) & 1;
|
691
|
+
int uc = libraw.COLOR(i, js);
|
692
|
+
int cl = uc ^ 2;
|
693
|
+
/*
|
694
|
+
* js -- начальная х-координата, которая попадает на уже интерполированный зелёный
|
695
|
+
* al -- известный цвет (кроме зелёного) в точке интерполирования
|
696
|
+
* cl -- неизвестный цвет
|
697
|
+
*/
|
698
|
+
for (int j = js; j < iwidth; j += 2) {
|
699
|
+
int x = j + nr_leftmargin;
|
700
|
+
int y = i + nr_topmargin;
|
701
|
+
int dx, dy, dx2, dy2;
|
702
|
+
if (ndir[nr_offset(y, x)] & LURD) {
|
703
|
+
dx = -1;
|
704
|
+
dx2 = 1;
|
705
|
+
dy = -1;
|
706
|
+
dy2 = 1;
|
707
|
+
} else {
|
708
|
+
dx = -1;
|
709
|
+
dx2 = 1;
|
710
|
+
dy = 1;
|
711
|
+
dy2 = -1;
|
712
|
+
}
|
713
|
+
float g1 = 1 / calc_dist(nraw[nr_offset(y, x)][1], nraw[nr_offset(y + dy, x + dx)][1]);
|
714
|
+
float g2 = 1 / calc_dist(nraw[nr_offset(y, x)][1], nraw[nr_offset(y + dy2, x + dx2)][1]);
|
715
|
+
g1 *= g1 * g1;
|
716
|
+
g2 *= g2 * g2;
|
717
|
+
|
718
|
+
float eg;
|
719
|
+
eg = nraw[nr_offset(y, x)][1]
|
720
|
+
* (g1 * nraw[nr_offset(y + dy, x + dx)][cl] / nraw[nr_offset(y + dy, x + dx)][1]
|
721
|
+
+ g2 * nraw[nr_offset(y + dy2, x + dx2)][cl]
|
722
|
+
/ nraw[nr_offset(y + dy2, x + dx2)][1]) / (g1 + g2);
|
723
|
+
float min, max;
|
724
|
+
min = MIN(nraw[nr_offset(y + dy, x + dx)][cl], nraw[nr_offset(y + dy2, x + dx2)][cl]);
|
725
|
+
max = MAX(nraw[nr_offset(y + dy, x + dx)][cl], nraw[nr_offset(y + dy2, x + dx2)][cl]);
|
726
|
+
min /= 1.2;
|
727
|
+
max *= 1.2;
|
728
|
+
if (eg < min)
|
729
|
+
eg = scale_under(eg, min);
|
730
|
+
else if (eg > max)
|
731
|
+
eg = scale_over(eg, max);
|
732
|
+
if (eg > channel_maximum[cl])
|
733
|
+
eg = channel_maximum[cl];
|
734
|
+
else if (eg < channel_minimum[cl])
|
735
|
+
eg = channel_minimum[cl];
|
736
|
+
nraw[nr_offset(y, x)][cl] = eg;
|
737
|
+
}
|
738
|
+
|
739
|
+
}
|
740
|
+
|
741
|
+
/*
|
742
|
+
* интерполяция красных и синих в точках где был известен только зелёный,
|
743
|
+
* направления горизонтальные или вертикальные
|
744
|
+
*/
|
745
|
+
|
746
|
+
void DHT::make_rbhv(int i) {
|
747
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
748
|
+
int js = (libraw.COLOR(i, 0) & 1) ^ 1;
|
749
|
+
for (int j = js; j < iwidth; j += 2) {
|
750
|
+
int x = j + nr_leftmargin;
|
751
|
+
int y = i + nr_topmargin;
|
752
|
+
/*
|
753
|
+
* поскольку сверху-снизу и справа-слева уже есть все необходимые красные и синие,
|
754
|
+
* то можно выбрать наилучшее направление исходя из информации по обоим цветам.
|
755
|
+
*/
|
756
|
+
int dx, dy, dx2, dy2;
|
757
|
+
float h1, h2;
|
758
|
+
if (ndir[nr_offset(y, x)] & VER) {
|
759
|
+
dx = dx2 = 0;
|
760
|
+
dy = -1;
|
761
|
+
dy2 = 1;
|
762
|
+
} else {
|
763
|
+
dy = dy2 = 0;
|
764
|
+
dx = 1;
|
765
|
+
dx2 = -1;
|
766
|
+
}
|
767
|
+
float g1 = 1 / calc_dist(nraw[nr_offset(y, x)][1], nraw[nr_offset(y + dy, x + dx)][1]);
|
768
|
+
float g2 = 1 / calc_dist(nraw[nr_offset(y, x)][1], nraw[nr_offset(y + dy2, x + dx2)][1]);
|
769
|
+
g1 *= g1;
|
770
|
+
g2 *= g2;
|
771
|
+
float eg_r, eg_b;
|
772
|
+
eg_r = nraw[nr_offset(y, x)][1]
|
773
|
+
* (g1 * nraw[nr_offset(y + dy, x + dx)][0] / nraw[nr_offset(y + dy, x + dx)][1]
|
774
|
+
+ g2 * nraw[nr_offset(y + dy2, x + dx2)][0]
|
775
|
+
/ nraw[nr_offset(y + dy2, x + dx2)][1]) / (g1 + g2);
|
776
|
+
eg_b = nraw[nr_offset(y, x)][1]
|
777
|
+
* (g1 * nraw[nr_offset(y + dy, x + dx)][2] / nraw[nr_offset(y + dy, x + dx)][1]
|
778
|
+
+ g2 * nraw[nr_offset(y + dy2, x + dx2)][2]
|
779
|
+
/ nraw[nr_offset(y + dy2, x + dx2)][1]) / (g1 + g2);
|
780
|
+
float min_r, max_r;
|
781
|
+
min_r = MIN(nraw[nr_offset(y + dy, x + dx)][0], nraw[nr_offset(y + dy2, x + dx2)][0]);
|
782
|
+
max_r = MAX(nraw[nr_offset(y + dy, x + dx)][0], nraw[nr_offset(y + dy2, x + dx2)][0]);
|
783
|
+
float min_b, max_b;
|
784
|
+
min_b = MIN(nraw[nr_offset(y + dy, x + dx)][2], nraw[nr_offset(y + dy2, x + dx2)][2]);
|
785
|
+
max_b = MAX(nraw[nr_offset(y + dy, x + dx)][2], nraw[nr_offset(y + dy2, x + dx2)][2]);
|
786
|
+
min_r /= 1.2;
|
787
|
+
max_r *= 1.2;
|
788
|
+
min_b /= 1.2;
|
789
|
+
max_b *= 1.2;
|
790
|
+
|
791
|
+
if (eg_r < min_r)
|
792
|
+
eg_r = scale_under(eg_r, min_r);
|
793
|
+
else if (eg_r > max_r)
|
794
|
+
eg_r = scale_over(eg_r, max_r);
|
795
|
+
if (eg_b < min_b)
|
796
|
+
eg_b = scale_under(eg_b, min_b);
|
797
|
+
else if (eg_b > max_b)
|
798
|
+
eg_b = scale_over(eg_b, max_b);
|
799
|
+
|
800
|
+
if (eg_r > channel_maximum[0])
|
801
|
+
eg_r = channel_maximum[0];
|
802
|
+
else if (eg_r < channel_minimum[0])
|
803
|
+
eg_r = channel_minimum[0];
|
804
|
+
if (eg_b > channel_maximum[2])
|
805
|
+
eg_b = channel_maximum[2];
|
806
|
+
else if (eg_b < channel_minimum[2])
|
807
|
+
eg_b = channel_minimum[2];
|
808
|
+
nraw[nr_offset(y, x)][0] = eg_r;
|
809
|
+
nraw[nr_offset(y, x)][2] = eg_b;
|
810
|
+
}
|
811
|
+
}
|
812
|
+
|
813
|
+
void DHT::make_rb() {
|
814
|
+
#if defined(LIBRAW_USE_OPENMP)
|
815
|
+
#pragma omp barrier
|
816
|
+
#pragma omp parallel for schedule(guided)
|
817
|
+
#endif
|
818
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
819
|
+
make_rbdiag(i);
|
820
|
+
}
|
821
|
+
#if defined(LIBRAW_USE_OPENMP)
|
822
|
+
#pragma omp barrier
|
823
|
+
#pragma omp parallel for schedule(guided)
|
824
|
+
#endif
|
825
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
826
|
+
make_rbhv(i);
|
827
|
+
}
|
828
|
+
|
829
|
+
}
|
830
|
+
|
831
|
+
/*
|
832
|
+
* перенос изображения в выходной массив
|
833
|
+
*/
|
834
|
+
void DHT::copy_to_image() {
|
835
|
+
int iwidth = libraw.imgdata.sizes.iwidth;
|
836
|
+
#if defined(LIBRAW_USE_OPENMP)
|
837
|
+
#ifdef WIN32
|
838
|
+
#pragma omp parallel for
|
839
|
+
#else
|
840
|
+
#pragma omp parallel for schedule(guided) collapse(2)
|
841
|
+
#endif
|
842
|
+
#endif
|
843
|
+
for (int i = 0; i < libraw.imgdata.sizes.iheight; ++i) {
|
844
|
+
for (int j = 0; j < iwidth; ++j) {
|
845
|
+
libraw.imgdata.image[i * iwidth + j][0] = (unsigned short) (nraw[nr_offset(
|
846
|
+
i + nr_topmargin, j + nr_leftmargin)][0]);
|
847
|
+
libraw.imgdata.image[i * iwidth + j][2] = (unsigned short) (nraw[nr_offset(
|
848
|
+
i + nr_topmargin, j + nr_leftmargin)][2]);
|
849
|
+
libraw.imgdata.image[i * iwidth + j][1] = libraw.imgdata.image[i * iwidth + j][3] =
|
850
|
+
(unsigned short) (nraw[nr_offset(i + nr_topmargin, j + nr_leftmargin)][1]);
|
851
|
+
}
|
852
|
+
}
|
853
|
+
}
|
854
|
+
|
855
|
+
DHT::~DHT() {
|
856
|
+
free(nraw);
|
857
|
+
free(ndir);
|
858
|
+
}
|
859
|
+
|
860
|
+
void LibRaw::dht_interpolate() {
|
861
|
+
printf("DHT interpolating\n");
|
862
|
+
DHT dht(*this);
|
863
|
+
dht.hide_hots();
|
864
|
+
dht.make_hv_dirs();
|
865
|
+
// dht.illustrate_dirs();
|
866
|
+
dht.make_greens();
|
867
|
+
dht.make_diag_dirs();
|
868
|
+
// dht.illustrate_dirs();
|
869
|
+
dht.make_rb();
|
870
|
+
dht.restore_hots();
|
871
|
+
dht.copy_to_image();
|
872
|
+
|
873
|
+
}
|