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,664 @@
|
|
1
|
+
/*
|
2
|
+
* jcmarker.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-2010 by Guido Vollbeding.
|
7
|
+
* libjpeg-turbo Modifications:
|
8
|
+
* Copyright (C) 2010, D. R. Commander.
|
9
|
+
* For conditions of distribution and use, see the accompanying README.ijg
|
10
|
+
* file.
|
11
|
+
*
|
12
|
+
* This file contains routines to write JPEG datastream markers.
|
13
|
+
*/
|
14
|
+
|
15
|
+
#define JPEG_INTERNALS
|
16
|
+
#include "jinclude.h"
|
17
|
+
#include "jpeglib.h"
|
18
|
+
#include "jpegcomp.h"
|
19
|
+
|
20
|
+
|
21
|
+
typedef enum { /* JPEG marker codes */
|
22
|
+
M_SOF0 = 0xc0,
|
23
|
+
M_SOF1 = 0xc1,
|
24
|
+
M_SOF2 = 0xc2,
|
25
|
+
M_SOF3 = 0xc3,
|
26
|
+
|
27
|
+
M_SOF5 = 0xc5,
|
28
|
+
M_SOF6 = 0xc6,
|
29
|
+
M_SOF7 = 0xc7,
|
30
|
+
|
31
|
+
M_JPG = 0xc8,
|
32
|
+
M_SOF9 = 0xc9,
|
33
|
+
M_SOF10 = 0xca,
|
34
|
+
M_SOF11 = 0xcb,
|
35
|
+
|
36
|
+
M_SOF13 = 0xcd,
|
37
|
+
M_SOF14 = 0xce,
|
38
|
+
M_SOF15 = 0xcf,
|
39
|
+
|
40
|
+
M_DHT = 0xc4,
|
41
|
+
|
42
|
+
M_DAC = 0xcc,
|
43
|
+
|
44
|
+
M_RST0 = 0xd0,
|
45
|
+
M_RST1 = 0xd1,
|
46
|
+
M_RST2 = 0xd2,
|
47
|
+
M_RST3 = 0xd3,
|
48
|
+
M_RST4 = 0xd4,
|
49
|
+
M_RST5 = 0xd5,
|
50
|
+
M_RST6 = 0xd6,
|
51
|
+
M_RST7 = 0xd7,
|
52
|
+
|
53
|
+
M_SOI = 0xd8,
|
54
|
+
M_EOI = 0xd9,
|
55
|
+
M_SOS = 0xda,
|
56
|
+
M_DQT = 0xdb,
|
57
|
+
M_DNL = 0xdc,
|
58
|
+
M_DRI = 0xdd,
|
59
|
+
M_DHP = 0xde,
|
60
|
+
M_EXP = 0xdf,
|
61
|
+
|
62
|
+
M_APP0 = 0xe0,
|
63
|
+
M_APP1 = 0xe1,
|
64
|
+
M_APP2 = 0xe2,
|
65
|
+
M_APP3 = 0xe3,
|
66
|
+
M_APP4 = 0xe4,
|
67
|
+
M_APP5 = 0xe5,
|
68
|
+
M_APP6 = 0xe6,
|
69
|
+
M_APP7 = 0xe7,
|
70
|
+
M_APP8 = 0xe8,
|
71
|
+
M_APP9 = 0xe9,
|
72
|
+
M_APP10 = 0xea,
|
73
|
+
M_APP11 = 0xeb,
|
74
|
+
M_APP12 = 0xec,
|
75
|
+
M_APP13 = 0xed,
|
76
|
+
M_APP14 = 0xee,
|
77
|
+
M_APP15 = 0xef,
|
78
|
+
|
79
|
+
M_JPG0 = 0xf0,
|
80
|
+
M_JPG13 = 0xfd,
|
81
|
+
M_COM = 0xfe,
|
82
|
+
|
83
|
+
M_TEM = 0x01,
|
84
|
+
|
85
|
+
M_ERROR = 0x100
|
86
|
+
} JPEG_MARKER;
|
87
|
+
|
88
|
+
|
89
|
+
/* Private state */
|
90
|
+
|
91
|
+
typedef struct {
|
92
|
+
struct jpeg_marker_writer pub; /* public fields */
|
93
|
+
|
94
|
+
unsigned int last_restart_interval; /* last DRI value emitted; 0 after SOI */
|
95
|
+
} my_marker_writer;
|
96
|
+
|
97
|
+
typedef my_marker_writer *my_marker_ptr;
|
98
|
+
|
99
|
+
|
100
|
+
/*
|
101
|
+
* Basic output routines.
|
102
|
+
*
|
103
|
+
* Note that we do not support suspension while writing a marker.
|
104
|
+
* Therefore, an application using suspension must ensure that there is
|
105
|
+
* enough buffer space for the initial markers (typ. 600-700 bytes) before
|
106
|
+
* calling jpeg_start_compress, and enough space to write the trailing EOI
|
107
|
+
* (a few bytes) before calling jpeg_finish_compress. Multipass compression
|
108
|
+
* modes are not supported at all with suspension, so those two are the only
|
109
|
+
* points where markers will be written.
|
110
|
+
*/
|
111
|
+
|
112
|
+
LOCAL(void)
|
113
|
+
emit_byte(j_compress_ptr cinfo, int val)
|
114
|
+
/* Emit a byte */
|
115
|
+
{
|
116
|
+
struct jpeg_destination_mgr *dest = cinfo->dest;
|
117
|
+
|
118
|
+
*(dest->next_output_byte)++ = (JOCTET)val;
|
119
|
+
if (--dest->free_in_buffer == 0) {
|
120
|
+
if (!(*dest->empty_output_buffer) (cinfo))
|
121
|
+
ERREXIT(cinfo, JERR_CANT_SUSPEND);
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
|
126
|
+
LOCAL(void)
|
127
|
+
emit_marker(j_compress_ptr cinfo, JPEG_MARKER mark)
|
128
|
+
/* Emit a marker code */
|
129
|
+
{
|
130
|
+
emit_byte(cinfo, 0xFF);
|
131
|
+
emit_byte(cinfo, (int)mark);
|
132
|
+
}
|
133
|
+
|
134
|
+
|
135
|
+
LOCAL(void)
|
136
|
+
emit_2bytes(j_compress_ptr cinfo, int value)
|
137
|
+
/* Emit a 2-byte integer; these are always MSB first in JPEG files */
|
138
|
+
{
|
139
|
+
emit_byte(cinfo, (value >> 8) & 0xFF);
|
140
|
+
emit_byte(cinfo, value & 0xFF);
|
141
|
+
}
|
142
|
+
|
143
|
+
|
144
|
+
/*
|
145
|
+
* Routines to write specific marker types.
|
146
|
+
*/
|
147
|
+
|
148
|
+
LOCAL(int)
|
149
|
+
emit_dqt(j_compress_ptr cinfo, int index)
|
150
|
+
/* Emit a DQT marker */
|
151
|
+
/* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */
|
152
|
+
{
|
153
|
+
JQUANT_TBL *qtbl = cinfo->quant_tbl_ptrs[index];
|
154
|
+
int prec;
|
155
|
+
int i;
|
156
|
+
|
157
|
+
if (qtbl == NULL)
|
158
|
+
ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index);
|
159
|
+
|
160
|
+
prec = 0;
|
161
|
+
for (i = 0; i < DCTSIZE2; i++) {
|
162
|
+
if (qtbl->quantval[i] > 255)
|
163
|
+
prec = 1;
|
164
|
+
}
|
165
|
+
|
166
|
+
if (!qtbl->sent_table) {
|
167
|
+
emit_marker(cinfo, M_DQT);
|
168
|
+
|
169
|
+
emit_2bytes(cinfo, prec ? DCTSIZE2 * 2 + 1 + 2 : DCTSIZE2 + 1 + 2);
|
170
|
+
|
171
|
+
emit_byte(cinfo, index + (prec << 4));
|
172
|
+
|
173
|
+
for (i = 0; i < DCTSIZE2; i++) {
|
174
|
+
/* The table entries must be emitted in zigzag order. */
|
175
|
+
unsigned int qval = qtbl->quantval[jpeg_natural_order[i]];
|
176
|
+
if (prec)
|
177
|
+
emit_byte(cinfo, (int)(qval >> 8));
|
178
|
+
emit_byte(cinfo, (int)(qval & 0xFF));
|
179
|
+
}
|
180
|
+
|
181
|
+
qtbl->sent_table = TRUE;
|
182
|
+
}
|
183
|
+
|
184
|
+
return prec;
|
185
|
+
}
|
186
|
+
|
187
|
+
|
188
|
+
LOCAL(void)
|
189
|
+
emit_dht(j_compress_ptr cinfo, int index, boolean is_ac)
|
190
|
+
/* Emit a DHT marker */
|
191
|
+
{
|
192
|
+
JHUFF_TBL *htbl;
|
193
|
+
int length, i;
|
194
|
+
|
195
|
+
if (is_ac) {
|
196
|
+
htbl = cinfo->ac_huff_tbl_ptrs[index];
|
197
|
+
index += 0x10; /* output index has AC bit set */
|
198
|
+
} else {
|
199
|
+
htbl = cinfo->dc_huff_tbl_ptrs[index];
|
200
|
+
}
|
201
|
+
|
202
|
+
if (htbl == NULL)
|
203
|
+
ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index);
|
204
|
+
|
205
|
+
if (!htbl->sent_table) {
|
206
|
+
emit_marker(cinfo, M_DHT);
|
207
|
+
|
208
|
+
length = 0;
|
209
|
+
for (i = 1; i <= 16; i++)
|
210
|
+
length += htbl->bits[i];
|
211
|
+
|
212
|
+
emit_2bytes(cinfo, length + 2 + 1 + 16);
|
213
|
+
emit_byte(cinfo, index);
|
214
|
+
|
215
|
+
for (i = 1; i <= 16; i++)
|
216
|
+
emit_byte(cinfo, htbl->bits[i]);
|
217
|
+
|
218
|
+
for (i = 0; i < length; i++)
|
219
|
+
emit_byte(cinfo, htbl->huffval[i]);
|
220
|
+
|
221
|
+
htbl->sent_table = TRUE;
|
222
|
+
}
|
223
|
+
}
|
224
|
+
|
225
|
+
|
226
|
+
LOCAL(void)
|
227
|
+
emit_dac(j_compress_ptr cinfo)
|
228
|
+
/* Emit a DAC marker */
|
229
|
+
/* Since the useful info is so small, we want to emit all the tables in */
|
230
|
+
/* one DAC marker. Therefore this routine does its own scan of the table. */
|
231
|
+
{
|
232
|
+
#ifdef C_ARITH_CODING_SUPPORTED
|
233
|
+
char dc_in_use[NUM_ARITH_TBLS];
|
234
|
+
char ac_in_use[NUM_ARITH_TBLS];
|
235
|
+
int length, i;
|
236
|
+
jpeg_component_info *compptr;
|
237
|
+
|
238
|
+
for (i = 0; i < NUM_ARITH_TBLS; i++)
|
239
|
+
dc_in_use[i] = ac_in_use[i] = 0;
|
240
|
+
|
241
|
+
for (i = 0; i < cinfo->comps_in_scan; i++) {
|
242
|
+
compptr = cinfo->cur_comp_info[i];
|
243
|
+
/* DC needs no table for refinement scan */
|
244
|
+
if (cinfo->Ss == 0 && cinfo->Ah == 0)
|
245
|
+
dc_in_use[compptr->dc_tbl_no] = 1;
|
246
|
+
/* AC needs no table when not present */
|
247
|
+
if (cinfo->Se)
|
248
|
+
ac_in_use[compptr->ac_tbl_no] = 1;
|
249
|
+
}
|
250
|
+
|
251
|
+
length = 0;
|
252
|
+
for (i = 0; i < NUM_ARITH_TBLS; i++)
|
253
|
+
length += dc_in_use[i] + ac_in_use[i];
|
254
|
+
|
255
|
+
if (length) {
|
256
|
+
emit_marker(cinfo, M_DAC);
|
257
|
+
|
258
|
+
emit_2bytes(cinfo, length * 2 + 2);
|
259
|
+
|
260
|
+
for (i = 0; i < NUM_ARITH_TBLS; i++) {
|
261
|
+
if (dc_in_use[i]) {
|
262
|
+
emit_byte(cinfo, i);
|
263
|
+
emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i] << 4));
|
264
|
+
}
|
265
|
+
if (ac_in_use[i]) {
|
266
|
+
emit_byte(cinfo, i + 0x10);
|
267
|
+
emit_byte(cinfo, cinfo->arith_ac_K[i]);
|
268
|
+
}
|
269
|
+
}
|
270
|
+
}
|
271
|
+
#endif /* C_ARITH_CODING_SUPPORTED */
|
272
|
+
}
|
273
|
+
|
274
|
+
|
275
|
+
LOCAL(void)
|
276
|
+
emit_dri(j_compress_ptr cinfo)
|
277
|
+
/* Emit a DRI marker */
|
278
|
+
{
|
279
|
+
emit_marker(cinfo, M_DRI);
|
280
|
+
|
281
|
+
emit_2bytes(cinfo, 4); /* fixed length */
|
282
|
+
|
283
|
+
emit_2bytes(cinfo, (int)cinfo->restart_interval);
|
284
|
+
}
|
285
|
+
|
286
|
+
|
287
|
+
LOCAL(void)
|
288
|
+
emit_sof(j_compress_ptr cinfo, JPEG_MARKER code)
|
289
|
+
/* Emit a SOF marker */
|
290
|
+
{
|
291
|
+
int ci;
|
292
|
+
jpeg_component_info *compptr;
|
293
|
+
|
294
|
+
emit_marker(cinfo, code);
|
295
|
+
|
296
|
+
emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */
|
297
|
+
|
298
|
+
/* Make sure image isn't bigger than SOF field can handle */
|
299
|
+
if ((long)cinfo->_jpeg_height > 65535L || (long)cinfo->_jpeg_width > 65535L)
|
300
|
+
ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int)65535);
|
301
|
+
|
302
|
+
emit_byte(cinfo, cinfo->data_precision);
|
303
|
+
emit_2bytes(cinfo, (int)cinfo->_jpeg_height);
|
304
|
+
emit_2bytes(cinfo, (int)cinfo->_jpeg_width);
|
305
|
+
|
306
|
+
emit_byte(cinfo, cinfo->num_components);
|
307
|
+
|
308
|
+
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
309
|
+
ci++, compptr++) {
|
310
|
+
emit_byte(cinfo, compptr->component_id);
|
311
|
+
emit_byte(cinfo, (compptr->h_samp_factor << 4) + compptr->v_samp_factor);
|
312
|
+
emit_byte(cinfo, compptr->quant_tbl_no);
|
313
|
+
}
|
314
|
+
}
|
315
|
+
|
316
|
+
|
317
|
+
LOCAL(void)
|
318
|
+
emit_sos(j_compress_ptr cinfo)
|
319
|
+
/* Emit a SOS marker */
|
320
|
+
{
|
321
|
+
int i, td, ta;
|
322
|
+
jpeg_component_info *compptr;
|
323
|
+
|
324
|
+
emit_marker(cinfo, M_SOS);
|
325
|
+
|
326
|
+
emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3); /* length */
|
327
|
+
|
328
|
+
emit_byte(cinfo, cinfo->comps_in_scan);
|
329
|
+
|
330
|
+
for (i = 0; i < cinfo->comps_in_scan; i++) {
|
331
|
+
compptr = cinfo->cur_comp_info[i];
|
332
|
+
emit_byte(cinfo, compptr->component_id);
|
333
|
+
|
334
|
+
/* We emit 0 for unused field(s); this is recommended by the P&M text
|
335
|
+
* but does not seem to be specified in the standard.
|
336
|
+
*/
|
337
|
+
|
338
|
+
/* DC needs no table for refinement scan */
|
339
|
+
td = cinfo->Ss == 0 && cinfo->Ah == 0 ? compptr->dc_tbl_no : 0;
|
340
|
+
/* AC needs no table when not present */
|
341
|
+
ta = cinfo->Se ? compptr->ac_tbl_no : 0;
|
342
|
+
|
343
|
+
emit_byte(cinfo, (td << 4) + ta);
|
344
|
+
}
|
345
|
+
|
346
|
+
emit_byte(cinfo, cinfo->Ss);
|
347
|
+
emit_byte(cinfo, cinfo->Se);
|
348
|
+
emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al);
|
349
|
+
}
|
350
|
+
|
351
|
+
|
352
|
+
LOCAL(void)
|
353
|
+
emit_jfif_app0(j_compress_ptr cinfo)
|
354
|
+
/* Emit a JFIF-compliant APP0 marker */
|
355
|
+
{
|
356
|
+
/*
|
357
|
+
* Length of APP0 block (2 bytes)
|
358
|
+
* Block ID (4 bytes - ASCII "JFIF")
|
359
|
+
* Zero byte (1 byte to terminate the ID string)
|
360
|
+
* Version Major, Minor (2 bytes - major first)
|
361
|
+
* Units (1 byte - 0x00 = none, 0x01 = inch, 0x02 = cm)
|
362
|
+
* Xdpu (2 bytes - dots per unit horizontal)
|
363
|
+
* Ydpu (2 bytes - dots per unit vertical)
|
364
|
+
* Thumbnail X size (1 byte)
|
365
|
+
* Thumbnail Y size (1 byte)
|
366
|
+
*/
|
367
|
+
|
368
|
+
emit_marker(cinfo, M_APP0);
|
369
|
+
|
370
|
+
emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1); /* length */
|
371
|
+
|
372
|
+
emit_byte(cinfo, 0x4A); /* Identifier: ASCII "JFIF" */
|
373
|
+
emit_byte(cinfo, 0x46);
|
374
|
+
emit_byte(cinfo, 0x49);
|
375
|
+
emit_byte(cinfo, 0x46);
|
376
|
+
emit_byte(cinfo, 0);
|
377
|
+
emit_byte(cinfo, cinfo->JFIF_major_version); /* Version fields */
|
378
|
+
emit_byte(cinfo, cinfo->JFIF_minor_version);
|
379
|
+
emit_byte(cinfo, cinfo->density_unit); /* Pixel size information */
|
380
|
+
emit_2bytes(cinfo, (int)cinfo->X_density);
|
381
|
+
emit_2bytes(cinfo, (int)cinfo->Y_density);
|
382
|
+
emit_byte(cinfo, 0); /* No thumbnail image */
|
383
|
+
emit_byte(cinfo, 0);
|
384
|
+
}
|
385
|
+
|
386
|
+
|
387
|
+
LOCAL(void)
|
388
|
+
emit_adobe_app14(j_compress_ptr cinfo)
|
389
|
+
/* Emit an Adobe APP14 marker */
|
390
|
+
{
|
391
|
+
/*
|
392
|
+
* Length of APP14 block (2 bytes)
|
393
|
+
* Block ID (5 bytes - ASCII "Adobe")
|
394
|
+
* Version Number (2 bytes - currently 100)
|
395
|
+
* Flags0 (2 bytes - currently 0)
|
396
|
+
* Flags1 (2 bytes - currently 0)
|
397
|
+
* Color transform (1 byte)
|
398
|
+
*
|
399
|
+
* Although Adobe TN 5116 mentions Version = 101, all the Adobe files
|
400
|
+
* now in circulation seem to use Version = 100, so that's what we write.
|
401
|
+
*
|
402
|
+
* We write the color transform byte as 1 if the JPEG color space is
|
403
|
+
* YCbCr, 2 if it's YCCK, 0 otherwise. Adobe's definition has to do with
|
404
|
+
* whether the encoder performed a transformation, which is pretty useless.
|
405
|
+
*/
|
406
|
+
|
407
|
+
emit_marker(cinfo, M_APP14);
|
408
|
+
|
409
|
+
emit_2bytes(cinfo, 2 + 5 + 2 + 2 + 2 + 1); /* length */
|
410
|
+
|
411
|
+
emit_byte(cinfo, 0x41); /* Identifier: ASCII "Adobe" */
|
412
|
+
emit_byte(cinfo, 0x64);
|
413
|
+
emit_byte(cinfo, 0x6F);
|
414
|
+
emit_byte(cinfo, 0x62);
|
415
|
+
emit_byte(cinfo, 0x65);
|
416
|
+
emit_2bytes(cinfo, 100); /* Version */
|
417
|
+
emit_2bytes(cinfo, 0); /* Flags0 */
|
418
|
+
emit_2bytes(cinfo, 0); /* Flags1 */
|
419
|
+
switch (cinfo->jpeg_color_space) {
|
420
|
+
case JCS_YCbCr:
|
421
|
+
emit_byte(cinfo, 1); /* Color transform = 1 */
|
422
|
+
break;
|
423
|
+
case JCS_YCCK:
|
424
|
+
emit_byte(cinfo, 2); /* Color transform = 2 */
|
425
|
+
break;
|
426
|
+
default:
|
427
|
+
emit_byte(cinfo, 0); /* Color transform = 0 */
|
428
|
+
break;
|
429
|
+
}
|
430
|
+
}
|
431
|
+
|
432
|
+
|
433
|
+
/*
|
434
|
+
* These routines allow writing an arbitrary marker with parameters.
|
435
|
+
* The only intended use is to emit COM or APPn markers after calling
|
436
|
+
* write_file_header and before calling write_frame_header.
|
437
|
+
* Other uses are not guaranteed to produce desirable results.
|
438
|
+
* Counting the parameter bytes properly is the caller's responsibility.
|
439
|
+
*/
|
440
|
+
|
441
|
+
METHODDEF(void)
|
442
|
+
write_marker_header(j_compress_ptr cinfo, int marker, unsigned int datalen)
|
443
|
+
/* Emit an arbitrary marker header */
|
444
|
+
{
|
445
|
+
if (datalen > (unsigned int)65533) /* safety check */
|
446
|
+
ERREXIT(cinfo, JERR_BAD_LENGTH);
|
447
|
+
|
448
|
+
emit_marker(cinfo, (JPEG_MARKER)marker);
|
449
|
+
|
450
|
+
emit_2bytes(cinfo, (int)(datalen + 2)); /* total length */
|
451
|
+
}
|
452
|
+
|
453
|
+
METHODDEF(void)
|
454
|
+
write_marker_byte(j_compress_ptr cinfo, int val)
|
455
|
+
/* Emit one byte of marker parameters following write_marker_header */
|
456
|
+
{
|
457
|
+
emit_byte(cinfo, val);
|
458
|
+
}
|
459
|
+
|
460
|
+
|
461
|
+
/*
|
462
|
+
* Write datastream header.
|
463
|
+
* This consists of an SOI and optional APPn markers.
|
464
|
+
* We recommend use of the JFIF marker, but not the Adobe marker,
|
465
|
+
* when using YCbCr or grayscale data. The JFIF marker should NOT
|
466
|
+
* be used for any other JPEG colorspace. The Adobe marker is helpful
|
467
|
+
* to distinguish RGB, CMYK, and YCCK colorspaces.
|
468
|
+
* Note that an application can write additional header markers after
|
469
|
+
* jpeg_start_compress returns.
|
470
|
+
*/
|
471
|
+
|
472
|
+
METHODDEF(void)
|
473
|
+
write_file_header(j_compress_ptr cinfo)
|
474
|
+
{
|
475
|
+
my_marker_ptr marker = (my_marker_ptr)cinfo->marker;
|
476
|
+
|
477
|
+
emit_marker(cinfo, M_SOI); /* first the SOI */
|
478
|
+
|
479
|
+
/* SOI is defined to reset restart interval to 0 */
|
480
|
+
marker->last_restart_interval = 0;
|
481
|
+
|
482
|
+
if (cinfo->write_JFIF_header) /* next an optional JFIF APP0 */
|
483
|
+
emit_jfif_app0(cinfo);
|
484
|
+
if (cinfo->write_Adobe_marker) /* next an optional Adobe APP14 */
|
485
|
+
emit_adobe_app14(cinfo);
|
486
|
+
}
|
487
|
+
|
488
|
+
|
489
|
+
/*
|
490
|
+
* Write frame header.
|
491
|
+
* This consists of DQT and SOFn markers.
|
492
|
+
* Note that we do not emit the SOF until we have emitted the DQT(s).
|
493
|
+
* This avoids compatibility problems with incorrect implementations that
|
494
|
+
* try to error-check the quant table numbers as soon as they see the SOF.
|
495
|
+
*/
|
496
|
+
|
497
|
+
METHODDEF(void)
|
498
|
+
write_frame_header(j_compress_ptr cinfo)
|
499
|
+
{
|
500
|
+
int ci, prec;
|
501
|
+
boolean is_baseline;
|
502
|
+
jpeg_component_info *compptr;
|
503
|
+
|
504
|
+
/* Emit DQT for each quantization table.
|
505
|
+
* Note that emit_dqt() suppresses any duplicate tables.
|
506
|
+
*/
|
507
|
+
prec = 0;
|
508
|
+
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
509
|
+
ci++, compptr++) {
|
510
|
+
prec += emit_dqt(cinfo, compptr->quant_tbl_no);
|
511
|
+
}
|
512
|
+
/* now prec is nonzero iff there are any 16-bit quant tables. */
|
513
|
+
|
514
|
+
/* Check for a non-baseline specification.
|
515
|
+
* Note we assume that Huffman table numbers won't be changed later.
|
516
|
+
*/
|
517
|
+
if (cinfo->arith_code || cinfo->progressive_mode ||
|
518
|
+
cinfo->data_precision != 8) {
|
519
|
+
is_baseline = FALSE;
|
520
|
+
} else {
|
521
|
+
is_baseline = TRUE;
|
522
|
+
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
523
|
+
ci++, compptr++) {
|
524
|
+
if (compptr->dc_tbl_no > 1 || compptr->ac_tbl_no > 1)
|
525
|
+
is_baseline = FALSE;
|
526
|
+
}
|
527
|
+
if (prec && is_baseline) {
|
528
|
+
is_baseline = FALSE;
|
529
|
+
/* If it's baseline except for quantizer size, warn the user */
|
530
|
+
TRACEMS(cinfo, 0, JTRC_16BIT_TABLES);
|
531
|
+
}
|
532
|
+
}
|
533
|
+
|
534
|
+
/* Emit the proper SOF marker */
|
535
|
+
if (cinfo->arith_code) {
|
536
|
+
if (cinfo->progressive_mode)
|
537
|
+
emit_sof(cinfo, M_SOF10); /* SOF code for progressive arithmetic */
|
538
|
+
else
|
539
|
+
emit_sof(cinfo, M_SOF9); /* SOF code for sequential arithmetic */
|
540
|
+
} else {
|
541
|
+
if (cinfo->progressive_mode)
|
542
|
+
emit_sof(cinfo, M_SOF2); /* SOF code for progressive Huffman */
|
543
|
+
else if (is_baseline)
|
544
|
+
emit_sof(cinfo, M_SOF0); /* SOF code for baseline implementation */
|
545
|
+
else
|
546
|
+
emit_sof(cinfo, M_SOF1); /* SOF code for non-baseline Huffman file */
|
547
|
+
}
|
548
|
+
}
|
549
|
+
|
550
|
+
|
551
|
+
/*
|
552
|
+
* Write scan header.
|
553
|
+
* This consists of DHT or DAC markers, optional DRI, and SOS.
|
554
|
+
* Compressed data will be written following the SOS.
|
555
|
+
*/
|
556
|
+
|
557
|
+
METHODDEF(void)
|
558
|
+
write_scan_header(j_compress_ptr cinfo)
|
559
|
+
{
|
560
|
+
my_marker_ptr marker = (my_marker_ptr)cinfo->marker;
|
561
|
+
int i;
|
562
|
+
jpeg_component_info *compptr;
|
563
|
+
|
564
|
+
if (cinfo->arith_code) {
|
565
|
+
/* Emit arith conditioning info. We may have some duplication
|
566
|
+
* if the file has multiple scans, but it's so small it's hardly
|
567
|
+
* worth worrying about.
|
568
|
+
*/
|
569
|
+
emit_dac(cinfo);
|
570
|
+
} else {
|
571
|
+
/* Emit Huffman tables.
|
572
|
+
* Note that emit_dht() suppresses any duplicate tables.
|
573
|
+
*/
|
574
|
+
for (i = 0; i < cinfo->comps_in_scan; i++) {
|
575
|
+
compptr = cinfo->cur_comp_info[i];
|
576
|
+
/* DC needs no table for refinement scan */
|
577
|
+
if (cinfo->Ss == 0 && cinfo->Ah == 0)
|
578
|
+
emit_dht(cinfo, compptr->dc_tbl_no, FALSE);
|
579
|
+
/* AC needs no table when not present */
|
580
|
+
if (cinfo->Se)
|
581
|
+
emit_dht(cinfo, compptr->ac_tbl_no, TRUE);
|
582
|
+
}
|
583
|
+
}
|
584
|
+
|
585
|
+
/* Emit DRI if required --- note that DRI value could change for each scan.
|
586
|
+
* We avoid wasting space with unnecessary DRIs, however.
|
587
|
+
*/
|
588
|
+
if (cinfo->restart_interval != marker->last_restart_interval) {
|
589
|
+
emit_dri(cinfo);
|
590
|
+
marker->last_restart_interval = cinfo->restart_interval;
|
591
|
+
}
|
592
|
+
|
593
|
+
emit_sos(cinfo);
|
594
|
+
}
|
595
|
+
|
596
|
+
|
597
|
+
/*
|
598
|
+
* Write datastream trailer.
|
599
|
+
*/
|
600
|
+
|
601
|
+
METHODDEF(void)
|
602
|
+
write_file_trailer(j_compress_ptr cinfo)
|
603
|
+
{
|
604
|
+
emit_marker(cinfo, M_EOI);
|
605
|
+
}
|
606
|
+
|
607
|
+
|
608
|
+
/*
|
609
|
+
* Write an abbreviated table-specification datastream.
|
610
|
+
* This consists of SOI, DQT and DHT tables, and EOI.
|
611
|
+
* Any table that is defined and not marked sent_table = TRUE will be
|
612
|
+
* emitted. Note that all tables will be marked sent_table = TRUE at exit.
|
613
|
+
*/
|
614
|
+
|
615
|
+
METHODDEF(void)
|
616
|
+
write_tables_only(j_compress_ptr cinfo)
|
617
|
+
{
|
618
|
+
int i;
|
619
|
+
|
620
|
+
emit_marker(cinfo, M_SOI);
|
621
|
+
|
622
|
+
for (i = 0; i < NUM_QUANT_TBLS; i++) {
|
623
|
+
if (cinfo->quant_tbl_ptrs[i] != NULL)
|
624
|
+
(void)emit_dqt(cinfo, i);
|
625
|
+
}
|
626
|
+
|
627
|
+
if (!cinfo->arith_code) {
|
628
|
+
for (i = 0; i < NUM_HUFF_TBLS; i++) {
|
629
|
+
if (cinfo->dc_huff_tbl_ptrs[i] != NULL)
|
630
|
+
emit_dht(cinfo, i, FALSE);
|
631
|
+
if (cinfo->ac_huff_tbl_ptrs[i] != NULL)
|
632
|
+
emit_dht(cinfo, i, TRUE);
|
633
|
+
}
|
634
|
+
}
|
635
|
+
|
636
|
+
emit_marker(cinfo, M_EOI);
|
637
|
+
}
|
638
|
+
|
639
|
+
|
640
|
+
/*
|
641
|
+
* Initialize the marker writer module.
|
642
|
+
*/
|
643
|
+
|
644
|
+
GLOBAL(void)
|
645
|
+
jinit_marker_writer(j_compress_ptr cinfo)
|
646
|
+
{
|
647
|
+
my_marker_ptr marker;
|
648
|
+
|
649
|
+
/* Create the subobject */
|
650
|
+
marker = (my_marker_ptr)
|
651
|
+
(*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE,
|
652
|
+
sizeof(my_marker_writer));
|
653
|
+
cinfo->marker = (struct jpeg_marker_writer *)marker;
|
654
|
+
/* Initialize method pointers */
|
655
|
+
marker->pub.write_file_header = write_file_header;
|
656
|
+
marker->pub.write_frame_header = write_frame_header;
|
657
|
+
marker->pub.write_scan_header = write_scan_header;
|
658
|
+
marker->pub.write_file_trailer = write_file_trailer;
|
659
|
+
marker->pub.write_tables_only = write_tables_only;
|
660
|
+
marker->pub.write_marker_header = write_marker_header;
|
661
|
+
marker->pub.write_marker_byte = write_marker_byte;
|
662
|
+
/* Initialize private state */
|
663
|
+
marker->last_restart_interval = 0;
|
664
|
+
}
|