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,541 @@
|
|
1
|
+
/*
|
2
|
+
* jcparam.c
|
3
|
+
*
|
4
|
+
* This file was part of the Independent JPEG Group's software:
|
5
|
+
* Copyright (C) 1991-1998, Thomas G. Lane.
|
6
|
+
* Modified 2003-2008 by Guido Vollbeding.
|
7
|
+
* libjpeg-turbo Modifications:
|
8
|
+
* Copyright (C) 2009-2011, 2018, D. R. Commander.
|
9
|
+
* For conditions of distribution and use, see the accompanying README.ijg
|
10
|
+
* file.
|
11
|
+
*
|
12
|
+
* This file contains optional default-setting code for the JPEG compressor.
|
13
|
+
* Applications do not have to use this file, but those that don't use it
|
14
|
+
* must know a lot more about the innards of the JPEG code.
|
15
|
+
*/
|
16
|
+
|
17
|
+
#define JPEG_INTERNALS
|
18
|
+
#include "jinclude.h"
|
19
|
+
#include "jpeglib.h"
|
20
|
+
#include "jstdhuff.c"
|
21
|
+
|
22
|
+
|
23
|
+
/*
|
24
|
+
* Quantization table setup routines
|
25
|
+
*/
|
26
|
+
|
27
|
+
GLOBAL(void)
|
28
|
+
jpeg_add_quant_table(j_compress_ptr cinfo, int which_tbl,
|
29
|
+
const unsigned int *basic_table, int scale_factor,
|
30
|
+
boolean force_baseline)
|
31
|
+
/* Define a quantization table equal to the basic_table times
|
32
|
+
* a scale factor (given as a percentage).
|
33
|
+
* If force_baseline is TRUE, the computed quantization table entries
|
34
|
+
* are limited to 1..255 for JPEG baseline compatibility.
|
35
|
+
*/
|
36
|
+
{
|
37
|
+
JQUANT_TBL **qtblptr;
|
38
|
+
int i;
|
39
|
+
long temp;
|
40
|
+
|
41
|
+
/* Safety check to ensure start_compress not called yet. */
|
42
|
+
if (cinfo->global_state != CSTATE_START)
|
43
|
+
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
44
|
+
|
45
|
+
if (which_tbl < 0 || which_tbl >= NUM_QUANT_TBLS)
|
46
|
+
ERREXIT1(cinfo, JERR_DQT_INDEX, which_tbl);
|
47
|
+
|
48
|
+
qtblptr = &cinfo->quant_tbl_ptrs[which_tbl];
|
49
|
+
|
50
|
+
if (*qtblptr == NULL)
|
51
|
+
*qtblptr = jpeg_alloc_quant_table((j_common_ptr)cinfo);
|
52
|
+
|
53
|
+
for (i = 0; i < DCTSIZE2; i++) {
|
54
|
+
temp = ((long)basic_table[i] * scale_factor + 50L) / 100L;
|
55
|
+
/* limit the values to the valid range */
|
56
|
+
if (temp <= 0L) temp = 1L;
|
57
|
+
if (temp > 32767L) temp = 32767L; /* max quantizer needed for 12 bits */
|
58
|
+
if (force_baseline && temp > 255L)
|
59
|
+
temp = 255L; /* limit to baseline range if requested */
|
60
|
+
(*qtblptr)->quantval[i] = (UINT16)temp;
|
61
|
+
}
|
62
|
+
|
63
|
+
/* Initialize sent_table FALSE so table will be written to JPEG file. */
|
64
|
+
(*qtblptr)->sent_table = FALSE;
|
65
|
+
}
|
66
|
+
|
67
|
+
|
68
|
+
/* These are the sample quantization tables given in Annex K (Clause K.1) of
|
69
|
+
* Recommendation ITU-T T.81 (1992) | ISO/IEC 10918-1:1994.
|
70
|
+
* The spec says that the values given produce "good" quality, and
|
71
|
+
* when divided by 2, "very good" quality.
|
72
|
+
*/
|
73
|
+
static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = {
|
74
|
+
16, 11, 10, 16, 24, 40, 51, 61,
|
75
|
+
12, 12, 14, 19, 26, 58, 60, 55,
|
76
|
+
14, 13, 16, 24, 40, 57, 69, 56,
|
77
|
+
14, 17, 22, 29, 51, 87, 80, 62,
|
78
|
+
18, 22, 37, 56, 68, 109, 103, 77,
|
79
|
+
24, 35, 55, 64, 81, 104, 113, 92,
|
80
|
+
49, 64, 78, 87, 103, 121, 120, 101,
|
81
|
+
72, 92, 95, 98, 112, 100, 103, 99
|
82
|
+
};
|
83
|
+
static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = {
|
84
|
+
17, 18, 24, 47, 99, 99, 99, 99,
|
85
|
+
18, 21, 26, 66, 99, 99, 99, 99,
|
86
|
+
24, 26, 56, 99, 99, 99, 99, 99,
|
87
|
+
47, 66, 99, 99, 99, 99, 99, 99,
|
88
|
+
99, 99, 99, 99, 99, 99, 99, 99,
|
89
|
+
99, 99, 99, 99, 99, 99, 99, 99,
|
90
|
+
99, 99, 99, 99, 99, 99, 99, 99,
|
91
|
+
99, 99, 99, 99, 99, 99, 99, 99
|
92
|
+
};
|
93
|
+
|
94
|
+
|
95
|
+
#if JPEG_LIB_VERSION >= 70
|
96
|
+
GLOBAL(void)
|
97
|
+
jpeg_default_qtables(j_compress_ptr cinfo, boolean force_baseline)
|
98
|
+
/* Set or change the 'quality' (quantization) setting, using default tables
|
99
|
+
* and straight percentage-scaling quality scales.
|
100
|
+
* This entry point allows different scalings for luminance and chrominance.
|
101
|
+
*/
|
102
|
+
{
|
103
|
+
/* Set up two quantization tables using the specified scaling */
|
104
|
+
jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl,
|
105
|
+
cinfo->q_scale_factor[0], force_baseline);
|
106
|
+
jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl,
|
107
|
+
cinfo->q_scale_factor[1], force_baseline);
|
108
|
+
}
|
109
|
+
#endif
|
110
|
+
|
111
|
+
|
112
|
+
GLOBAL(void)
|
113
|
+
jpeg_set_linear_quality(j_compress_ptr cinfo, int scale_factor,
|
114
|
+
boolean force_baseline)
|
115
|
+
/* Set or change the 'quality' (quantization) setting, using default tables
|
116
|
+
* and a straight percentage-scaling quality scale. In most cases it's better
|
117
|
+
* to use jpeg_set_quality (below); this entry point is provided for
|
118
|
+
* applications that insist on a linear percentage scaling.
|
119
|
+
*/
|
120
|
+
{
|
121
|
+
/* Set up two quantization tables using the specified scaling */
|
122
|
+
jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl,
|
123
|
+
scale_factor, force_baseline);
|
124
|
+
jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl,
|
125
|
+
scale_factor, force_baseline);
|
126
|
+
}
|
127
|
+
|
128
|
+
|
129
|
+
GLOBAL(int)
|
130
|
+
jpeg_quality_scaling(int quality)
|
131
|
+
/* Convert a user-specified quality rating to a percentage scaling factor
|
132
|
+
* for an underlying quantization table, using our recommended scaling curve.
|
133
|
+
* The input 'quality' factor should be 0 (terrible) to 100 (very good).
|
134
|
+
*/
|
135
|
+
{
|
136
|
+
/* Safety limit on quality factor. Convert 0 to 1 to avoid zero divide. */
|
137
|
+
if (quality <= 0) quality = 1;
|
138
|
+
if (quality > 100) quality = 100;
|
139
|
+
|
140
|
+
/* The basic table is used as-is (scaling 100) for a quality of 50.
|
141
|
+
* Qualities 50..100 are converted to scaling percentage 200 - 2*Q;
|
142
|
+
* note that at Q=100 the scaling is 0, which will cause jpeg_add_quant_table
|
143
|
+
* to make all the table entries 1 (hence, minimum quantization loss).
|
144
|
+
* Qualities 1..50 are converted to scaling percentage 5000/Q.
|
145
|
+
*/
|
146
|
+
if (quality < 50)
|
147
|
+
quality = 5000 / quality;
|
148
|
+
else
|
149
|
+
quality = 200 - quality * 2;
|
150
|
+
|
151
|
+
return quality;
|
152
|
+
}
|
153
|
+
|
154
|
+
|
155
|
+
GLOBAL(void)
|
156
|
+
jpeg_set_quality(j_compress_ptr cinfo, int quality, boolean force_baseline)
|
157
|
+
/* Set or change the 'quality' (quantization) setting, using default tables.
|
158
|
+
* This is the standard quality-adjusting entry point for typical user
|
159
|
+
* interfaces; only those who want detailed control over quantization tables
|
160
|
+
* would use the preceding three routines directly.
|
161
|
+
*/
|
162
|
+
{
|
163
|
+
/* Convert user 0-100 rating to percentage scaling */
|
164
|
+
quality = jpeg_quality_scaling(quality);
|
165
|
+
|
166
|
+
/* Set up standard quality tables */
|
167
|
+
jpeg_set_linear_quality(cinfo, quality, force_baseline);
|
168
|
+
}
|
169
|
+
|
170
|
+
|
171
|
+
/*
|
172
|
+
* Default parameter setup for compression.
|
173
|
+
*
|
174
|
+
* Applications that don't choose to use this routine must do their
|
175
|
+
* own setup of all these parameters. Alternately, you can call this
|
176
|
+
* to establish defaults and then alter parameters selectively. This
|
177
|
+
* is the recommended approach since, if we add any new parameters,
|
178
|
+
* your code will still work (they'll be set to reasonable defaults).
|
179
|
+
*/
|
180
|
+
|
181
|
+
GLOBAL(void)
|
182
|
+
jpeg_set_defaults(j_compress_ptr cinfo)
|
183
|
+
{
|
184
|
+
int i;
|
185
|
+
|
186
|
+
/* Safety check to ensure start_compress not called yet. */
|
187
|
+
if (cinfo->global_state != CSTATE_START)
|
188
|
+
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
189
|
+
|
190
|
+
/* Allocate comp_info array large enough for maximum component count.
|
191
|
+
* Array is made permanent in case application wants to compress
|
192
|
+
* multiple images at same param settings.
|
193
|
+
*/
|
194
|
+
if (cinfo->comp_info == NULL)
|
195
|
+
cinfo->comp_info = (jpeg_component_info *)
|
196
|
+
(*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_PERMANENT,
|
197
|
+
MAX_COMPONENTS * sizeof(jpeg_component_info));
|
198
|
+
|
199
|
+
/* Initialize everything not dependent on the color space */
|
200
|
+
|
201
|
+
#if JPEG_LIB_VERSION >= 70
|
202
|
+
cinfo->scale_num = 1; /* 1:1 scaling */
|
203
|
+
cinfo->scale_denom = 1;
|
204
|
+
#endif
|
205
|
+
cinfo->data_precision = BITS_IN_JSAMPLE;
|
206
|
+
/* Set up two quantization tables using default quality of 75 */
|
207
|
+
jpeg_set_quality(cinfo, 75, TRUE);
|
208
|
+
/* Set up two Huffman tables */
|
209
|
+
std_huff_tables((j_common_ptr)cinfo);
|
210
|
+
|
211
|
+
/* Initialize default arithmetic coding conditioning */
|
212
|
+
for (i = 0; i < NUM_ARITH_TBLS; i++) {
|
213
|
+
cinfo->arith_dc_L[i] = 0;
|
214
|
+
cinfo->arith_dc_U[i] = 1;
|
215
|
+
cinfo->arith_ac_K[i] = 5;
|
216
|
+
}
|
217
|
+
|
218
|
+
/* Default is no multiple-scan output */
|
219
|
+
cinfo->scan_info = NULL;
|
220
|
+
cinfo->num_scans = 0;
|
221
|
+
|
222
|
+
/* Expect normal source image, not raw downsampled data */
|
223
|
+
cinfo->raw_data_in = FALSE;
|
224
|
+
|
225
|
+
/* Use Huffman coding, not arithmetic coding, by default */
|
226
|
+
cinfo->arith_code = FALSE;
|
227
|
+
|
228
|
+
/* By default, don't do extra passes to optimize entropy coding */
|
229
|
+
cinfo->optimize_coding = FALSE;
|
230
|
+
/* The standard Huffman tables are only valid for 8-bit data precision.
|
231
|
+
* If the precision is higher, force optimization on so that usable
|
232
|
+
* tables will be computed. This test can be removed if default tables
|
233
|
+
* are supplied that are valid for the desired precision.
|
234
|
+
*/
|
235
|
+
if (cinfo->data_precision > 8)
|
236
|
+
cinfo->optimize_coding = TRUE;
|
237
|
+
|
238
|
+
/* By default, use the simpler non-cosited sampling alignment */
|
239
|
+
cinfo->CCIR601_sampling = FALSE;
|
240
|
+
|
241
|
+
#if JPEG_LIB_VERSION >= 70
|
242
|
+
/* By default, apply fancy downsampling */
|
243
|
+
cinfo->do_fancy_downsampling = TRUE;
|
244
|
+
#endif
|
245
|
+
|
246
|
+
/* No input smoothing */
|
247
|
+
cinfo->smoothing_factor = 0;
|
248
|
+
|
249
|
+
/* DCT algorithm preference */
|
250
|
+
cinfo->dct_method = JDCT_DEFAULT;
|
251
|
+
|
252
|
+
/* No restart markers */
|
253
|
+
cinfo->restart_interval = 0;
|
254
|
+
cinfo->restart_in_rows = 0;
|
255
|
+
|
256
|
+
/* Fill in default JFIF marker parameters. Note that whether the marker
|
257
|
+
* will actually be written is determined by jpeg_set_colorspace.
|
258
|
+
*
|
259
|
+
* By default, the library emits JFIF version code 1.01.
|
260
|
+
* An application that wants to emit JFIF 1.02 extension markers should set
|
261
|
+
* JFIF_minor_version to 2. We could probably get away with just defaulting
|
262
|
+
* to 1.02, but there may still be some decoders in use that will complain
|
263
|
+
* about that; saying 1.01 should minimize compatibility problems.
|
264
|
+
*/
|
265
|
+
cinfo->JFIF_major_version = 1; /* Default JFIF version = 1.01 */
|
266
|
+
cinfo->JFIF_minor_version = 1;
|
267
|
+
cinfo->density_unit = 0; /* Pixel size is unknown by default */
|
268
|
+
cinfo->X_density = 1; /* Pixel aspect ratio is square by default */
|
269
|
+
cinfo->Y_density = 1;
|
270
|
+
|
271
|
+
/* Choose JPEG colorspace based on input space, set defaults accordingly */
|
272
|
+
|
273
|
+
jpeg_default_colorspace(cinfo);
|
274
|
+
}
|
275
|
+
|
276
|
+
|
277
|
+
/*
|
278
|
+
* Select an appropriate JPEG colorspace for in_color_space.
|
279
|
+
*/
|
280
|
+
|
281
|
+
GLOBAL(void)
|
282
|
+
jpeg_default_colorspace(j_compress_ptr cinfo)
|
283
|
+
{
|
284
|
+
switch (cinfo->in_color_space) {
|
285
|
+
case JCS_GRAYSCALE:
|
286
|
+
jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
|
287
|
+
break;
|
288
|
+
case JCS_RGB:
|
289
|
+
case JCS_EXT_RGB:
|
290
|
+
case JCS_EXT_RGBX:
|
291
|
+
case JCS_EXT_BGR:
|
292
|
+
case JCS_EXT_BGRX:
|
293
|
+
case JCS_EXT_XBGR:
|
294
|
+
case JCS_EXT_XRGB:
|
295
|
+
case JCS_EXT_RGBA:
|
296
|
+
case JCS_EXT_BGRA:
|
297
|
+
case JCS_EXT_ABGR:
|
298
|
+
case JCS_EXT_ARGB:
|
299
|
+
jpeg_set_colorspace(cinfo, JCS_YCbCr);
|
300
|
+
break;
|
301
|
+
case JCS_YCbCr:
|
302
|
+
jpeg_set_colorspace(cinfo, JCS_YCbCr);
|
303
|
+
break;
|
304
|
+
case JCS_CMYK:
|
305
|
+
jpeg_set_colorspace(cinfo, JCS_CMYK); /* By default, no translation */
|
306
|
+
break;
|
307
|
+
case JCS_YCCK:
|
308
|
+
jpeg_set_colorspace(cinfo, JCS_YCCK);
|
309
|
+
break;
|
310
|
+
case JCS_UNKNOWN:
|
311
|
+
jpeg_set_colorspace(cinfo, JCS_UNKNOWN);
|
312
|
+
break;
|
313
|
+
default:
|
314
|
+
ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
|
315
|
+
}
|
316
|
+
}
|
317
|
+
|
318
|
+
|
319
|
+
/*
|
320
|
+
* Set the JPEG colorspace, and choose colorspace-dependent default values.
|
321
|
+
*/
|
322
|
+
|
323
|
+
GLOBAL(void)
|
324
|
+
jpeg_set_colorspace(j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
|
325
|
+
{
|
326
|
+
jpeg_component_info *compptr;
|
327
|
+
int ci;
|
328
|
+
|
329
|
+
#define SET_COMP(index, id, hsamp, vsamp, quant, dctbl, actbl) \
|
330
|
+
(compptr = &cinfo->comp_info[index], \
|
331
|
+
compptr->component_id = (id), \
|
332
|
+
compptr->h_samp_factor = (hsamp), \
|
333
|
+
compptr->v_samp_factor = (vsamp), \
|
334
|
+
compptr->quant_tbl_no = (quant), \
|
335
|
+
compptr->dc_tbl_no = (dctbl), \
|
336
|
+
compptr->ac_tbl_no = (actbl) )
|
337
|
+
|
338
|
+
/* Safety check to ensure start_compress not called yet. */
|
339
|
+
if (cinfo->global_state != CSTATE_START)
|
340
|
+
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
341
|
+
|
342
|
+
/* For all colorspaces, we use Q and Huff tables 0 for luminance components,
|
343
|
+
* tables 1 for chrominance components.
|
344
|
+
*/
|
345
|
+
|
346
|
+
cinfo->jpeg_color_space = colorspace;
|
347
|
+
|
348
|
+
cinfo->write_JFIF_header = FALSE; /* No marker for non-JFIF colorspaces */
|
349
|
+
cinfo->write_Adobe_marker = FALSE; /* write no Adobe marker by default */
|
350
|
+
|
351
|
+
switch (colorspace) {
|
352
|
+
case JCS_GRAYSCALE:
|
353
|
+
cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */
|
354
|
+
cinfo->num_components = 1;
|
355
|
+
/* JFIF specifies component ID 1 */
|
356
|
+
SET_COMP(0, 1, 1, 1, 0, 0, 0);
|
357
|
+
break;
|
358
|
+
case JCS_RGB:
|
359
|
+
cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag RGB */
|
360
|
+
cinfo->num_components = 3;
|
361
|
+
SET_COMP(0, 0x52 /* 'R' */, 1, 1, 0, 0, 0);
|
362
|
+
SET_COMP(1, 0x47 /* 'G' */, 1, 1, 0, 0, 0);
|
363
|
+
SET_COMP(2, 0x42 /* 'B' */, 1, 1, 0, 0, 0);
|
364
|
+
break;
|
365
|
+
case JCS_YCbCr:
|
366
|
+
cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */
|
367
|
+
cinfo->num_components = 3;
|
368
|
+
/* JFIF specifies component IDs 1,2,3 */
|
369
|
+
/* We default to 2x2 subsamples of chrominance */
|
370
|
+
SET_COMP(0, 1, 2, 2, 0, 0, 0);
|
371
|
+
SET_COMP(1, 2, 1, 1, 1, 1, 1);
|
372
|
+
SET_COMP(2, 3, 1, 1, 1, 1, 1);
|
373
|
+
break;
|
374
|
+
case JCS_CMYK:
|
375
|
+
cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag CMYK */
|
376
|
+
cinfo->num_components = 4;
|
377
|
+
SET_COMP(0, 0x43 /* 'C' */, 1, 1, 0, 0, 0);
|
378
|
+
SET_COMP(1, 0x4D /* 'M' */, 1, 1, 0, 0, 0);
|
379
|
+
SET_COMP(2, 0x59 /* 'Y' */, 1, 1, 0, 0, 0);
|
380
|
+
SET_COMP(3, 0x4B /* 'K' */, 1, 1, 0, 0, 0);
|
381
|
+
break;
|
382
|
+
case JCS_YCCK:
|
383
|
+
cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag YCCK */
|
384
|
+
cinfo->num_components = 4;
|
385
|
+
SET_COMP(0, 1, 2, 2, 0, 0, 0);
|
386
|
+
SET_COMP(1, 2, 1, 1, 1, 1, 1);
|
387
|
+
SET_COMP(2, 3, 1, 1, 1, 1, 1);
|
388
|
+
SET_COMP(3, 4, 2, 2, 0, 0, 0);
|
389
|
+
break;
|
390
|
+
case JCS_UNKNOWN:
|
391
|
+
cinfo->num_components = cinfo->input_components;
|
392
|
+
if (cinfo->num_components < 1 || cinfo->num_components > MAX_COMPONENTS)
|
393
|
+
ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
|
394
|
+
MAX_COMPONENTS);
|
395
|
+
for (ci = 0; ci < cinfo->num_components; ci++) {
|
396
|
+
SET_COMP(ci, ci, 1, 1, 0, 0, 0);
|
397
|
+
}
|
398
|
+
break;
|
399
|
+
default:
|
400
|
+
ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
|
401
|
+
}
|
402
|
+
}
|
403
|
+
|
404
|
+
|
405
|
+
#ifdef C_PROGRESSIVE_SUPPORTED
|
406
|
+
|
407
|
+
LOCAL(jpeg_scan_info *)
|
408
|
+
fill_a_scan(jpeg_scan_info *scanptr, int ci, int Ss, int Se, int Ah, int Al)
|
409
|
+
/* Support routine: generate one scan for specified component */
|
410
|
+
{
|
411
|
+
scanptr->comps_in_scan = 1;
|
412
|
+
scanptr->component_index[0] = ci;
|
413
|
+
scanptr->Ss = Ss;
|
414
|
+
scanptr->Se = Se;
|
415
|
+
scanptr->Ah = Ah;
|
416
|
+
scanptr->Al = Al;
|
417
|
+
scanptr++;
|
418
|
+
return scanptr;
|
419
|
+
}
|
420
|
+
|
421
|
+
LOCAL(jpeg_scan_info *)
|
422
|
+
fill_scans(jpeg_scan_info *scanptr, int ncomps, int Ss, int Se, int Ah, int Al)
|
423
|
+
/* Support routine: generate one scan for each component */
|
424
|
+
{
|
425
|
+
int ci;
|
426
|
+
|
427
|
+
for (ci = 0; ci < ncomps; ci++) {
|
428
|
+
scanptr->comps_in_scan = 1;
|
429
|
+
scanptr->component_index[0] = ci;
|
430
|
+
scanptr->Ss = Ss;
|
431
|
+
scanptr->Se = Se;
|
432
|
+
scanptr->Ah = Ah;
|
433
|
+
scanptr->Al = Al;
|
434
|
+
scanptr++;
|
435
|
+
}
|
436
|
+
return scanptr;
|
437
|
+
}
|
438
|
+
|
439
|
+
LOCAL(jpeg_scan_info *)
|
440
|
+
fill_dc_scans(jpeg_scan_info *scanptr, int ncomps, int Ah, int Al)
|
441
|
+
/* Support routine: generate interleaved DC scan if possible, else N scans */
|
442
|
+
{
|
443
|
+
int ci;
|
444
|
+
|
445
|
+
if (ncomps <= MAX_COMPS_IN_SCAN) {
|
446
|
+
/* Single interleaved DC scan */
|
447
|
+
scanptr->comps_in_scan = ncomps;
|
448
|
+
for (ci = 0; ci < ncomps; ci++)
|
449
|
+
scanptr->component_index[ci] = ci;
|
450
|
+
scanptr->Ss = scanptr->Se = 0;
|
451
|
+
scanptr->Ah = Ah;
|
452
|
+
scanptr->Al = Al;
|
453
|
+
scanptr++;
|
454
|
+
} else {
|
455
|
+
/* Noninterleaved DC scan for each component */
|
456
|
+
scanptr = fill_scans(scanptr, ncomps, 0, 0, Ah, Al);
|
457
|
+
}
|
458
|
+
return scanptr;
|
459
|
+
}
|
460
|
+
|
461
|
+
|
462
|
+
/*
|
463
|
+
* Create a recommended progressive-JPEG script.
|
464
|
+
* cinfo->num_components and cinfo->jpeg_color_space must be correct.
|
465
|
+
*/
|
466
|
+
|
467
|
+
GLOBAL(void)
|
468
|
+
jpeg_simple_progression(j_compress_ptr cinfo)
|
469
|
+
{
|
470
|
+
int ncomps = cinfo->num_components;
|
471
|
+
int nscans;
|
472
|
+
jpeg_scan_info *scanptr;
|
473
|
+
|
474
|
+
/* Safety check to ensure start_compress not called yet. */
|
475
|
+
if (cinfo->global_state != CSTATE_START)
|
476
|
+
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
477
|
+
|
478
|
+
/* Figure space needed for script. Calculation must match code below! */
|
479
|
+
if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) {
|
480
|
+
/* Custom script for YCbCr color images. */
|
481
|
+
nscans = 10;
|
482
|
+
} else {
|
483
|
+
/* All-purpose script for other color spaces. */
|
484
|
+
if (ncomps > MAX_COMPS_IN_SCAN)
|
485
|
+
nscans = 6 * ncomps; /* 2 DC + 4 AC scans per component */
|
486
|
+
else
|
487
|
+
nscans = 2 + 4 * ncomps; /* 2 DC scans; 4 AC scans per component */
|
488
|
+
}
|
489
|
+
|
490
|
+
/* Allocate space for script.
|
491
|
+
* We need to put it in the permanent pool in case the application performs
|
492
|
+
* multiple compressions without changing the settings. To avoid a memory
|
493
|
+
* leak if jpeg_simple_progression is called repeatedly for the same JPEG
|
494
|
+
* object, we try to re-use previously allocated space, and we allocate
|
495
|
+
* enough space to handle YCbCr even if initially asked for grayscale.
|
496
|
+
*/
|
497
|
+
if (cinfo->script_space == NULL || cinfo->script_space_size < nscans) {
|
498
|
+
cinfo->script_space_size = MAX(nscans, 10);
|
499
|
+
cinfo->script_space = (jpeg_scan_info *)
|
500
|
+
(*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_PERMANENT,
|
501
|
+
cinfo->script_space_size * sizeof(jpeg_scan_info));
|
502
|
+
}
|
503
|
+
scanptr = cinfo->script_space;
|
504
|
+
cinfo->scan_info = scanptr;
|
505
|
+
cinfo->num_scans = nscans;
|
506
|
+
|
507
|
+
if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) {
|
508
|
+
/* Custom script for YCbCr color images. */
|
509
|
+
/* Initial DC scan */
|
510
|
+
scanptr = fill_dc_scans(scanptr, ncomps, 0, 1);
|
511
|
+
/* Initial AC scan: get some luma data out in a hurry */
|
512
|
+
scanptr = fill_a_scan(scanptr, 0, 1, 5, 0, 2);
|
513
|
+
/* Chroma data is too small to be worth expending many scans on */
|
514
|
+
scanptr = fill_a_scan(scanptr, 2, 1, 63, 0, 1);
|
515
|
+
scanptr = fill_a_scan(scanptr, 1, 1, 63, 0, 1);
|
516
|
+
/* Complete spectral selection for luma AC */
|
517
|
+
scanptr = fill_a_scan(scanptr, 0, 6, 63, 0, 2);
|
518
|
+
/* Refine next bit of luma AC */
|
519
|
+
scanptr = fill_a_scan(scanptr, 0, 1, 63, 2, 1);
|
520
|
+
/* Finish DC successive approximation */
|
521
|
+
scanptr = fill_dc_scans(scanptr, ncomps, 1, 0);
|
522
|
+
/* Finish AC successive approximation */
|
523
|
+
scanptr = fill_a_scan(scanptr, 2, 1, 63, 1, 0);
|
524
|
+
scanptr = fill_a_scan(scanptr, 1, 1, 63, 1, 0);
|
525
|
+
/* Luma bottom bit comes last since it's usually largest scan */
|
526
|
+
scanptr = fill_a_scan(scanptr, 0, 1, 63, 1, 0);
|
527
|
+
} else {
|
528
|
+
/* All-purpose script for other color spaces. */
|
529
|
+
/* Successive approximation first pass */
|
530
|
+
scanptr = fill_dc_scans(scanptr, ncomps, 0, 1);
|
531
|
+
scanptr = fill_scans(scanptr, ncomps, 1, 5, 0, 2);
|
532
|
+
scanptr = fill_scans(scanptr, ncomps, 6, 63, 0, 2);
|
533
|
+
/* Successive approximation second pass */
|
534
|
+
scanptr = fill_scans(scanptr, ncomps, 1, 63, 2, 1);
|
535
|
+
/* Successive approximation final pass */
|
536
|
+
scanptr = fill_dc_scans(scanptr, ncomps, 1, 0);
|
537
|
+
scanptr = fill_scans(scanptr, ncomps, 1, 63, 1, 0);
|
538
|
+
}
|
539
|
+
}
|
540
|
+
|
541
|
+
#endif /* C_PROGRESSIVE_SUPPORTED */
|