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,639 @@
|
|
1
|
+
/*
|
2
|
+
* jdapistd.c
|
3
|
+
*
|
4
|
+
* This file was part of the Independent JPEG Group's software:
|
5
|
+
* Copyright (C) 1994-1996, Thomas G. Lane.
|
6
|
+
* libjpeg-turbo Modifications:
|
7
|
+
* Copyright (C) 2010, 2015-2018, D. R. Commander.
|
8
|
+
* Copyright (C) 2015, Google, Inc.
|
9
|
+
* For conditions of distribution and use, see the accompanying README.ijg
|
10
|
+
* file.
|
11
|
+
*
|
12
|
+
* This file contains application interface code for the decompression half
|
13
|
+
* of the JPEG library. These are the "standard" API routines that are
|
14
|
+
* used in the normal full-decompression case. They are not used by a
|
15
|
+
* transcoding-only application. Note that if an application links in
|
16
|
+
* jpeg_start_decompress, it will end up linking in the entire decompressor.
|
17
|
+
* We thus must separate this file from jdapimin.c to avoid linking the
|
18
|
+
* whole decompression library into a transcoder.
|
19
|
+
*/
|
20
|
+
|
21
|
+
#include "jinclude.h"
|
22
|
+
#include "jdmainct.h"
|
23
|
+
#include "jdcoefct.h"
|
24
|
+
#include "jdsample.h"
|
25
|
+
#include "jmemsys.h"
|
26
|
+
|
27
|
+
/* Forward declarations */
|
28
|
+
LOCAL(boolean) output_pass_setup(j_decompress_ptr cinfo);
|
29
|
+
|
30
|
+
|
31
|
+
/*
|
32
|
+
* Decompression initialization.
|
33
|
+
* jpeg_read_header must be completed before calling this.
|
34
|
+
*
|
35
|
+
* If a multipass operating mode was selected, this will do all but the
|
36
|
+
* last pass, and thus may take a great deal of time.
|
37
|
+
*
|
38
|
+
* Returns FALSE if suspended. The return value need be inspected only if
|
39
|
+
* a suspending data source is used.
|
40
|
+
*/
|
41
|
+
|
42
|
+
GLOBAL(boolean)
|
43
|
+
jpeg_start_decompress(j_decompress_ptr cinfo)
|
44
|
+
{
|
45
|
+
if (cinfo->global_state == DSTATE_READY) {
|
46
|
+
/* First call: initialize master control, select active modules */
|
47
|
+
jinit_master_decompress(cinfo);
|
48
|
+
if (cinfo->buffered_image) {
|
49
|
+
/* No more work here; expecting jpeg_start_output next */
|
50
|
+
cinfo->global_state = DSTATE_BUFIMAGE;
|
51
|
+
return TRUE;
|
52
|
+
}
|
53
|
+
cinfo->global_state = DSTATE_PRELOAD;
|
54
|
+
}
|
55
|
+
if (cinfo->global_state == DSTATE_PRELOAD) {
|
56
|
+
/* If file has multiple scans, absorb them all into the coef buffer */
|
57
|
+
if (cinfo->inputctl->has_multiple_scans) {
|
58
|
+
#ifdef D_MULTISCAN_FILES_SUPPORTED
|
59
|
+
for (;;) {
|
60
|
+
int retcode;
|
61
|
+
/* Call progress monitor hook if present */
|
62
|
+
if (cinfo->progress != NULL)
|
63
|
+
(*cinfo->progress->progress_monitor) ((j_common_ptr)cinfo);
|
64
|
+
/* Absorb some more input */
|
65
|
+
retcode = (*cinfo->inputctl->consume_input) (cinfo);
|
66
|
+
if (retcode == JPEG_SUSPENDED)
|
67
|
+
return FALSE;
|
68
|
+
if (retcode == JPEG_REACHED_EOI)
|
69
|
+
break;
|
70
|
+
/* Advance progress counter if appropriate */
|
71
|
+
if (cinfo->progress != NULL &&
|
72
|
+
(retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) {
|
73
|
+
if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) {
|
74
|
+
/* jdmaster underestimated number of scans; ratchet up one scan */
|
75
|
+
cinfo->progress->pass_limit += (long)cinfo->total_iMCU_rows;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
#else
|
80
|
+
ERREXIT(cinfo, JERR_NOT_COMPILED);
|
81
|
+
#endif /* D_MULTISCAN_FILES_SUPPORTED */
|
82
|
+
}
|
83
|
+
cinfo->output_scan_number = cinfo->input_scan_number;
|
84
|
+
} else if (cinfo->global_state != DSTATE_PRESCAN)
|
85
|
+
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
86
|
+
/* Perform any dummy output passes, and set up for the final pass */
|
87
|
+
return output_pass_setup(cinfo);
|
88
|
+
}
|
89
|
+
|
90
|
+
|
91
|
+
/*
|
92
|
+
* Set up for an output pass, and perform any dummy pass(es) needed.
|
93
|
+
* Common subroutine for jpeg_start_decompress and jpeg_start_output.
|
94
|
+
* Entry: global_state = DSTATE_PRESCAN only if previously suspended.
|
95
|
+
* Exit: If done, returns TRUE and sets global_state for proper output mode.
|
96
|
+
* If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN.
|
97
|
+
*/
|
98
|
+
|
99
|
+
LOCAL(boolean)
|
100
|
+
output_pass_setup(j_decompress_ptr cinfo)
|
101
|
+
{
|
102
|
+
if (cinfo->global_state != DSTATE_PRESCAN) {
|
103
|
+
/* First call: do pass setup */
|
104
|
+
(*cinfo->master->prepare_for_output_pass) (cinfo);
|
105
|
+
cinfo->output_scanline = 0;
|
106
|
+
cinfo->global_state = DSTATE_PRESCAN;
|
107
|
+
}
|
108
|
+
/* Loop over any required dummy passes */
|
109
|
+
while (cinfo->master->is_dummy_pass) {
|
110
|
+
#ifdef QUANT_2PASS_SUPPORTED
|
111
|
+
/* Crank through the dummy pass */
|
112
|
+
while (cinfo->output_scanline < cinfo->output_height) {
|
113
|
+
JDIMENSION last_scanline;
|
114
|
+
/* Call progress monitor hook if present */
|
115
|
+
if (cinfo->progress != NULL) {
|
116
|
+
cinfo->progress->pass_counter = (long)cinfo->output_scanline;
|
117
|
+
cinfo->progress->pass_limit = (long)cinfo->output_height;
|
118
|
+
(*cinfo->progress->progress_monitor) ((j_common_ptr)cinfo);
|
119
|
+
}
|
120
|
+
/* Process some data */
|
121
|
+
last_scanline = cinfo->output_scanline;
|
122
|
+
(*cinfo->main->process_data) (cinfo, (JSAMPARRAY)NULL,
|
123
|
+
&cinfo->output_scanline, (JDIMENSION)0);
|
124
|
+
if (cinfo->output_scanline == last_scanline)
|
125
|
+
return FALSE; /* No progress made, must suspend */
|
126
|
+
}
|
127
|
+
/* Finish up dummy pass, and set up for another one */
|
128
|
+
(*cinfo->master->finish_output_pass) (cinfo);
|
129
|
+
(*cinfo->master->prepare_for_output_pass) (cinfo);
|
130
|
+
cinfo->output_scanline = 0;
|
131
|
+
#else
|
132
|
+
ERREXIT(cinfo, JERR_NOT_COMPILED);
|
133
|
+
#endif /* QUANT_2PASS_SUPPORTED */
|
134
|
+
}
|
135
|
+
/* Ready for application to drive output pass through
|
136
|
+
* jpeg_read_scanlines or jpeg_read_raw_data.
|
137
|
+
*/
|
138
|
+
cinfo->global_state = cinfo->raw_data_out ? DSTATE_RAW_OK : DSTATE_SCANNING;
|
139
|
+
return TRUE;
|
140
|
+
}
|
141
|
+
|
142
|
+
|
143
|
+
/*
|
144
|
+
* Enable partial scanline decompression
|
145
|
+
*
|
146
|
+
* Must be called after jpeg_start_decompress() and before any calls to
|
147
|
+
* jpeg_read_scanlines() or jpeg_skip_scanlines().
|
148
|
+
*
|
149
|
+
* Refer to libjpeg.txt for more information.
|
150
|
+
*/
|
151
|
+
|
152
|
+
GLOBAL(void)
|
153
|
+
jpeg_crop_scanline(j_decompress_ptr cinfo, JDIMENSION *xoffset,
|
154
|
+
JDIMENSION *width)
|
155
|
+
{
|
156
|
+
int ci, align, orig_downsampled_width;
|
157
|
+
JDIMENSION input_xoffset;
|
158
|
+
boolean reinit_upsampler = FALSE;
|
159
|
+
jpeg_component_info *compptr;
|
160
|
+
|
161
|
+
if (cinfo->global_state != DSTATE_SCANNING || cinfo->output_scanline != 0)
|
162
|
+
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
163
|
+
|
164
|
+
if (!xoffset || !width)
|
165
|
+
ERREXIT(cinfo, JERR_BAD_CROP_SPEC);
|
166
|
+
|
167
|
+
/* xoffset and width must fall within the output image dimensions. */
|
168
|
+
if (*width == 0 || *xoffset + *width > cinfo->output_width)
|
169
|
+
ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
|
170
|
+
|
171
|
+
/* No need to do anything if the caller wants the entire width. */
|
172
|
+
if (*width == cinfo->output_width)
|
173
|
+
return;
|
174
|
+
|
175
|
+
/* Ensuring the proper alignment of xoffset is tricky. At minimum, it
|
176
|
+
* must align with an MCU boundary, because:
|
177
|
+
*
|
178
|
+
* (1) The IDCT is performed in blocks, and it is not feasible to modify
|
179
|
+
* the algorithm so that it can transform partial blocks.
|
180
|
+
* (2) Because of the SIMD extensions, any input buffer passed to the
|
181
|
+
* upsampling and color conversion routines must be aligned to the
|
182
|
+
* SIMD word size (for instance, 128-bit in the case of SSE2.) The
|
183
|
+
* easiest way to accomplish this without copying data is to ensure
|
184
|
+
* that upsampling and color conversion begin at the start of the
|
185
|
+
* first MCU column that will be inverse transformed.
|
186
|
+
*
|
187
|
+
* In practice, we actually impose a stricter alignment requirement. We
|
188
|
+
* require that xoffset be a multiple of the maximum MCU column width of all
|
189
|
+
* of the components (the "iMCU column width.") This is to simplify the
|
190
|
+
* single-pass decompression case, allowing us to use the same MCU column
|
191
|
+
* width for all of the components.
|
192
|
+
*/
|
193
|
+
if (cinfo->comps_in_scan == 1 && cinfo->num_components == 1)
|
194
|
+
align = cinfo->_min_DCT_scaled_size;
|
195
|
+
else
|
196
|
+
align = cinfo->_min_DCT_scaled_size * cinfo->max_h_samp_factor;
|
197
|
+
|
198
|
+
/* Adjust xoffset to the nearest iMCU boundary <= the requested value */
|
199
|
+
input_xoffset = *xoffset;
|
200
|
+
*xoffset = (input_xoffset / align) * align;
|
201
|
+
|
202
|
+
/* Adjust the width so that the right edge of the output image is as
|
203
|
+
* requested (only the left edge is altered.) It is important that calling
|
204
|
+
* programs check this value after this function returns, so that they can
|
205
|
+
* allocate an output buffer with the appropriate size.
|
206
|
+
*/
|
207
|
+
*width = *width + input_xoffset - *xoffset;
|
208
|
+
cinfo->output_width = *width;
|
209
|
+
|
210
|
+
/* Set the first and last iMCU columns that we must decompress. These values
|
211
|
+
* will be used in single-scan decompressions.
|
212
|
+
*/
|
213
|
+
cinfo->master->first_iMCU_col = (JDIMENSION)(long)(*xoffset) / (long)align;
|
214
|
+
cinfo->master->last_iMCU_col =
|
215
|
+
(JDIMENSION)jdiv_round_up((long)(*xoffset + cinfo->output_width),
|
216
|
+
(long)align) - 1;
|
217
|
+
|
218
|
+
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
219
|
+
ci++, compptr++) {
|
220
|
+
int hsf = (cinfo->comps_in_scan == 1 && cinfo->num_components == 1) ?
|
221
|
+
1 : compptr->h_samp_factor;
|
222
|
+
|
223
|
+
/* Set downsampled_width to the new output width. */
|
224
|
+
orig_downsampled_width = compptr->downsampled_width;
|
225
|
+
compptr->downsampled_width =
|
226
|
+
(JDIMENSION)jdiv_round_up((long)(cinfo->output_width *
|
227
|
+
compptr->h_samp_factor),
|
228
|
+
(long)cinfo->max_h_samp_factor);
|
229
|
+
if (compptr->downsampled_width < 2 && orig_downsampled_width >= 2)
|
230
|
+
reinit_upsampler = TRUE;
|
231
|
+
|
232
|
+
/* Set the first and last iMCU columns that we must decompress. These
|
233
|
+
* values will be used in multi-scan decompressions.
|
234
|
+
*/
|
235
|
+
cinfo->master->first_MCU_col[ci] =
|
236
|
+
(JDIMENSION)(long)(*xoffset * hsf) / (long)align;
|
237
|
+
cinfo->master->last_MCU_col[ci] =
|
238
|
+
(JDIMENSION)jdiv_round_up((long)((*xoffset + cinfo->output_width) * hsf),
|
239
|
+
(long)align) - 1;
|
240
|
+
}
|
241
|
+
|
242
|
+
if (reinit_upsampler) {
|
243
|
+
cinfo->master->jinit_upsampler_no_alloc = TRUE;
|
244
|
+
jinit_upsampler(cinfo);
|
245
|
+
cinfo->master->jinit_upsampler_no_alloc = FALSE;
|
246
|
+
}
|
247
|
+
}
|
248
|
+
|
249
|
+
|
250
|
+
/*
|
251
|
+
* Read some scanlines of data from the JPEG decompressor.
|
252
|
+
*
|
253
|
+
* The return value will be the number of lines actually read.
|
254
|
+
* This may be less than the number requested in several cases,
|
255
|
+
* including bottom of image, data source suspension, and operating
|
256
|
+
* modes that emit multiple scanlines at a time.
|
257
|
+
*
|
258
|
+
* Note: we warn about excess calls to jpeg_read_scanlines() since
|
259
|
+
* this likely signals an application programmer error. However,
|
260
|
+
* an oversize buffer (max_lines > scanlines remaining) is not an error.
|
261
|
+
*/
|
262
|
+
|
263
|
+
GLOBAL(JDIMENSION)
|
264
|
+
jpeg_read_scanlines(j_decompress_ptr cinfo, JSAMPARRAY scanlines,
|
265
|
+
JDIMENSION max_lines)
|
266
|
+
{
|
267
|
+
JDIMENSION row_ctr;
|
268
|
+
|
269
|
+
if (cinfo->global_state != DSTATE_SCANNING)
|
270
|
+
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
271
|
+
if (cinfo->output_scanline >= cinfo->output_height) {
|
272
|
+
WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
|
273
|
+
return 0;
|
274
|
+
}
|
275
|
+
|
276
|
+
/* Call progress monitor hook if present */
|
277
|
+
if (cinfo->progress != NULL) {
|
278
|
+
cinfo->progress->pass_counter = (long)cinfo->output_scanline;
|
279
|
+
cinfo->progress->pass_limit = (long)cinfo->output_height;
|
280
|
+
(*cinfo->progress->progress_monitor) ((j_common_ptr)cinfo);
|
281
|
+
}
|
282
|
+
|
283
|
+
/* Process some data */
|
284
|
+
row_ctr = 0;
|
285
|
+
(*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, max_lines);
|
286
|
+
cinfo->output_scanline += row_ctr;
|
287
|
+
return row_ctr;
|
288
|
+
}
|
289
|
+
|
290
|
+
|
291
|
+
/* Dummy color convert function used by jpeg_skip_scanlines() */
|
292
|
+
LOCAL(void)
|
293
|
+
noop_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
294
|
+
JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)
|
295
|
+
{
|
296
|
+
}
|
297
|
+
|
298
|
+
|
299
|
+
/* Dummy quantize function used by jpeg_skip_scanlines() */
|
300
|
+
LOCAL(void)
|
301
|
+
noop_quantize(j_decompress_ptr cinfo, JSAMPARRAY input_buf,
|
302
|
+
JSAMPARRAY output_buf, int num_rows)
|
303
|
+
{
|
304
|
+
}
|
305
|
+
|
306
|
+
|
307
|
+
/*
|
308
|
+
* In some cases, it is best to call jpeg_read_scanlines() and discard the
|
309
|
+
* output, rather than skipping the scanlines, because this allows us to
|
310
|
+
* maintain the internal state of the context-based upsampler. In these cases,
|
311
|
+
* we set up and tear down a dummy color converter in order to avoid valgrind
|
312
|
+
* errors and to achieve the best possible performance.
|
313
|
+
*/
|
314
|
+
|
315
|
+
LOCAL(void)
|
316
|
+
read_and_discard_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines)
|
317
|
+
{
|
318
|
+
JDIMENSION n;
|
319
|
+
void (*color_convert) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
320
|
+
JDIMENSION input_row, JSAMPARRAY output_buf,
|
321
|
+
int num_rows) = NULL;
|
322
|
+
void (*color_quantize) (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
|
323
|
+
JSAMPARRAY output_buf, int num_rows) = NULL;
|
324
|
+
|
325
|
+
if (cinfo->cconvert && cinfo->cconvert->color_convert) {
|
326
|
+
color_convert = cinfo->cconvert->color_convert;
|
327
|
+
cinfo->cconvert->color_convert = noop_convert;
|
328
|
+
}
|
329
|
+
|
330
|
+
if (cinfo->cquantize && cinfo->cquantize->color_quantize) {
|
331
|
+
color_quantize = cinfo->cquantize->color_quantize;
|
332
|
+
cinfo->cquantize->color_quantize = noop_quantize;
|
333
|
+
}
|
334
|
+
|
335
|
+
for (n = 0; n < num_lines; n++)
|
336
|
+
jpeg_read_scanlines(cinfo, NULL, 1);
|
337
|
+
|
338
|
+
if (color_convert)
|
339
|
+
cinfo->cconvert->color_convert = color_convert;
|
340
|
+
|
341
|
+
if (color_quantize)
|
342
|
+
cinfo->cquantize->color_quantize = color_quantize;
|
343
|
+
}
|
344
|
+
|
345
|
+
|
346
|
+
/*
|
347
|
+
* Called by jpeg_skip_scanlines(). This partially skips a decompress block by
|
348
|
+
* incrementing the rowgroup counter.
|
349
|
+
*/
|
350
|
+
|
351
|
+
LOCAL(void)
|
352
|
+
increment_simple_rowgroup_ctr(j_decompress_ptr cinfo, JDIMENSION rows)
|
353
|
+
{
|
354
|
+
JDIMENSION rows_left;
|
355
|
+
my_main_ptr main_ptr = (my_main_ptr)cinfo->main;
|
356
|
+
|
357
|
+
/* Increment the counter to the next row group after the skipped rows. */
|
358
|
+
main_ptr->rowgroup_ctr += rows / cinfo->max_v_samp_factor;
|
359
|
+
|
360
|
+
/* Partially skipping a row group would involve modifying the internal state
|
361
|
+
* of the upsampler, so read the remaining rows into a dummy buffer instead.
|
362
|
+
*/
|
363
|
+
rows_left = rows % cinfo->max_v_samp_factor;
|
364
|
+
cinfo->output_scanline += rows - rows_left;
|
365
|
+
|
366
|
+
read_and_discard_scanlines(cinfo, rows_left);
|
367
|
+
}
|
368
|
+
|
369
|
+
/*
|
370
|
+
* Skips some scanlines of data from the JPEG decompressor.
|
371
|
+
*
|
372
|
+
* The return value will be the number of lines actually skipped. If skipping
|
373
|
+
* num_lines would move beyond the end of the image, then the actual number of
|
374
|
+
* lines remaining in the image is returned. Otherwise, the return value will
|
375
|
+
* be equal to num_lines.
|
376
|
+
*
|
377
|
+
* Refer to libjpeg.txt for more information.
|
378
|
+
*/
|
379
|
+
|
380
|
+
GLOBAL(JDIMENSION)
|
381
|
+
jpeg_skip_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines)
|
382
|
+
{
|
383
|
+
my_main_ptr main_ptr = (my_main_ptr)cinfo->main;
|
384
|
+
my_coef_ptr coef = (my_coef_ptr)cinfo->coef;
|
385
|
+
my_upsample_ptr upsample = (my_upsample_ptr)cinfo->upsample;
|
386
|
+
JDIMENSION i, x;
|
387
|
+
int y;
|
388
|
+
JDIMENSION lines_per_iMCU_row, lines_left_in_iMCU_row, lines_after_iMCU_row;
|
389
|
+
JDIMENSION lines_to_skip, lines_to_read;
|
390
|
+
|
391
|
+
if (cinfo->global_state != DSTATE_SCANNING)
|
392
|
+
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
393
|
+
|
394
|
+
/* Do not skip past the bottom of the image. */
|
395
|
+
if (cinfo->output_scanline + num_lines >= cinfo->output_height) {
|
396
|
+
cinfo->output_scanline = cinfo->output_height;
|
397
|
+
(*cinfo->inputctl->finish_input_pass) (cinfo);
|
398
|
+
cinfo->inputctl->eoi_reached = TRUE;
|
399
|
+
return cinfo->output_height - cinfo->output_scanline;
|
400
|
+
}
|
401
|
+
|
402
|
+
if (num_lines == 0)
|
403
|
+
return 0;
|
404
|
+
|
405
|
+
lines_per_iMCU_row = cinfo->_min_DCT_scaled_size * cinfo->max_v_samp_factor;
|
406
|
+
lines_left_in_iMCU_row =
|
407
|
+
(lines_per_iMCU_row - (cinfo->output_scanline % lines_per_iMCU_row)) %
|
408
|
+
lines_per_iMCU_row;
|
409
|
+
lines_after_iMCU_row = num_lines - lines_left_in_iMCU_row;
|
410
|
+
|
411
|
+
/* Skip the lines remaining in the current iMCU row. When upsampling
|
412
|
+
* requires context rows, we need the previous and next rows in order to read
|
413
|
+
* the current row. This adds some complexity.
|
414
|
+
*/
|
415
|
+
if (cinfo->upsample->need_context_rows) {
|
416
|
+
/* If the skipped lines would not move us past the current iMCU row, we
|
417
|
+
* read the lines and ignore them. There might be a faster way of doing
|
418
|
+
* this, but we are facing increasing complexity for diminishing returns.
|
419
|
+
* The increasing complexity would be a by-product of meddling with the
|
420
|
+
* state machine used to skip context rows. Near the end of an iMCU row,
|
421
|
+
* the next iMCU row may have already been entropy-decoded. In this unique
|
422
|
+
* case, we will read the next iMCU row if we cannot skip past it as well.
|
423
|
+
*/
|
424
|
+
if ((num_lines < lines_left_in_iMCU_row + 1) ||
|
425
|
+
(lines_left_in_iMCU_row <= 1 && main_ptr->buffer_full &&
|
426
|
+
lines_after_iMCU_row < lines_per_iMCU_row + 1)) {
|
427
|
+
read_and_discard_scanlines(cinfo, num_lines);
|
428
|
+
return num_lines;
|
429
|
+
}
|
430
|
+
|
431
|
+
/* If the next iMCU row has already been entropy-decoded, make sure that
|
432
|
+
* we do not skip too far.
|
433
|
+
*/
|
434
|
+
if (lines_left_in_iMCU_row <= 1 && main_ptr->buffer_full) {
|
435
|
+
cinfo->output_scanline += lines_left_in_iMCU_row + lines_per_iMCU_row;
|
436
|
+
lines_after_iMCU_row -= lines_per_iMCU_row;
|
437
|
+
} else {
|
438
|
+
cinfo->output_scanline += lines_left_in_iMCU_row;
|
439
|
+
}
|
440
|
+
|
441
|
+
/* If we have just completed the first block, adjust the buffer pointers */
|
442
|
+
if (main_ptr->iMCU_row_ctr == 0 ||
|
443
|
+
(main_ptr->iMCU_row_ctr == 1 && lines_left_in_iMCU_row > 2))
|
444
|
+
set_wraparound_pointers(cinfo);
|
445
|
+
main_ptr->buffer_full = FALSE;
|
446
|
+
main_ptr->rowgroup_ctr = 0;
|
447
|
+
main_ptr->context_state = CTX_PREPARE_FOR_IMCU;
|
448
|
+
upsample->next_row_out = cinfo->max_v_samp_factor;
|
449
|
+
upsample->rows_to_go = cinfo->output_height - cinfo->output_scanline;
|
450
|
+
}
|
451
|
+
|
452
|
+
/* Skipping is much simpler when context rows are not required. */
|
453
|
+
else {
|
454
|
+
if (num_lines < lines_left_in_iMCU_row) {
|
455
|
+
increment_simple_rowgroup_ctr(cinfo, num_lines);
|
456
|
+
return num_lines;
|
457
|
+
} else {
|
458
|
+
cinfo->output_scanline += lines_left_in_iMCU_row;
|
459
|
+
main_ptr->buffer_full = FALSE;
|
460
|
+
main_ptr->rowgroup_ctr = 0;
|
461
|
+
upsample->next_row_out = cinfo->max_v_samp_factor;
|
462
|
+
upsample->rows_to_go = cinfo->output_height - cinfo->output_scanline;
|
463
|
+
}
|
464
|
+
}
|
465
|
+
|
466
|
+
/* Calculate how many full iMCU rows we can skip. */
|
467
|
+
if (cinfo->upsample->need_context_rows)
|
468
|
+
lines_to_skip = ((lines_after_iMCU_row - 1) / lines_per_iMCU_row) *
|
469
|
+
lines_per_iMCU_row;
|
470
|
+
else
|
471
|
+
lines_to_skip = (lines_after_iMCU_row / lines_per_iMCU_row) *
|
472
|
+
lines_per_iMCU_row;
|
473
|
+
/* Calculate the number of lines that remain to be skipped after skipping all
|
474
|
+
* of the full iMCU rows that we can. We will not read these lines unless we
|
475
|
+
* have to.
|
476
|
+
*/
|
477
|
+
lines_to_read = lines_after_iMCU_row - lines_to_skip;
|
478
|
+
|
479
|
+
/* For images requiring multiple scans (progressive, non-interleaved, etc.),
|
480
|
+
* all of the entropy decoding occurs in jpeg_start_decompress(), assuming
|
481
|
+
* that the input data source is non-suspending. This makes skipping easy.
|
482
|
+
*/
|
483
|
+
if (cinfo->inputctl->has_multiple_scans) {
|
484
|
+
if (cinfo->upsample->need_context_rows) {
|
485
|
+
cinfo->output_scanline += lines_to_skip;
|
486
|
+
cinfo->output_iMCU_row += lines_to_skip / lines_per_iMCU_row;
|
487
|
+
main_ptr->iMCU_row_ctr += lines_to_skip / lines_per_iMCU_row;
|
488
|
+
/* It is complex to properly move to the middle of a context block, so
|
489
|
+
* read the remaining lines instead of skipping them.
|
490
|
+
*/
|
491
|
+
read_and_discard_scanlines(cinfo, lines_to_read);
|
492
|
+
} else {
|
493
|
+
cinfo->output_scanline += lines_to_skip;
|
494
|
+
cinfo->output_iMCU_row += lines_to_skip / lines_per_iMCU_row;
|
495
|
+
increment_simple_rowgroup_ctr(cinfo, lines_to_read);
|
496
|
+
}
|
497
|
+
upsample->rows_to_go = cinfo->output_height - cinfo->output_scanline;
|
498
|
+
return num_lines;
|
499
|
+
}
|
500
|
+
|
501
|
+
/* Skip the iMCU rows that we can safely skip. */
|
502
|
+
for (i = 0; i < lines_to_skip; i += lines_per_iMCU_row) {
|
503
|
+
for (y = 0; y < coef->MCU_rows_per_iMCU_row; y++) {
|
504
|
+
for (x = 0; x < cinfo->MCUs_per_row; x++) {
|
505
|
+
/* Calling decode_mcu() with a NULL pointer causes it to discard the
|
506
|
+
* decoded coefficients. This is ~5% faster for large subsets, but
|
507
|
+
* it's tough to tell a difference for smaller images.
|
508
|
+
*/
|
509
|
+
(*cinfo->entropy->decode_mcu) (cinfo, NULL);
|
510
|
+
}
|
511
|
+
}
|
512
|
+
cinfo->input_iMCU_row++;
|
513
|
+
cinfo->output_iMCU_row++;
|
514
|
+
if (cinfo->input_iMCU_row < cinfo->total_iMCU_rows)
|
515
|
+
start_iMCU_row(cinfo);
|
516
|
+
else
|
517
|
+
(*cinfo->inputctl->finish_input_pass) (cinfo);
|
518
|
+
}
|
519
|
+
cinfo->output_scanline += lines_to_skip;
|
520
|
+
|
521
|
+
if (cinfo->upsample->need_context_rows) {
|
522
|
+
/* Context-based upsampling keeps track of iMCU rows. */
|
523
|
+
main_ptr->iMCU_row_ctr += lines_to_skip / lines_per_iMCU_row;
|
524
|
+
|
525
|
+
/* It is complex to properly move to the middle of a context block, so
|
526
|
+
* read the remaining lines instead of skipping them.
|
527
|
+
*/
|
528
|
+
read_and_discard_scanlines(cinfo, lines_to_read);
|
529
|
+
} else {
|
530
|
+
increment_simple_rowgroup_ctr(cinfo, lines_to_read);
|
531
|
+
}
|
532
|
+
|
533
|
+
/* Since skipping lines involves skipping the upsampling step, the value of
|
534
|
+
* "rows_to_go" will become invalid unless we set it here. NOTE: This is a
|
535
|
+
* bit odd, since "rows_to_go" seems to be redundantly keeping track of
|
536
|
+
* output_scanline.
|
537
|
+
*/
|
538
|
+
upsample->rows_to_go = cinfo->output_height - cinfo->output_scanline;
|
539
|
+
|
540
|
+
/* Always skip the requested number of lines. */
|
541
|
+
return num_lines;
|
542
|
+
}
|
543
|
+
|
544
|
+
/*
|
545
|
+
* Alternate entry point to read raw data.
|
546
|
+
* Processes exactly one iMCU row per call, unless suspended.
|
547
|
+
*/
|
548
|
+
|
549
|
+
GLOBAL(JDIMENSION)
|
550
|
+
jpeg_read_raw_data(j_decompress_ptr cinfo, JSAMPIMAGE data,
|
551
|
+
JDIMENSION max_lines)
|
552
|
+
{
|
553
|
+
JDIMENSION lines_per_iMCU_row;
|
554
|
+
|
555
|
+
if (cinfo->global_state != DSTATE_RAW_OK)
|
556
|
+
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
557
|
+
if (cinfo->output_scanline >= cinfo->output_height) {
|
558
|
+
WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
|
559
|
+
return 0;
|
560
|
+
}
|
561
|
+
|
562
|
+
/* Call progress monitor hook if present */
|
563
|
+
if (cinfo->progress != NULL) {
|
564
|
+
cinfo->progress->pass_counter = (long)cinfo->output_scanline;
|
565
|
+
cinfo->progress->pass_limit = (long)cinfo->output_height;
|
566
|
+
(*cinfo->progress->progress_monitor) ((j_common_ptr)cinfo);
|
567
|
+
}
|
568
|
+
|
569
|
+
/* Verify that at least one iMCU row can be returned. */
|
570
|
+
lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->_min_DCT_scaled_size;
|
571
|
+
if (max_lines < lines_per_iMCU_row)
|
572
|
+
ERREXIT(cinfo, JERR_BUFFER_SIZE);
|
573
|
+
|
574
|
+
/* Decompress directly into user's buffer. */
|
575
|
+
if (!(*cinfo->coef->decompress_data) (cinfo, data))
|
576
|
+
return 0; /* suspension forced, can do nothing more */
|
577
|
+
|
578
|
+
/* OK, we processed one iMCU row. */
|
579
|
+
cinfo->output_scanline += lines_per_iMCU_row;
|
580
|
+
return lines_per_iMCU_row;
|
581
|
+
}
|
582
|
+
|
583
|
+
|
584
|
+
/* Additional entry points for buffered-image mode. */
|
585
|
+
|
586
|
+
#ifdef D_MULTISCAN_FILES_SUPPORTED
|
587
|
+
|
588
|
+
/*
|
589
|
+
* Initialize for an output pass in buffered-image mode.
|
590
|
+
*/
|
591
|
+
|
592
|
+
GLOBAL(boolean)
|
593
|
+
jpeg_start_output(j_decompress_ptr cinfo, int scan_number)
|
594
|
+
{
|
595
|
+
if (cinfo->global_state != DSTATE_BUFIMAGE &&
|
596
|
+
cinfo->global_state != DSTATE_PRESCAN)
|
597
|
+
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
598
|
+
/* Limit scan number to valid range */
|
599
|
+
if (scan_number <= 0)
|
600
|
+
scan_number = 1;
|
601
|
+
if (cinfo->inputctl->eoi_reached && scan_number > cinfo->input_scan_number)
|
602
|
+
scan_number = cinfo->input_scan_number;
|
603
|
+
cinfo->output_scan_number = scan_number;
|
604
|
+
/* Perform any dummy output passes, and set up for the real pass */
|
605
|
+
return output_pass_setup(cinfo);
|
606
|
+
}
|
607
|
+
|
608
|
+
|
609
|
+
/*
|
610
|
+
* Finish up after an output pass in buffered-image mode.
|
611
|
+
*
|
612
|
+
* Returns FALSE if suspended. The return value need be inspected only if
|
613
|
+
* a suspending data source is used.
|
614
|
+
*/
|
615
|
+
|
616
|
+
GLOBAL(boolean)
|
617
|
+
jpeg_finish_output(j_decompress_ptr cinfo)
|
618
|
+
{
|
619
|
+
if ((cinfo->global_state == DSTATE_SCANNING ||
|
620
|
+
cinfo->global_state == DSTATE_RAW_OK) && cinfo->buffered_image) {
|
621
|
+
/* Terminate this pass. */
|
622
|
+
/* We do not require the whole pass to have been completed. */
|
623
|
+
(*cinfo->master->finish_output_pass) (cinfo);
|
624
|
+
cinfo->global_state = DSTATE_BUFPOST;
|
625
|
+
} else if (cinfo->global_state != DSTATE_BUFPOST) {
|
626
|
+
/* BUFPOST = repeat call after a suspension, anything else is error */
|
627
|
+
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
628
|
+
}
|
629
|
+
/* Read markers looking for SOS or EOI */
|
630
|
+
while (cinfo->input_scan_number <= cinfo->output_scan_number &&
|
631
|
+
!cinfo->inputctl->eoi_reached) {
|
632
|
+
if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED)
|
633
|
+
return FALSE; /* Suspend, come back later */
|
634
|
+
}
|
635
|
+
cinfo->global_state = DSTATE_BUFIMAGE;
|
636
|
+
return TRUE;
|
637
|
+
}
|
638
|
+
|
639
|
+
#endif /* D_MULTISCAN_FILES_SUPPORTED */
|