epeg 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/MANIFEST +5 -0
- data/TODO +1 -0
- data/epeg/.dockerignore +4 -0
- data/epeg/.gitignore +5 -0
- data/epeg/CMakeLists.txt +30 -0
- data/epeg/Dockerfile +23 -0
- data/epeg/Epeg.h +90 -0
- data/epeg/README.md +42 -0
- data/epeg/epeg_main.c +1642 -0
- data/epeg/epeg_private.h +85 -0
- data/epeg/example/.gitignore +1 -0
- data/epeg/example/CMakeLists.txt +20 -0
- data/epeg/example/example.jpg +0 -0
- data/epeg/example/rotatetest.c +29 -0
- data/epeg/example/scaletest.c +48 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/BUILDING.md +828 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/CMakeLists.txt +1420 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/ChangeLog.md +1494 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/LICENSE.md +132 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/README.ijg +277 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/README.md +356 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cderror.h +137 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cdjpeg.c +145 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cdjpeg.h +157 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/change.log +315 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cjpeg.1 +354 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cjpeg.c +695 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cmakescripts/BuildPackages.cmake +182 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cmakescripts/GNUInstallDirs.cmake +416 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cmakescripts/cmake_uninstall.cmake.in +24 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cmakescripts/testclean.cmake +41 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cmyk.h +61 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/coderules.txt +78 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/djpeg.1 +296 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/djpeg.c +822 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/annotated.html +104 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/bc_s.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/bdwn.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/classes.html +106 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/closed.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/doxygen-extra.css +3 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/doxygen.css +1184 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/doxygen.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/dynsections.js +97 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2blank.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2cl.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2doc.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2folderclosed.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2folderopen.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2lastnode.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2link.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2mlastnode.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2mnode.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2mo.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2node.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2ns.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2plastnode.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2pnode.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2splitbar.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2vertline.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/functions.html +134 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/functions_vars.html +134 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/group___turbo_j_p_e_g.html +2775 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/index.html +90 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/jquery.js +8 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/modules.html +95 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/nav_f.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/nav_g.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/nav_h.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/open.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_63.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_63.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_64.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_64.js +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_68.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_68.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_6e.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_6e.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_6f.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_6f.js +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_72.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_72.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_74.js +102 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_77.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_77.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_78.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_78.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_79.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_79.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/classes_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/classes_74.js +6 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/close.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/enums_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/enums_74.js +8 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/enumvalues_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/enumvalues_74.js +37 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/functions_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/functions_74.js +31 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/groups_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/groups_74.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/mag_sel.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/nomatches.html +12 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/search.css +271 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/search.js +809 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/search_l.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/search_m.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/search_r.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/typedefs_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/typedefs_74.js +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_63.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_63.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_64.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_64.js +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_68.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_68.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_6e.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_6e.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_6f.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_6f.js +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_72.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_72.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_74.js +10 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_77.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_77.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_78.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_78.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_79.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_79.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/structtjregion.html +186 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/structtjscalingfactor.html +148 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/structtjtransform.html +212 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/sync_off.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/sync_on.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/tab_a.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/tab_b.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/tab_h.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/tab_s.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/tabs.css +60 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doxygen-extra.css +3 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doxygen.config +16 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/example.txt +464 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jaricom.c +157 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/CMakeLists.txt +88 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/MANIFEST.MF +2 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/README +52 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/TJBench.java +1021 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/TJExample.java +405 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/TJUnitTest.java +960 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/allclasses-frame.html +24 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/allclasses-noframe.html +24 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/constant-values.html +532 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/deprecated-list.html +252 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/help-doc.html +210 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/index-all.html +1029 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/index.html +71 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJ.html +1356 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html +926 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html +241 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html +1255 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJException.html +340 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJScalingFactor.html +343 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJTransform.html +751 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html +421 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/YUVImage.html +765 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/package-frame.html +31 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/package-summary.html +202 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/package-tree.html +160 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/overview-tree.html +164 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/package-list +1 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/resources/background.gif +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/resources/tab.gif +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/resources/titlebar.gif +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/resources/titlebar_end.gif +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/script.js +30 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/serialized-form.html +176 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/stylesheet.css +474 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJ.java +584 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJCompressor.java +677 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJCustomFilter.java +76 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJDecompressor.java +931 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJException.java +78 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJLoader-unix.java.in +59 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJLoader-win.java.in +35 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJScalingFactor.java +115 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJTransform.java +227 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJTransformer.java +163 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/YUVImage.java +445 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org_libjpegturbo_turbojpeg_TJ.h +129 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org_libjpegturbo_turbojpeg_TJCompressor.h +101 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org_libjpegturbo_turbojpeg_TJDecompressor.h +101 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org_libjpegturbo_turbojpeg_TJTransformer.h +29 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcapimin.c +295 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcapistd.c +162 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcarith.c +932 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jccoefct.c +449 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jccolext.c +144 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jccolor.c +710 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcdctmgr.c +721 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jchuff.c +1096 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jchuff.h +42 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcicc.c +105 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcinit.c +77 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcmainct.c +162 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcmarker.c +664 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcmaster.c +640 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcomapi.c +109 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jconfig.h.in +73 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jconfig.txt +143 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jconfigint.h.in +31 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcparam.c +541 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcphuff.c +1105 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcprepct.c +351 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcsample.c +539 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcstest.c +126 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jctrans.c +400 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdapimin.c +407 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdapistd.c +639 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdarith.c +773 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdatadst-tj.c +203 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdatadst.c +293 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdatasrc-tj.c +194 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdatasrc.c +295 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdcoefct.c +692 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdcoefct.h +82 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdcol565.c +384 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdcolext.c +143 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdcolor.c +883 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdct.h +208 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jddctmgr.c +352 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdhuff.c +831 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdhuff.h +238 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdicc.c +171 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdinput.c +408 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmainct.c +460 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmainct.h +71 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmarker.c +1377 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmaster.c +737 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmaster.h +28 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmerge.c +617 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmrg565.c +354 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmrgext.c +184 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdphuff.c +687 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdpostct.c +294 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdsample.c +518 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdsample.h +50 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdtrans.c +155 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jerror.c +251 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jerror.h +316 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jfdctflt.c +169 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jfdctfst.c +227 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jfdctint.c +288 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jidctflt.c +240 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jidctfst.c +371 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jidctint.c +2627 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jidctred.c +409 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jinclude.h +88 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jmemmgr.c +1179 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jmemnobs.c +115 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jmemsys.h +178 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jmorecfg.h +421 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jpeg_nbits_table.h +4098 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jpegcomp.h +31 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jpegint.h +368 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jpeglib.h +1132 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jpegtran.1 +295 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jpegtran.c +601 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jquant1.c +859 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jquant2.c +1285 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jsimd.h +117 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jsimd_none.c +418 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jsimddct.h +70 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jstdhuff.c +143 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jutils.c +133 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jversion.h +52 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/libjpeg.map.in +11 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/libjpeg.txt +3144 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/md5/CMakeLists.txt +1 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/md5/md5.c +275 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/md5/md5.h +57 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/md5/md5cmp.c +59 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/md5/md5hl.c +125 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdbmp.c +689 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdcolmap.c +254 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdgif.c +39 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdjpgcom.1 +63 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdjpgcom.c +510 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdppm.c +766 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdrle.c +389 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdswitch.c +424 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdtarga.c +509 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/Distribution.xml.in +24 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/License.rtf +20 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/ReadMe.txt +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/Welcome.rtf +17 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/deb-control.in +31 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/installer.nsi.in +191 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/libjpeg.pc.in +10 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/libturbojpeg.pc.in +10 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/makecygwinpkg.in +66 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/makedpkg.in +115 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/makemacpkg.in +284 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/makerpm.in +30 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/makesrpm.in +48 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/maketarball.in +51 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/rpm.spec.in +221 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/uninstall.in +113 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/sharedlib/CMakeLists.txt +99 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/CMakeLists.txt +385 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/arm/jsimd.c +721 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/arm/jsimd_neon.S +2878 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/arm64/jsimd.c +798 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/arm64/jsimd_neon.S +3433 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/gas-preprocessor.in +1 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jccolext-avx2.asm +578 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jccolext-mmx.asm +476 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jccolext-sse2.asm +503 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jccolor-avx2.asm +121 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jccolor-mmx.asm +121 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jccolor-sse2.asm +120 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcgray-avx2.asm +113 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcgray-mmx.asm +113 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcgray-sse2.asm +112 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcgryext-avx2.asm +457 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcgryext-mmx.asm +355 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcgryext-sse2.asm +382 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jchuff-sse2.asm +424 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcphuff-sse2.asm +660 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcsample-avx2.asm +388 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcsample-mmx.asm +324 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcsample-sse2.asm +351 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdcolext-avx2.asm +515 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdcolext-mmx.asm +404 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdcolext-sse2.asm +458 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdcolor-avx2.asm +118 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdcolor-mmx.asm +117 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdcolor-sse2.asm +117 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdmerge-avx2.asm +136 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdmerge-mmx.asm +123 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdmerge-sse2.asm +135 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdmrgext-avx2.asm +575 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdmrgext-mmx.asm +460 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdmrgext-sse2.asm +517 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdsample-avx2.asm +760 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdsample-mmx.asm +731 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdsample-sse2.asm +724 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctflt-3dn.asm +318 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctflt-sse.asm +369 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctfst-mmx.asm +395 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctfst-sse2.asm +403 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctint-avx2.asm +331 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctint-mmx.asm +620 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctint-sse2.asm +633 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctflt-3dn.asm +451 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctflt-sse.asm +571 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctflt-sse2.asm +497 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctfst-mmx.asm +499 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctfst-sse2.asm +501 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctint-avx2.asm +453 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctint-mmx.asm +851 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctint-sse2.asm +858 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctred-mmx.asm +704 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctred-sse2.asm +592 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jquant-3dn.asm +230 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jquant-mmx.asm +276 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jquant-sse.asm +208 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jquantf-sse2.asm +168 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jquanti-avx2.asm +188 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jquanti-sse2.asm +201 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jsimd.c +1253 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jsimdcpu.asm +135 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/jsimd.h +1083 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jccolext-mmi.c +483 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jccolor-mmi.c +148 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jcsample-mmi.c +100 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jcsample.h +28 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jdcolext-mmi.c +424 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jdcolor-mmi.c +139 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jdsample-mmi.c +245 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jfdctint-mmi.c +398 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jidctint-mmi.c +571 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jquanti-mmi.c +130 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jsimd.c +610 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jsimd_mmi.h +57 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/loongson-mmintrin.h +1324 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/mips/jsimd.c +1123 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/mips/jsimd_dspr2.S +4479 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/mips/jsimd_dspr2_asm.h +292 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/nasm/jcolsamp.inc +135 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/nasm/jdct.inc +31 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/nasm/jpeg_nbits_table.inc +4097 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/nasm/jsimdcfg.inc +93 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/nasm/jsimdcfg.inc.h +131 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/nasm/jsimdext.inc +479 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jccolext-altivec.c +269 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jccolor-altivec.c +116 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jcgray-altivec.c +111 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jcgryext-altivec.c +228 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jcsample-altivec.c +159 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jcsample.h +28 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jdcolext-altivec.c +276 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jdcolor-altivec.c +106 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jdmerge-altivec.c +130 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jdmrgext-altivec.c +329 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jdsample-altivec.c +400 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jfdctfst-altivec.c +154 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jfdctint-altivec.c +258 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jidctfst-altivec.c +255 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jidctint-altivec.c +357 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jquanti-altivec.c +250 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jsimd.c +872 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jsimd_altivec.h +98 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jccolext-avx2.asm +558 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jccolext-sse2.asm +483 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jccolor-avx2.asm +121 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jccolor-sse2.asm +120 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcgray-avx2.asm +113 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcgray-sse2.asm +112 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcgryext-avx2.asm +437 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcgryext-sse2.asm +362 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jchuff-sse2.asm +346 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcphuff-sse2.asm +637 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcsample-avx2.asm +366 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcsample-sse2.asm +329 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdcolext-avx2.asm +495 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdcolext-sse2.asm +438 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdcolor-avx2.asm +118 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdcolor-sse2.asm +117 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdmerge-avx2.asm +136 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdmerge-sse2.asm +135 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdmrgext-avx2.asm +593 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdmrgext-sse2.asm +535 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdsample-avx2.asm +695 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdsample-sse2.asm +664 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jfdctflt-sse.asm +355 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jfdctfst-sse2.asm +389 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jfdctint-avx2.asm +320 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jfdctint-sse2.asm +619 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jidctflt-sse2.asm +481 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jidctfst-sse2.asm +490 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jidctint-avx2.asm +417 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jidctint-sse2.asm +846 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jidctred-sse2.asm +573 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jquantf-sse2.asm +154 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jquanti-avx2.asm +162 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jquanti-sse2.asm +187 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jsimd.c +1076 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jsimdcpu.asm +86 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/structure.txt +904 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/nightshot_iso_100.bmp +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/nightshot_iso_100.txt +25 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/test.scan +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/test1.icc +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/test1.icc.txt +20 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/test2.icc +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/test2.icc.txt +20 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/testimgari.jpg +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/testimgint.jpg +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/testorig.jpg +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/testorig.ppm +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/testorig12.jpg +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/vgl_5674_0098.bmp +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/vgl_6434_0018a.bmp +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/vgl_6548_0026a.bmp +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjbench.c +1031 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjbenchtest.in +256 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjbenchtest.java.in +215 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjexample.c +396 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjexampletest.in +149 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjexampletest.java.in +151 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjunittest.c +931 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjutil.c +70 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjutil.h +47 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/transupp.c +1628 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/transupp.h +210 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/turbojpeg-jni.c +1246 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/turbojpeg-mapfile +65 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/turbojpeg-mapfile.jni +101 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/turbojpeg.c +2152 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/turbojpeg.h +1744 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/usage.txt +635 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/win/jconfig.h.in +34 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/win/jpeg62-memsrcdst.def +108 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/win/jpeg62.def +106 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/win/jpeg7-memsrcdst.def +110 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/win/jpeg7.def +108 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/win/jpeg8.def +111 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wizard.txt +212 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrbmp.c +558 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrgif.c +413 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrjpgcom.1 +103 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrjpgcom.c +591 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrppm.c +365 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrrle.c +309 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrtarga.c +261 -0
- data/epeg.c +131 -0
- data/epeg.gemspec +18 -0
- data/extconf.rb +80 -0
- data/test.jpg +0 -0
- data/test.rb +42 -0
- metadata +546 -0
@@ -0,0 +1,365 @@
|
|
1
|
+
/*
|
2
|
+
* wrppm.c
|
3
|
+
*
|
4
|
+
* This file was part of the Independent JPEG Group's software:
|
5
|
+
* Copyright (C) 1991-1996, Thomas G. Lane.
|
6
|
+
* Modified 2009 by Guido Vollbeding.
|
7
|
+
* libjpeg-turbo Modifications:
|
8
|
+
* Copyright (C) 2017, 2019, D. R. Commander.
|
9
|
+
* For conditions of distribution and use, see the accompanying README.ijg
|
10
|
+
* file.
|
11
|
+
*
|
12
|
+
* This file contains routines to write output images in PPM/PGM format.
|
13
|
+
* The extended 2-byte-per-sample raw PPM/PGM formats are supported.
|
14
|
+
* The PBMPLUS library is NOT required to compile this software
|
15
|
+
* (but it is highly useful as a set of PPM image manipulation programs).
|
16
|
+
*
|
17
|
+
* These routines may need modification for non-Unix environments or
|
18
|
+
* specialized applications. As they stand, they assume output to
|
19
|
+
* an ordinary stdio stream.
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "cmyk.h"
|
23
|
+
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
24
|
+
|
25
|
+
#ifdef PPM_SUPPORTED
|
26
|
+
|
27
|
+
|
28
|
+
/*
|
29
|
+
* For 12-bit JPEG data, we either downscale the values to 8 bits
|
30
|
+
* (to write standard byte-per-sample PPM/PGM files), or output
|
31
|
+
* nonstandard word-per-sample PPM/PGM files. Downscaling is done
|
32
|
+
* if PPM_NORAWWORD is defined (this can be done in the Makefile
|
33
|
+
* or in jconfig.h).
|
34
|
+
* (When the core library supports data precision reduction, a cleaner
|
35
|
+
* implementation will be to ask for that instead.)
|
36
|
+
*/
|
37
|
+
|
38
|
+
#if BITS_IN_JSAMPLE == 8
|
39
|
+
#define PUTPPMSAMPLE(ptr, v) *ptr++ = (char)(v)
|
40
|
+
#define BYTESPERSAMPLE 1
|
41
|
+
#define PPM_MAXVAL 255
|
42
|
+
#else
|
43
|
+
#ifdef PPM_NORAWWORD
|
44
|
+
#define PUTPPMSAMPLE(ptr, v) *ptr++ = (char)((v) >> (BITS_IN_JSAMPLE - 8))
|
45
|
+
#define BYTESPERSAMPLE 1
|
46
|
+
#define PPM_MAXVAL 255
|
47
|
+
#else
|
48
|
+
/* The word-per-sample format always puts the MSB first. */
|
49
|
+
#define PUTPPMSAMPLE(ptr, v) { \
|
50
|
+
register int val_ = v; \
|
51
|
+
*ptr++ = (char)((val_ >> 8) & 0xFF); \
|
52
|
+
*ptr++ = (char)(val_ & 0xFF); \
|
53
|
+
}
|
54
|
+
#define BYTESPERSAMPLE 2
|
55
|
+
#define PPM_MAXVAL ((1 << BITS_IN_JSAMPLE) - 1)
|
56
|
+
#endif
|
57
|
+
#endif
|
58
|
+
|
59
|
+
|
60
|
+
/*
|
61
|
+
* When JSAMPLE is the same size as char, we can just fwrite() the
|
62
|
+
* decompressed data to the PPM or PGM file.
|
63
|
+
*/
|
64
|
+
|
65
|
+
|
66
|
+
/* Private version of data destination object */
|
67
|
+
|
68
|
+
typedef struct {
|
69
|
+
struct djpeg_dest_struct pub; /* public fields */
|
70
|
+
|
71
|
+
/* Usually these two pointers point to the same place: */
|
72
|
+
char *iobuffer; /* fwrite's I/O buffer */
|
73
|
+
JSAMPROW pixrow; /* decompressor output buffer */
|
74
|
+
size_t buffer_width; /* width of I/O buffer */
|
75
|
+
JDIMENSION samples_per_row; /* JSAMPLEs per output row */
|
76
|
+
} ppm_dest_struct;
|
77
|
+
|
78
|
+
typedef ppm_dest_struct *ppm_dest_ptr;
|
79
|
+
|
80
|
+
|
81
|
+
/*
|
82
|
+
* Write some pixel data.
|
83
|
+
* In this module rows_supplied will always be 1.
|
84
|
+
*
|
85
|
+
* put_pixel_rows handles the "normal" 8-bit case where the decompressor
|
86
|
+
* output buffer is physically the same as the fwrite buffer.
|
87
|
+
*/
|
88
|
+
|
89
|
+
METHODDEF(void)
|
90
|
+
put_pixel_rows(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
|
91
|
+
JDIMENSION rows_supplied)
|
92
|
+
{
|
93
|
+
ppm_dest_ptr dest = (ppm_dest_ptr)dinfo;
|
94
|
+
|
95
|
+
(void)JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
|
96
|
+
}
|
97
|
+
|
98
|
+
|
99
|
+
/*
|
100
|
+
* This code is used when we have to copy the data and apply a pixel
|
101
|
+
* format translation. Typically this only happens in 12-bit mode.
|
102
|
+
*/
|
103
|
+
|
104
|
+
METHODDEF(void)
|
105
|
+
copy_pixel_rows(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
|
106
|
+
JDIMENSION rows_supplied)
|
107
|
+
{
|
108
|
+
ppm_dest_ptr dest = (ppm_dest_ptr)dinfo;
|
109
|
+
register char *bufferptr;
|
110
|
+
register JSAMPROW ptr;
|
111
|
+
#if BITS_IN_JSAMPLE != 8 || (!defined(HAVE_UNSIGNED_CHAR) && !defined(__CHAR_UNSIGNED__))
|
112
|
+
register JDIMENSION col;
|
113
|
+
#endif
|
114
|
+
|
115
|
+
ptr = dest->pub.buffer[0];
|
116
|
+
bufferptr = dest->iobuffer;
|
117
|
+
#if BITS_IN_JSAMPLE == 8 && (defined(HAVE_UNSIGNED_CHAR) || defined(__CHAR_UNSIGNED__))
|
118
|
+
MEMCOPY(bufferptr, ptr, dest->samples_per_row);
|
119
|
+
#else
|
120
|
+
for (col = dest->samples_per_row; col > 0; col--) {
|
121
|
+
PUTPPMSAMPLE(bufferptr, GETJSAMPLE(*ptr++));
|
122
|
+
}
|
123
|
+
#endif
|
124
|
+
(void)JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
|
125
|
+
}
|
126
|
+
|
127
|
+
|
128
|
+
/*
|
129
|
+
* Convert extended RGB to RGB.
|
130
|
+
*/
|
131
|
+
|
132
|
+
METHODDEF(void)
|
133
|
+
put_rgb(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, JDIMENSION rows_supplied)
|
134
|
+
{
|
135
|
+
ppm_dest_ptr dest = (ppm_dest_ptr)dinfo;
|
136
|
+
register char *bufferptr;
|
137
|
+
register JSAMPROW ptr;
|
138
|
+
register JDIMENSION col;
|
139
|
+
register int rindex = rgb_red[cinfo->out_color_space];
|
140
|
+
register int gindex = rgb_green[cinfo->out_color_space];
|
141
|
+
register int bindex = rgb_blue[cinfo->out_color_space];
|
142
|
+
register int ps = rgb_pixelsize[cinfo->out_color_space];
|
143
|
+
|
144
|
+
ptr = dest->pub.buffer[0];
|
145
|
+
bufferptr = dest->iobuffer;
|
146
|
+
for (col = cinfo->output_width; col > 0; col--) {
|
147
|
+
PUTPPMSAMPLE(bufferptr, ptr[rindex]);
|
148
|
+
PUTPPMSAMPLE(bufferptr, ptr[gindex]);
|
149
|
+
PUTPPMSAMPLE(bufferptr, ptr[bindex]);
|
150
|
+
ptr += ps;
|
151
|
+
}
|
152
|
+
(void)JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
|
153
|
+
}
|
154
|
+
|
155
|
+
|
156
|
+
/*
|
157
|
+
* Convert CMYK to RGB.
|
158
|
+
*/
|
159
|
+
|
160
|
+
METHODDEF(void)
|
161
|
+
put_cmyk(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
|
162
|
+
JDIMENSION rows_supplied)
|
163
|
+
{
|
164
|
+
ppm_dest_ptr dest = (ppm_dest_ptr)dinfo;
|
165
|
+
register char *bufferptr;
|
166
|
+
register JSAMPROW ptr;
|
167
|
+
register JDIMENSION col;
|
168
|
+
|
169
|
+
ptr = dest->pub.buffer[0];
|
170
|
+
bufferptr = dest->iobuffer;
|
171
|
+
for (col = cinfo->output_width; col > 0; col--) {
|
172
|
+
JSAMPLE r, g, b, c = *ptr++, m = *ptr++, y = *ptr++, k = *ptr++;
|
173
|
+
cmyk_to_rgb(c, m, y, k, &r, &g, &b);
|
174
|
+
PUTPPMSAMPLE(bufferptr, r);
|
175
|
+
PUTPPMSAMPLE(bufferptr, g);
|
176
|
+
PUTPPMSAMPLE(bufferptr, b);
|
177
|
+
}
|
178
|
+
(void)JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
|
179
|
+
}
|
180
|
+
|
181
|
+
|
182
|
+
/*
|
183
|
+
* Write some pixel data when color quantization is in effect.
|
184
|
+
* We have to demap the color index values to straight data.
|
185
|
+
*/
|
186
|
+
|
187
|
+
METHODDEF(void)
|
188
|
+
put_demapped_rgb(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
|
189
|
+
JDIMENSION rows_supplied)
|
190
|
+
{
|
191
|
+
ppm_dest_ptr dest = (ppm_dest_ptr)dinfo;
|
192
|
+
register char *bufferptr;
|
193
|
+
register int pixval;
|
194
|
+
register JSAMPROW ptr;
|
195
|
+
register JSAMPROW color_map0 = cinfo->colormap[0];
|
196
|
+
register JSAMPROW color_map1 = cinfo->colormap[1];
|
197
|
+
register JSAMPROW color_map2 = cinfo->colormap[2];
|
198
|
+
register JDIMENSION col;
|
199
|
+
|
200
|
+
ptr = dest->pub.buffer[0];
|
201
|
+
bufferptr = dest->iobuffer;
|
202
|
+
for (col = cinfo->output_width; col > 0; col--) {
|
203
|
+
pixval = GETJSAMPLE(*ptr++);
|
204
|
+
PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map0[pixval]));
|
205
|
+
PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map1[pixval]));
|
206
|
+
PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map2[pixval]));
|
207
|
+
}
|
208
|
+
(void)JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
|
209
|
+
}
|
210
|
+
|
211
|
+
|
212
|
+
METHODDEF(void)
|
213
|
+
put_demapped_gray(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
|
214
|
+
JDIMENSION rows_supplied)
|
215
|
+
{
|
216
|
+
ppm_dest_ptr dest = (ppm_dest_ptr)dinfo;
|
217
|
+
register char *bufferptr;
|
218
|
+
register JSAMPROW ptr;
|
219
|
+
register JSAMPROW color_map = cinfo->colormap[0];
|
220
|
+
register JDIMENSION col;
|
221
|
+
|
222
|
+
ptr = dest->pub.buffer[0];
|
223
|
+
bufferptr = dest->iobuffer;
|
224
|
+
for (col = cinfo->output_width; col > 0; col--) {
|
225
|
+
PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map[GETJSAMPLE(*ptr++)]));
|
226
|
+
}
|
227
|
+
(void)JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
|
228
|
+
}
|
229
|
+
|
230
|
+
|
231
|
+
/*
|
232
|
+
* Startup: write the file header.
|
233
|
+
*/
|
234
|
+
|
235
|
+
METHODDEF(void)
|
236
|
+
start_output_ppm(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
|
237
|
+
{
|
238
|
+
ppm_dest_ptr dest = (ppm_dest_ptr)dinfo;
|
239
|
+
|
240
|
+
/* Emit file header */
|
241
|
+
switch (cinfo->out_color_space) {
|
242
|
+
case JCS_GRAYSCALE:
|
243
|
+
/* emit header for raw PGM format */
|
244
|
+
fprintf(dest->pub.output_file, "P5\n%ld %ld\n%d\n",
|
245
|
+
(long)cinfo->output_width, (long)cinfo->output_height, PPM_MAXVAL);
|
246
|
+
break;
|
247
|
+
case JCS_RGB:
|
248
|
+
case JCS_EXT_RGB:
|
249
|
+
case JCS_EXT_RGBX:
|
250
|
+
case JCS_EXT_BGR:
|
251
|
+
case JCS_EXT_BGRX:
|
252
|
+
case JCS_EXT_XBGR:
|
253
|
+
case JCS_EXT_XRGB:
|
254
|
+
case JCS_EXT_RGBA:
|
255
|
+
case JCS_EXT_BGRA:
|
256
|
+
case JCS_EXT_ABGR:
|
257
|
+
case JCS_EXT_ARGB:
|
258
|
+
case JCS_CMYK:
|
259
|
+
if (!IsExtRGB(cinfo->out_color_space) && cinfo->quantize_colors)
|
260
|
+
ERREXIT(cinfo, JERR_PPM_COLORSPACE);
|
261
|
+
/* emit header for raw PPM format */
|
262
|
+
fprintf(dest->pub.output_file, "P6\n%ld %ld\n%d\n",
|
263
|
+
(long)cinfo->output_width, (long)cinfo->output_height, PPM_MAXVAL);
|
264
|
+
break;
|
265
|
+
default:
|
266
|
+
ERREXIT(cinfo, JERR_PPM_COLORSPACE);
|
267
|
+
}
|
268
|
+
}
|
269
|
+
|
270
|
+
|
271
|
+
/*
|
272
|
+
* Finish up at the end of the file.
|
273
|
+
*/
|
274
|
+
|
275
|
+
METHODDEF(void)
|
276
|
+
finish_output_ppm(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
|
277
|
+
{
|
278
|
+
/* Make sure we wrote the output file OK */
|
279
|
+
fflush(dinfo->output_file);
|
280
|
+
if (ferror(dinfo->output_file))
|
281
|
+
ERREXIT(cinfo, JERR_FILE_WRITE);
|
282
|
+
}
|
283
|
+
|
284
|
+
|
285
|
+
/*
|
286
|
+
* Re-calculate buffer dimensions based on output dimensions.
|
287
|
+
*/
|
288
|
+
|
289
|
+
METHODDEF(void)
|
290
|
+
calc_buffer_dimensions_ppm(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
|
291
|
+
{
|
292
|
+
ppm_dest_ptr dest = (ppm_dest_ptr)dinfo;
|
293
|
+
|
294
|
+
if (cinfo->out_color_space == JCS_GRAYSCALE)
|
295
|
+
dest->samples_per_row = cinfo->output_width * cinfo->out_color_components;
|
296
|
+
else
|
297
|
+
dest->samples_per_row = cinfo->output_width * 3;
|
298
|
+
dest->buffer_width = dest->samples_per_row * (BYTESPERSAMPLE * sizeof(char));
|
299
|
+
}
|
300
|
+
|
301
|
+
|
302
|
+
/*
|
303
|
+
* The module selection routine for PPM format output.
|
304
|
+
*/
|
305
|
+
|
306
|
+
GLOBAL(djpeg_dest_ptr)
|
307
|
+
jinit_write_ppm(j_decompress_ptr cinfo)
|
308
|
+
{
|
309
|
+
ppm_dest_ptr dest;
|
310
|
+
|
311
|
+
/* Create module interface object, fill in method pointers */
|
312
|
+
dest = (ppm_dest_ptr)
|
313
|
+
(*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE,
|
314
|
+
sizeof(ppm_dest_struct));
|
315
|
+
dest->pub.start_output = start_output_ppm;
|
316
|
+
dest->pub.finish_output = finish_output_ppm;
|
317
|
+
dest->pub.calc_buffer_dimensions = calc_buffer_dimensions_ppm;
|
318
|
+
|
319
|
+
/* Calculate output image dimensions so we can allocate space */
|
320
|
+
jpeg_calc_output_dimensions(cinfo);
|
321
|
+
|
322
|
+
/* Create physical I/O buffer */
|
323
|
+
dest->pub.calc_buffer_dimensions(cinfo, (djpeg_dest_ptr)dest);
|
324
|
+
dest->iobuffer = (char *)(*cinfo->mem->alloc_small)
|
325
|
+
((j_common_ptr)cinfo, JPOOL_IMAGE, dest->buffer_width);
|
326
|
+
|
327
|
+
if (cinfo->quantize_colors || BITS_IN_JSAMPLE != 8 ||
|
328
|
+
sizeof(JSAMPLE) != sizeof(char) ||
|
329
|
+
(cinfo->out_color_space != JCS_EXT_RGB
|
330
|
+
#if RGB_RED == 0 && RGB_GREEN == 1 && RGB_BLUE == 2 && RGB_PIXELSIZE == 3
|
331
|
+
&& cinfo->out_color_space != JCS_RGB
|
332
|
+
#endif
|
333
|
+
)) {
|
334
|
+
/* When quantizing, we need an output buffer for colormap indexes
|
335
|
+
* that's separate from the physical I/O buffer. We also need a
|
336
|
+
* separate buffer if pixel format translation must take place.
|
337
|
+
*/
|
338
|
+
dest->pub.buffer = (*cinfo->mem->alloc_sarray)
|
339
|
+
((j_common_ptr)cinfo, JPOOL_IMAGE,
|
340
|
+
cinfo->output_width * cinfo->output_components, (JDIMENSION)1);
|
341
|
+
dest->pub.buffer_height = 1;
|
342
|
+
if (!cinfo->quantize_colors) {
|
343
|
+
if (IsExtRGB(cinfo->out_color_space))
|
344
|
+
dest->pub.put_pixel_rows = put_rgb;
|
345
|
+
else if (cinfo->out_color_space == JCS_CMYK)
|
346
|
+
dest->pub.put_pixel_rows = put_cmyk;
|
347
|
+
else
|
348
|
+
dest->pub.put_pixel_rows = copy_pixel_rows;
|
349
|
+
} else if (cinfo->out_color_space == JCS_GRAYSCALE)
|
350
|
+
dest->pub.put_pixel_rows = put_demapped_gray;
|
351
|
+
else
|
352
|
+
dest->pub.put_pixel_rows = put_demapped_rgb;
|
353
|
+
} else {
|
354
|
+
/* We will fwrite() directly from decompressor output buffer. */
|
355
|
+
/* Synthesize a JSAMPARRAY pointer structure */
|
356
|
+
dest->pixrow = (JSAMPROW)dest->iobuffer;
|
357
|
+
dest->pub.buffer = &dest->pixrow;
|
358
|
+
dest->pub.buffer_height = 1;
|
359
|
+
dest->pub.put_pixel_rows = put_pixel_rows;
|
360
|
+
}
|
361
|
+
|
362
|
+
return (djpeg_dest_ptr)dest;
|
363
|
+
}
|
364
|
+
|
365
|
+
#endif /* PPM_SUPPORTED */
|
@@ -0,0 +1,309 @@
|
|
1
|
+
/*
|
2
|
+
* wrrle.c
|
3
|
+
*
|
4
|
+
* This file was part of the Independent JPEG Group's software:
|
5
|
+
* Copyright (C) 1991-1996, Thomas G. Lane.
|
6
|
+
* libjpeg-turbo Modifications:
|
7
|
+
* Copyright (C) 2017, D. R. Commander.
|
8
|
+
* For conditions of distribution and use, see the accompanying README.ijg
|
9
|
+
* file.
|
10
|
+
*
|
11
|
+
* This file contains routines to write output images in RLE format.
|
12
|
+
* The Utah Raster Toolkit library is required (version 3.1 or later).
|
13
|
+
*
|
14
|
+
* These routines may need modification for non-Unix environments or
|
15
|
+
* specialized applications. As they stand, they assume output to
|
16
|
+
* an ordinary stdio stream.
|
17
|
+
*
|
18
|
+
* Based on code contributed by Mike Lijewski,
|
19
|
+
* with updates from Robert Hutchinson.
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
23
|
+
|
24
|
+
#ifdef RLE_SUPPORTED
|
25
|
+
|
26
|
+
/* rle.h is provided by the Utah Raster Toolkit. */
|
27
|
+
|
28
|
+
#include <rle.h>
|
29
|
+
|
30
|
+
/*
|
31
|
+
* We assume that JSAMPLE has the same representation as rle_pixel,
|
32
|
+
* to wit, "unsigned char". Hence we can't cope with 12- or 16-bit samples.
|
33
|
+
*/
|
34
|
+
|
35
|
+
#if BITS_IN_JSAMPLE != 8
|
36
|
+
Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */
|
37
|
+
#endif
|
38
|
+
|
39
|
+
|
40
|
+
/*
|
41
|
+
* Since RLE stores scanlines bottom-to-top, we have to invert the image
|
42
|
+
* from JPEG's top-to-bottom order. To do this, we save the outgoing data
|
43
|
+
* in a virtual array during put_pixel_row calls, then actually emit the
|
44
|
+
* RLE file during finish_output.
|
45
|
+
*/
|
46
|
+
|
47
|
+
|
48
|
+
/*
|
49
|
+
* For now, if we emit an RLE color map then it is always 256 entries long,
|
50
|
+
* though not all of the entries need be used.
|
51
|
+
*/
|
52
|
+
|
53
|
+
#define CMAPBITS 8
|
54
|
+
#define CMAPLENGTH (1 << (CMAPBITS))
|
55
|
+
|
56
|
+
typedef struct {
|
57
|
+
struct djpeg_dest_struct pub; /* public fields */
|
58
|
+
|
59
|
+
jvirt_sarray_ptr image; /* virtual array to store the output image */
|
60
|
+
rle_map *colormap; /* RLE-style color map, or NULL if none */
|
61
|
+
rle_pixel **rle_row; /* To pass rows to rle_putrow() */
|
62
|
+
|
63
|
+
} rle_dest_struct;
|
64
|
+
|
65
|
+
typedef rle_dest_struct *rle_dest_ptr;
|
66
|
+
|
67
|
+
/* Forward declarations */
|
68
|
+
METHODDEF(void) rle_put_pixel_rows(j_decompress_ptr cinfo,
|
69
|
+
djpeg_dest_ptr dinfo,
|
70
|
+
JDIMENSION rows_supplied);
|
71
|
+
|
72
|
+
|
73
|
+
/*
|
74
|
+
* Write the file header.
|
75
|
+
*
|
76
|
+
* In this module it's easier to wait till finish_output to write anything.
|
77
|
+
*/
|
78
|
+
|
79
|
+
METHODDEF(void)
|
80
|
+
start_output_rle(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
|
81
|
+
{
|
82
|
+
rle_dest_ptr dest = (rle_dest_ptr)dinfo;
|
83
|
+
size_t cmapsize;
|
84
|
+
int i, ci;
|
85
|
+
#ifdef PROGRESS_REPORT
|
86
|
+
cd_progress_ptr progress = (cd_progress_ptr)cinfo->progress;
|
87
|
+
#endif
|
88
|
+
|
89
|
+
/*
|
90
|
+
* Make sure the image can be stored in RLE format.
|
91
|
+
*
|
92
|
+
* - RLE stores image dimensions as *signed* 16 bit integers. JPEG
|
93
|
+
* uses unsigned, so we have to check the width.
|
94
|
+
*
|
95
|
+
* - Colorspace is expected to be grayscale or RGB.
|
96
|
+
*
|
97
|
+
* - The number of channels (components) is expected to be 1 (grayscale/
|
98
|
+
* pseudocolor) or 3 (truecolor/directcolor).
|
99
|
+
* (could be 2 or 4 if using an alpha channel, but we aren't)
|
100
|
+
*/
|
101
|
+
|
102
|
+
if (cinfo->output_width > 32767 || cinfo->output_height > 32767)
|
103
|
+
ERREXIT2(cinfo, JERR_RLE_DIMENSIONS, cinfo->output_width,
|
104
|
+
cinfo->output_height);
|
105
|
+
|
106
|
+
if (cinfo->out_color_space != JCS_GRAYSCALE &&
|
107
|
+
cinfo->out_color_space != JCS_RGB)
|
108
|
+
ERREXIT(cinfo, JERR_RLE_COLORSPACE);
|
109
|
+
|
110
|
+
if (cinfo->output_components != 1 && cinfo->output_components != 3)
|
111
|
+
ERREXIT1(cinfo, JERR_RLE_TOOMANYCHANNELS, cinfo->num_components);
|
112
|
+
|
113
|
+
/* Convert colormap, if any, to RLE format. */
|
114
|
+
|
115
|
+
dest->colormap = NULL;
|
116
|
+
|
117
|
+
if (cinfo->quantize_colors) {
|
118
|
+
/* Allocate storage for RLE-style cmap, zero any extra entries */
|
119
|
+
cmapsize = cinfo->out_color_components * CMAPLENGTH * sizeof(rle_map);
|
120
|
+
dest->colormap = (rle_map *)(*cinfo->mem->alloc_small)
|
121
|
+
((j_common_ptr)cinfo, JPOOL_IMAGE, cmapsize);
|
122
|
+
MEMZERO(dest->colormap, cmapsize);
|
123
|
+
|
124
|
+
/* Save away data in RLE format --- note 8-bit left shift! */
|
125
|
+
/* Shifting would need adjustment for JSAMPLEs wider than 8 bits. */
|
126
|
+
for (ci = 0; ci < cinfo->out_color_components; ci++) {
|
127
|
+
for (i = 0; i < cinfo->actual_number_of_colors; i++) {
|
128
|
+
dest->colormap[ci * CMAPLENGTH + i] =
|
129
|
+
GETJSAMPLE(cinfo->colormap[ci][i]) << 8;
|
130
|
+
}
|
131
|
+
}
|
132
|
+
}
|
133
|
+
|
134
|
+
/* Set the output buffer to the first row */
|
135
|
+
dest->pub.buffer = (*cinfo->mem->access_virt_sarray)
|
136
|
+
((j_common_ptr)cinfo, dest->image, (JDIMENSION)0, (JDIMENSION)1, TRUE);
|
137
|
+
dest->pub.buffer_height = 1;
|
138
|
+
|
139
|
+
dest->pub.put_pixel_rows = rle_put_pixel_rows;
|
140
|
+
|
141
|
+
#ifdef PROGRESS_REPORT
|
142
|
+
if (progress != NULL) {
|
143
|
+
progress->total_extra_passes++; /* count file writing as separate pass */
|
144
|
+
}
|
145
|
+
#endif
|
146
|
+
}
|
147
|
+
|
148
|
+
|
149
|
+
/*
|
150
|
+
* Write some pixel data.
|
151
|
+
*
|
152
|
+
* This routine just saves the data away in a virtual array.
|
153
|
+
*/
|
154
|
+
|
155
|
+
METHODDEF(void)
|
156
|
+
rle_put_pixel_rows(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
|
157
|
+
JDIMENSION rows_supplied)
|
158
|
+
{
|
159
|
+
rle_dest_ptr dest = (rle_dest_ptr)dinfo;
|
160
|
+
|
161
|
+
if (cinfo->output_scanline < cinfo->output_height) {
|
162
|
+
dest->pub.buffer = (*cinfo->mem->access_virt_sarray)
|
163
|
+
((j_common_ptr)cinfo, dest->image,
|
164
|
+
cinfo->output_scanline, (JDIMENSION)1, TRUE);
|
165
|
+
}
|
166
|
+
}
|
167
|
+
|
168
|
+
/*
|
169
|
+
* Finish up at the end of the file.
|
170
|
+
*
|
171
|
+
* Here is where we really output the RLE file.
|
172
|
+
*/
|
173
|
+
|
174
|
+
METHODDEF(void)
|
175
|
+
finish_output_rle(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
|
176
|
+
{
|
177
|
+
rle_dest_ptr dest = (rle_dest_ptr)dinfo;
|
178
|
+
rle_hdr header; /* Output file information */
|
179
|
+
rle_pixel **rle_row, *red, *green, *blue;
|
180
|
+
JSAMPROW output_row;
|
181
|
+
char cmapcomment[80];
|
182
|
+
int row, col;
|
183
|
+
int ci;
|
184
|
+
#ifdef PROGRESS_REPORT
|
185
|
+
cd_progress_ptr progress = (cd_progress_ptr)cinfo->progress;
|
186
|
+
#endif
|
187
|
+
|
188
|
+
/* Initialize the header info */
|
189
|
+
header = *rle_hdr_init(NULL);
|
190
|
+
header.rle_file = dest->pub.output_file;
|
191
|
+
header.xmin = 0;
|
192
|
+
header.xmax = cinfo->output_width - 1;
|
193
|
+
header.ymin = 0;
|
194
|
+
header.ymax = cinfo->output_height - 1;
|
195
|
+
header.alpha = 0;
|
196
|
+
header.ncolors = cinfo->output_components;
|
197
|
+
for (ci = 0; ci < cinfo->output_components; ci++) {
|
198
|
+
RLE_SET_BIT(header, ci);
|
199
|
+
}
|
200
|
+
if (cinfo->quantize_colors) {
|
201
|
+
header.ncmap = cinfo->out_color_components;
|
202
|
+
header.cmaplen = CMAPBITS;
|
203
|
+
header.cmap = dest->colormap;
|
204
|
+
/* Add a comment to the output image with the true colormap length. */
|
205
|
+
sprintf(cmapcomment, "color_map_length=%d",
|
206
|
+
cinfo->actual_number_of_colors);
|
207
|
+
rle_putcom(cmapcomment, &header);
|
208
|
+
}
|
209
|
+
|
210
|
+
/* Emit the RLE header and color map (if any) */
|
211
|
+
rle_put_setup(&header);
|
212
|
+
|
213
|
+
/* Now output the RLE data from our virtual array.
|
214
|
+
* We assume here that rle_pixel is represented the same as JSAMPLE.
|
215
|
+
*/
|
216
|
+
|
217
|
+
#ifdef PROGRESS_REPORT
|
218
|
+
if (progress != NULL) {
|
219
|
+
progress->pub.pass_limit = cinfo->output_height;
|
220
|
+
progress->pub.pass_counter = 0;
|
221
|
+
(*progress->pub.progress_monitor) ((j_common_ptr)cinfo);
|
222
|
+
}
|
223
|
+
#endif
|
224
|
+
|
225
|
+
if (cinfo->output_components == 1) {
|
226
|
+
for (row = cinfo->output_height - 1; row >= 0; row--) {
|
227
|
+
rle_row = (rle_pixel **)(*cinfo->mem->access_virt_sarray)
|
228
|
+
((j_common_ptr)cinfo, dest->image,
|
229
|
+
(JDIMENSION)row, (JDIMENSION)1, FALSE);
|
230
|
+
rle_putrow(rle_row, (int)cinfo->output_width, &header);
|
231
|
+
#ifdef PROGRESS_REPORT
|
232
|
+
if (progress != NULL) {
|
233
|
+
progress->pub.pass_counter++;
|
234
|
+
(*progress->pub.progress_monitor) ((j_common_ptr)cinfo);
|
235
|
+
}
|
236
|
+
#endif
|
237
|
+
}
|
238
|
+
} else {
|
239
|
+
for (row = cinfo->output_height - 1; row >= 0; row--) {
|
240
|
+
rle_row = (rle_pixel **)dest->rle_row;
|
241
|
+
output_row = *(*cinfo->mem->access_virt_sarray)
|
242
|
+
((j_common_ptr)cinfo, dest->image,
|
243
|
+
(JDIMENSION)row, (JDIMENSION)1, FALSE);
|
244
|
+
red = rle_row[0];
|
245
|
+
green = rle_row[1];
|
246
|
+
blue = rle_row[2];
|
247
|
+
for (col = cinfo->output_width; col > 0; col--) {
|
248
|
+
*red++ = GETJSAMPLE(*output_row++);
|
249
|
+
*green++ = GETJSAMPLE(*output_row++);
|
250
|
+
*blue++ = GETJSAMPLE(*output_row++);
|
251
|
+
}
|
252
|
+
rle_putrow(rle_row, (int)cinfo->output_width, &header);
|
253
|
+
#ifdef PROGRESS_REPORT
|
254
|
+
if (progress != NULL) {
|
255
|
+
progress->pub.pass_counter++;
|
256
|
+
(*progress->pub.progress_monitor) ((j_common_ptr)cinfo);
|
257
|
+
}
|
258
|
+
#endif
|
259
|
+
}
|
260
|
+
}
|
261
|
+
|
262
|
+
#ifdef PROGRESS_REPORT
|
263
|
+
if (progress != NULL)
|
264
|
+
progress->completed_extra_passes++;
|
265
|
+
#endif
|
266
|
+
|
267
|
+
/* Emit file trailer */
|
268
|
+
rle_puteof(&header);
|
269
|
+
fflush(dest->pub.output_file);
|
270
|
+
if (ferror(dest->pub.output_file))
|
271
|
+
ERREXIT(cinfo, JERR_FILE_WRITE);
|
272
|
+
}
|
273
|
+
|
274
|
+
|
275
|
+
/*
|
276
|
+
* The module selection routine for RLE format output.
|
277
|
+
*/
|
278
|
+
|
279
|
+
GLOBAL(djpeg_dest_ptr)
|
280
|
+
jinit_write_rle(j_decompress_ptr cinfo)
|
281
|
+
{
|
282
|
+
rle_dest_ptr dest;
|
283
|
+
|
284
|
+
/* Create module interface object, fill in method pointers */
|
285
|
+
dest = (rle_dest_ptr)
|
286
|
+
(*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE,
|
287
|
+
sizeof(rle_dest_struct));
|
288
|
+
dest->pub.start_output = start_output_rle;
|
289
|
+
dest->pub.finish_output = finish_output_rle;
|
290
|
+
dest->pub.calc_buffer_dimensions = NULL;
|
291
|
+
|
292
|
+
/* Calculate output image dimensions so we can allocate space */
|
293
|
+
jpeg_calc_output_dimensions(cinfo);
|
294
|
+
|
295
|
+
/* Allocate a work array for output to the RLE library. */
|
296
|
+
dest->rle_row = (*cinfo->mem->alloc_sarray)
|
297
|
+
((j_common_ptr)cinfo, JPOOL_IMAGE,
|
298
|
+
cinfo->output_width, (JDIMENSION)cinfo->output_components);
|
299
|
+
|
300
|
+
/* Allocate a virtual array to hold the image. */
|
301
|
+
dest->image = (*cinfo->mem->request_virt_sarray)
|
302
|
+
((j_common_ptr)cinfo, JPOOL_IMAGE, FALSE,
|
303
|
+
(JDIMENSION)(cinfo->output_width * cinfo->output_components),
|
304
|
+
cinfo->output_height, (JDIMENSION)1);
|
305
|
+
|
306
|
+
return (djpeg_dest_ptr)dest;
|
307
|
+
}
|
308
|
+
|
309
|
+
#endif /* RLE_SUPPORTED */
|