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,677 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (C)2011-2015, 2018 D. R. Commander. All Rights Reserved.
|
3
|
+
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
4
|
+
*
|
5
|
+
* Redistribution and use in source and binary forms, with or without
|
6
|
+
* modification, are permitted provided that the following conditions are met:
|
7
|
+
*
|
8
|
+
* - Redistributions of source code must retain the above copyright notice,
|
9
|
+
* this list of conditions and the following disclaimer.
|
10
|
+
* - Redistributions in binary form must reproduce the above copyright notice,
|
11
|
+
* this list of conditions and the following disclaimer in the documentation
|
12
|
+
* and/or other materials provided with the distribution.
|
13
|
+
* - Neither the name of the libjpeg-turbo Project nor the names of its
|
14
|
+
* contributors may be used to endorse or promote products derived from this
|
15
|
+
* software without specific prior written permission.
|
16
|
+
*
|
17
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
|
18
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
19
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
20
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
21
|
+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
22
|
+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
23
|
+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
24
|
+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
25
|
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
26
|
+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
27
|
+
* POSSIBILITY OF SUCH DAMAGE.
|
28
|
+
*/
|
29
|
+
|
30
|
+
package org.libjpegturbo.turbojpeg;
|
31
|
+
|
32
|
+
import java.awt.image.*;
|
33
|
+
import java.nio.*;
|
34
|
+
import java.io.*;
|
35
|
+
|
36
|
+
/**
|
37
|
+
* TurboJPEG compressor
|
38
|
+
*/
|
39
|
+
public class TJCompressor implements Closeable {
|
40
|
+
|
41
|
+
private static final String NO_ASSOC_ERROR =
|
42
|
+
"No source image is associated with this instance";
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Create a TurboJPEG compressor instance.
|
46
|
+
*/
|
47
|
+
public TJCompressor() throws TJException {
|
48
|
+
init();
|
49
|
+
}
|
50
|
+
|
51
|
+
/**
|
52
|
+
* Create a TurboJPEG compressor instance and associate the uncompressed
|
53
|
+
* source image stored in <code>srcImage</code> with the newly created
|
54
|
+
* instance.
|
55
|
+
*
|
56
|
+
* @param srcImage see {@link #setSourceImage} for description
|
57
|
+
*
|
58
|
+
* @param x see {@link #setSourceImage} for description
|
59
|
+
*
|
60
|
+
* @param y see {@link #setSourceImage} for description
|
61
|
+
*
|
62
|
+
* @param width see {@link #setSourceImage} for description
|
63
|
+
*
|
64
|
+
* @param pitch see {@link #setSourceImage} for description
|
65
|
+
*
|
66
|
+
* @param height see {@link #setSourceImage} for description
|
67
|
+
*
|
68
|
+
* @param pixelFormat pixel format of the source image (one of
|
69
|
+
* {@link TJ#PF_RGB TJ.PF_*})
|
70
|
+
*/
|
71
|
+
public TJCompressor(byte[] srcImage, int x, int y, int width, int pitch,
|
72
|
+
int height, int pixelFormat) throws TJException {
|
73
|
+
setSourceImage(srcImage, x, y, width, pitch, height, pixelFormat);
|
74
|
+
}
|
75
|
+
|
76
|
+
/**
|
77
|
+
* @deprecated Use
|
78
|
+
* {@link #TJCompressor(byte[], int, int, int, int, int, int)} instead.
|
79
|
+
*/
|
80
|
+
@SuppressWarnings("checkstyle:JavadocMethod")
|
81
|
+
@Deprecated
|
82
|
+
public TJCompressor(byte[] srcImage, int width, int pitch, int height,
|
83
|
+
int pixelFormat) throws TJException {
|
84
|
+
setSourceImage(srcImage, width, pitch, height, pixelFormat);
|
85
|
+
}
|
86
|
+
|
87
|
+
/**
|
88
|
+
* Create a TurboJPEG compressor instance and associate the uncompressed
|
89
|
+
* source image stored in <code>srcImage</code> with the newly created
|
90
|
+
* instance.
|
91
|
+
*
|
92
|
+
* @param srcImage see
|
93
|
+
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
94
|
+
*
|
95
|
+
* @param x see
|
96
|
+
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
97
|
+
*
|
98
|
+
* @param y see
|
99
|
+
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
100
|
+
*
|
101
|
+
* @param width see
|
102
|
+
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
103
|
+
*
|
104
|
+
* @param height see
|
105
|
+
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
106
|
+
*/
|
107
|
+
public TJCompressor(BufferedImage srcImage, int x, int y, int width,
|
108
|
+
int height) throws TJException {
|
109
|
+
setSourceImage(srcImage, x, y, width, height);
|
110
|
+
}
|
111
|
+
|
112
|
+
/**
|
113
|
+
* Associate an uncompressed RGB, grayscale, or CMYK source image with this
|
114
|
+
* compressor instance.
|
115
|
+
*
|
116
|
+
* @param srcImage image buffer containing RGB, grayscale, or CMYK pixels to
|
117
|
+
* be compressed or encoded. This buffer is not modified.
|
118
|
+
*
|
119
|
+
* @param x x offset (in pixels) of the region in the source image from which
|
120
|
+
* the JPEG or YUV image should be compressed/encoded
|
121
|
+
*
|
122
|
+
* @param y y offset (in pixels) of the region in the source image from which
|
123
|
+
* the JPEG or YUV image should be compressed/encoded
|
124
|
+
*
|
125
|
+
* @param width width (in pixels) of the region in the source image from
|
126
|
+
* which the JPEG or YUV image should be compressed/encoded
|
127
|
+
*
|
128
|
+
* @param pitch bytes per line of the source image. Normally, this should be
|
129
|
+
* <code>width * TJ.pixelSize(pixelFormat)</code> if the source image is
|
130
|
+
* unpadded, but you can use this parameter to, for instance, specify that
|
131
|
+
* the scanlines in the source image are padded to a 4-byte boundary or to
|
132
|
+
* compress/encode a JPEG or YUV image from a region of a larger source
|
133
|
+
* image. You can also be clever and use this parameter to skip lines, etc.
|
134
|
+
* Setting this parameter to 0 is the equivalent of setting it to
|
135
|
+
* <code>width * TJ.pixelSize(pixelFormat)</code>.
|
136
|
+
*
|
137
|
+
* @param height height (in pixels) of the region in the source image from
|
138
|
+
* which the JPEG or YUV image should be compressed/encoded
|
139
|
+
*
|
140
|
+
* @param pixelFormat pixel format of the source image (one of
|
141
|
+
* {@link TJ#PF_RGB TJ.PF_*})
|
142
|
+
*/
|
143
|
+
public void setSourceImage(byte[] srcImage, int x, int y, int width,
|
144
|
+
int pitch, int height, int pixelFormat)
|
145
|
+
throws TJException {
|
146
|
+
if (handle == 0) init();
|
147
|
+
if (srcImage == null || x < 0 || y < 0 || width < 1 || height < 1 ||
|
148
|
+
pitch < 0 || pixelFormat < 0 || pixelFormat >= TJ.NUMPF)
|
149
|
+
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
150
|
+
srcBuf = srcImage;
|
151
|
+
srcWidth = width;
|
152
|
+
if (pitch == 0)
|
153
|
+
srcPitch = width * TJ.getPixelSize(pixelFormat);
|
154
|
+
else
|
155
|
+
srcPitch = pitch;
|
156
|
+
srcHeight = height;
|
157
|
+
srcPixelFormat = pixelFormat;
|
158
|
+
srcX = x;
|
159
|
+
srcY = y;
|
160
|
+
srcBufInt = null;
|
161
|
+
srcYUVImage = null;
|
162
|
+
}
|
163
|
+
|
164
|
+
/**
|
165
|
+
* @deprecated Use
|
166
|
+
* {@link #setSourceImage(byte[], int, int, int, int, int, int)} instead.
|
167
|
+
*/
|
168
|
+
@SuppressWarnings("checkstyle:JavadocMethod")
|
169
|
+
@Deprecated
|
170
|
+
public void setSourceImage(byte[] srcImage, int width, int pitch,
|
171
|
+
int height, int pixelFormat) throws TJException {
|
172
|
+
setSourceImage(srcImage, 0, 0, width, pitch, height, pixelFormat);
|
173
|
+
srcX = srcY = -1;
|
174
|
+
}
|
175
|
+
|
176
|
+
/**
|
177
|
+
* Associate an uncompressed RGB or grayscale source image with this
|
178
|
+
* compressor instance.
|
179
|
+
*
|
180
|
+
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
181
|
+
* grayscale pixels to be compressed or encoded. This image is not modified.
|
182
|
+
*
|
183
|
+
* @param x x offset (in pixels) of the region in the source image from which
|
184
|
+
* the JPEG or YUV image should be compressed/encoded
|
185
|
+
*
|
186
|
+
* @param y y offset (in pixels) of the region in the source image from which
|
187
|
+
* the JPEG or YUV image should be compressed/encoded
|
188
|
+
*
|
189
|
+
* @param width width (in pixels) of the region in the source image from
|
190
|
+
* which the JPEG or YUV image should be compressed/encoded (0 = use the
|
191
|
+
* width of the source image)
|
192
|
+
*
|
193
|
+
* @param height height (in pixels) of the region in the source image from
|
194
|
+
* which the JPEG or YUV image should be compressed/encoded (0 = use the
|
195
|
+
* height of the source image)
|
196
|
+
*/
|
197
|
+
public void setSourceImage(BufferedImage srcImage, int x, int y, int width,
|
198
|
+
int height) throws TJException {
|
199
|
+
if (handle == 0) init();
|
200
|
+
if (srcImage == null || x < 0 || y < 0 || width < 0 || height < 0)
|
201
|
+
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
202
|
+
srcX = x;
|
203
|
+
srcY = y;
|
204
|
+
srcWidth = (width == 0) ? srcImage.getWidth() : width;
|
205
|
+
srcHeight = (height == 0) ? srcImage.getHeight() : height;
|
206
|
+
if (x + width > srcImage.getWidth() || y + height > srcImage.getHeight())
|
207
|
+
throw new IllegalArgumentException("Compression region exceeds the bounds of the source image");
|
208
|
+
|
209
|
+
int pixelFormat;
|
210
|
+
boolean intPixels = false;
|
211
|
+
if (byteOrder == null)
|
212
|
+
byteOrder = ByteOrder.nativeOrder();
|
213
|
+
switch (srcImage.getType()) {
|
214
|
+
case BufferedImage.TYPE_3BYTE_BGR:
|
215
|
+
pixelFormat = TJ.PF_BGR; break;
|
216
|
+
case BufferedImage.TYPE_4BYTE_ABGR:
|
217
|
+
case BufferedImage.TYPE_4BYTE_ABGR_PRE:
|
218
|
+
pixelFormat = TJ.PF_XBGR; break;
|
219
|
+
case BufferedImage.TYPE_BYTE_GRAY:
|
220
|
+
pixelFormat = TJ.PF_GRAY; break;
|
221
|
+
case BufferedImage.TYPE_INT_BGR:
|
222
|
+
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
223
|
+
pixelFormat = TJ.PF_XBGR;
|
224
|
+
else
|
225
|
+
pixelFormat = TJ.PF_RGBX;
|
226
|
+
intPixels = true; break;
|
227
|
+
case BufferedImage.TYPE_INT_RGB:
|
228
|
+
case BufferedImage.TYPE_INT_ARGB:
|
229
|
+
case BufferedImage.TYPE_INT_ARGB_PRE:
|
230
|
+
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
231
|
+
pixelFormat = TJ.PF_XRGB;
|
232
|
+
else
|
233
|
+
pixelFormat = TJ.PF_BGRX;
|
234
|
+
intPixels = true; break;
|
235
|
+
default:
|
236
|
+
throw new IllegalArgumentException("Unsupported BufferedImage format");
|
237
|
+
}
|
238
|
+
srcPixelFormat = pixelFormat;
|
239
|
+
|
240
|
+
WritableRaster wr = srcImage.getRaster();
|
241
|
+
if (intPixels) {
|
242
|
+
SinglePixelPackedSampleModel sm =
|
243
|
+
(SinglePixelPackedSampleModel)srcImage.getSampleModel();
|
244
|
+
srcStride = sm.getScanlineStride();
|
245
|
+
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
246
|
+
srcBufInt = db.getData();
|
247
|
+
srcBuf = null;
|
248
|
+
} else {
|
249
|
+
ComponentSampleModel sm =
|
250
|
+
(ComponentSampleModel)srcImage.getSampleModel();
|
251
|
+
int pixelSize = sm.getPixelStride();
|
252
|
+
if (pixelSize != TJ.getPixelSize(pixelFormat))
|
253
|
+
throw new IllegalArgumentException("Inconsistency between pixel format and pixel size in BufferedImage");
|
254
|
+
srcPitch = sm.getScanlineStride();
|
255
|
+
DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
|
256
|
+
srcBuf = db.getData();
|
257
|
+
srcBufInt = null;
|
258
|
+
}
|
259
|
+
srcYUVImage = null;
|
260
|
+
}
|
261
|
+
|
262
|
+
/**
|
263
|
+
* Associate an uncompressed YUV planar source image with this compressor
|
264
|
+
* instance.
|
265
|
+
*
|
266
|
+
* @param srcImage YUV planar image to be compressed. This image is not
|
267
|
+
* modified.
|
268
|
+
*/
|
269
|
+
public void setSourceImage(YUVImage srcImage) throws TJException {
|
270
|
+
if (handle == 0) init();
|
271
|
+
if (srcImage == null)
|
272
|
+
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
273
|
+
srcYUVImage = srcImage;
|
274
|
+
srcBuf = null;
|
275
|
+
srcBufInt = null;
|
276
|
+
}
|
277
|
+
|
278
|
+
/**
|
279
|
+
* Set the level of chrominance subsampling for subsequent compress/encode
|
280
|
+
* operations. When pixels are converted from RGB to YCbCr (see
|
281
|
+
* {@link TJ#CS_YCbCr}) or from CMYK to YCCK (see {@link TJ#CS_YCCK}) as part
|
282
|
+
* of the JPEG compression process, some of the Cb and Cr (chrominance)
|
283
|
+
* components can be discarded or averaged together to produce a smaller
|
284
|
+
* image with little perceptible loss of image clarity (the human eye is more
|
285
|
+
* sensitive to small changes in brightness than to small changes in color.)
|
286
|
+
* This is called "chrominance subsampling".
|
287
|
+
* <p>
|
288
|
+
* NOTE: This method has no effect when compressing a JPEG image from a YUV
|
289
|
+
* planar source. In that case, the level of chrominance subsampling in
|
290
|
+
* the JPEG image is determined by the source. Furthermore, this method has
|
291
|
+
* no effect when encoding to a pre-allocated {@link YUVImage} instance. In
|
292
|
+
* that case, the level of chrominance subsampling is determined by the
|
293
|
+
* destination.
|
294
|
+
*
|
295
|
+
* @param newSubsamp the level of chrominance subsampling to use in
|
296
|
+
* subsequent compress/encode oeprations (one of
|
297
|
+
* {@link TJ#SAMP_444 TJ.SAMP_*})
|
298
|
+
*/
|
299
|
+
public void setSubsamp(int newSubsamp) {
|
300
|
+
if (newSubsamp < 0 || newSubsamp >= TJ.NUMSAMP)
|
301
|
+
throw new IllegalArgumentException("Invalid argument in setSubsamp()");
|
302
|
+
subsamp = newSubsamp;
|
303
|
+
}
|
304
|
+
|
305
|
+
/**
|
306
|
+
* Set the JPEG image quality level for subsequent compress operations.
|
307
|
+
*
|
308
|
+
* @param quality the new JPEG image quality level (1 to 100, 1 = worst,
|
309
|
+
* 100 = best)
|
310
|
+
*/
|
311
|
+
public void setJPEGQuality(int quality) {
|
312
|
+
if (quality < 1 || quality > 100)
|
313
|
+
throw new IllegalArgumentException("Invalid argument in setJPEGQuality()");
|
314
|
+
jpegQuality = quality;
|
315
|
+
}
|
316
|
+
|
317
|
+
/**
|
318
|
+
* Compress the uncompressed source image associated with this compressor
|
319
|
+
* instance and output a JPEG image to the given destination buffer.
|
320
|
+
*
|
321
|
+
* @param dstBuf buffer that will receive the JPEG image. Use
|
322
|
+
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
|
323
|
+
* the source image's width and height and the desired level of chrominance
|
324
|
+
* subsampling.
|
325
|
+
*
|
326
|
+
* @param flags the bitwise OR of one or more of
|
327
|
+
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
328
|
+
*/
|
329
|
+
public void compress(byte[] dstBuf, int flags) throws TJException {
|
330
|
+
if (dstBuf == null || flags < 0)
|
331
|
+
throw new IllegalArgumentException("Invalid argument in compress()");
|
332
|
+
if (srcBuf == null && srcBufInt == null && srcYUVImage == null)
|
333
|
+
throw new IllegalStateException(NO_ASSOC_ERROR);
|
334
|
+
if (jpegQuality < 0)
|
335
|
+
throw new IllegalStateException("JPEG Quality not set");
|
336
|
+
if (subsamp < 0 && srcYUVImage == null)
|
337
|
+
throw new IllegalStateException("Subsampling level not set");
|
338
|
+
|
339
|
+
if (srcYUVImage != null)
|
340
|
+
compressedSize = compressFromYUV(srcYUVImage.getPlanes(),
|
341
|
+
srcYUVImage.getOffsets(),
|
342
|
+
srcYUVImage.getWidth(),
|
343
|
+
srcYUVImage.getStrides(),
|
344
|
+
srcYUVImage.getHeight(),
|
345
|
+
srcYUVImage.getSubsamp(),
|
346
|
+
dstBuf, jpegQuality, flags);
|
347
|
+
else if (srcBuf != null) {
|
348
|
+
if (srcX >= 0 && srcY >= 0)
|
349
|
+
compressedSize = compress(srcBuf, srcX, srcY, srcWidth, srcPitch,
|
350
|
+
srcHeight, srcPixelFormat, dstBuf, subsamp,
|
351
|
+
jpegQuality, flags);
|
352
|
+
else
|
353
|
+
compressedSize = compress(srcBuf, srcWidth, srcPitch, srcHeight,
|
354
|
+
srcPixelFormat, dstBuf, subsamp, jpegQuality,
|
355
|
+
flags);
|
356
|
+
} else if (srcBufInt != null) {
|
357
|
+
if (srcX >= 0 && srcY >= 0)
|
358
|
+
compressedSize = compress(srcBufInt, srcX, srcY, srcWidth, srcStride,
|
359
|
+
srcHeight, srcPixelFormat, dstBuf, subsamp,
|
360
|
+
jpegQuality, flags);
|
361
|
+
else
|
362
|
+
compressedSize = compress(srcBufInt, srcWidth, srcStride, srcHeight,
|
363
|
+
srcPixelFormat, dstBuf, subsamp, jpegQuality,
|
364
|
+
flags);
|
365
|
+
}
|
366
|
+
}
|
367
|
+
|
368
|
+
/**
|
369
|
+
* Compress the uncompressed source image associated with this compressor
|
370
|
+
* instance and return a buffer containing a JPEG image.
|
371
|
+
*
|
372
|
+
* @param flags the bitwise OR of one or more of
|
373
|
+
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
374
|
+
*
|
375
|
+
* @return a buffer containing a JPEG image. The length of this buffer will
|
376
|
+
* not be equal to the size of the JPEG image. Use {@link
|
377
|
+
* #getCompressedSize} to obtain the size of the JPEG image.
|
378
|
+
*/
|
379
|
+
public byte[] compress(int flags) throws TJException {
|
380
|
+
checkSourceImage();
|
381
|
+
byte[] buf = new byte[TJ.bufSize(srcWidth, srcHeight, subsamp)];
|
382
|
+
compress(buf, flags);
|
383
|
+
return buf;
|
384
|
+
}
|
385
|
+
|
386
|
+
/**
|
387
|
+
* @deprecated Use
|
388
|
+
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
389
|
+
* {@link #compress(byte[], int)} instead.
|
390
|
+
*/
|
391
|
+
@SuppressWarnings("checkstyle:JavadocMethod")
|
392
|
+
@Deprecated
|
393
|
+
public void compress(BufferedImage srcImage, byte[] dstBuf, int flags)
|
394
|
+
throws TJException {
|
395
|
+
setSourceImage(srcImage, 0, 0, 0, 0);
|
396
|
+
compress(dstBuf, flags);
|
397
|
+
}
|
398
|
+
|
399
|
+
/**
|
400
|
+
* @deprecated Use
|
401
|
+
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
402
|
+
* {@link #compress(int)} instead.
|
403
|
+
*/
|
404
|
+
@SuppressWarnings("checkstyle:JavadocMethod")
|
405
|
+
@Deprecated
|
406
|
+
public byte[] compress(BufferedImage srcImage, int flags)
|
407
|
+
throws TJException {
|
408
|
+
setSourceImage(srcImage, 0, 0, 0, 0);
|
409
|
+
return compress(flags);
|
410
|
+
}
|
411
|
+
|
412
|
+
/**
|
413
|
+
* Encode the uncompressed source image associated with this compressor
|
414
|
+
* instance into a YUV planar image and store it in the given
|
415
|
+
* <code>YUVImage</code> instance. This method uses the accelerated color
|
416
|
+
* conversion routines in TurboJPEG's underlying codec but does not execute
|
417
|
+
* any of the other steps in the JPEG compression process. Encoding
|
418
|
+
* CMYK source images to YUV is not supported.
|
419
|
+
*
|
420
|
+
* @param dstImage {@link YUVImage} instance that will receive the YUV planar
|
421
|
+
* image
|
422
|
+
*
|
423
|
+
* @param flags the bitwise OR of one or more of
|
424
|
+
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
425
|
+
*/
|
426
|
+
public void encodeYUV(YUVImage dstImage, int flags) throws TJException {
|
427
|
+
if (dstImage == null || flags < 0)
|
428
|
+
throw new IllegalArgumentException("Invalid argument in encodeYUV()");
|
429
|
+
if (srcBuf == null && srcBufInt == null)
|
430
|
+
throw new IllegalStateException(NO_ASSOC_ERROR);
|
431
|
+
if (srcYUVImage != null)
|
432
|
+
throw new IllegalStateException("Source image is not correct type");
|
433
|
+
checkSubsampling();
|
434
|
+
if (srcWidth != dstImage.getWidth() || srcHeight != dstImage.getHeight())
|
435
|
+
throw new IllegalStateException("Destination image is the wrong size");
|
436
|
+
|
437
|
+
if (srcBufInt != null) {
|
438
|
+
encodeYUV(srcBufInt, srcX, srcY, srcWidth, srcStride, srcHeight,
|
439
|
+
srcPixelFormat, dstImage.getPlanes(), dstImage.getOffsets(),
|
440
|
+
dstImage.getStrides(), dstImage.getSubsamp(), flags);
|
441
|
+
} else {
|
442
|
+
encodeYUV(srcBuf, srcX, srcY, srcWidth, srcPitch, srcHeight,
|
443
|
+
srcPixelFormat, dstImage.getPlanes(), dstImage.getOffsets(),
|
444
|
+
dstImage.getStrides(), dstImage.getSubsamp(), flags);
|
445
|
+
}
|
446
|
+
compressedSize = 0;
|
447
|
+
}
|
448
|
+
|
449
|
+
/**
|
450
|
+
* @deprecated Use {@link #encodeYUV(YUVImage, int)} instead.
|
451
|
+
*/
|
452
|
+
@SuppressWarnings("checkstyle:JavadocMethod")
|
453
|
+
@Deprecated
|
454
|
+
public void encodeYUV(byte[] dstBuf, int flags) throws TJException {
|
455
|
+
if (dstBuf == null)
|
456
|
+
throw new IllegalArgumentException("Invalid argument in encodeYUV()");
|
457
|
+
checkSourceImage();
|
458
|
+
checkSubsampling();
|
459
|
+
YUVImage dstYUVImage = new YUVImage(dstBuf, srcWidth, 4, srcHeight,
|
460
|
+
subsamp);
|
461
|
+
encodeYUV(dstYUVImage, flags);
|
462
|
+
}
|
463
|
+
|
464
|
+
/**
|
465
|
+
* Encode the uncompressed source image associated with this compressor
|
466
|
+
* instance into a unified YUV planar image buffer and return a
|
467
|
+
* <code>YUVImage</code> instance containing the encoded image. This method
|
468
|
+
* uses the accelerated color conversion routines in TurboJPEG's underlying
|
469
|
+
* codec but does not execute any of the other steps in the JPEG compression
|
470
|
+
* process. Encoding CMYK source images to YUV is not supported.
|
471
|
+
*
|
472
|
+
* @param pad the width of each line in each plane of the YUV image will be
|
473
|
+
* padded to the nearest multiple of this number of bytes (must be a power of
|
474
|
+
* 2.)
|
475
|
+
*
|
476
|
+
* @param flags the bitwise OR of one or more of
|
477
|
+
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
478
|
+
*
|
479
|
+
* @return a YUV planar image.
|
480
|
+
*/
|
481
|
+
public YUVImage encodeYUV(int pad, int flags) throws TJException {
|
482
|
+
checkSourceImage();
|
483
|
+
checkSubsampling();
|
484
|
+
if (pad < 1 || ((pad & (pad - 1)) != 0))
|
485
|
+
throw new IllegalStateException("Invalid argument in encodeYUV()");
|
486
|
+
YUVImage dstYUVImage = new YUVImage(srcWidth, pad, srcHeight, subsamp);
|
487
|
+
encodeYUV(dstYUVImage, flags);
|
488
|
+
return dstYUVImage;
|
489
|
+
}
|
490
|
+
|
491
|
+
/**
|
492
|
+
* Encode the uncompressed source image associated with this compressor
|
493
|
+
* instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
494
|
+
* <code>YUVImage</code> instance containing the encoded image planes. This
|
495
|
+
* method uses the accelerated color conversion routines in TurboJPEG's
|
496
|
+
* underlying codec but does not execute any of the other steps in the JPEG
|
497
|
+
* compression process. Encoding CMYK source images to YUV is not supported.
|
498
|
+
*
|
499
|
+
* @param strides an array of integers, each specifying the number of bytes
|
500
|
+
* per line in the corresponding plane of the output image. Setting the
|
501
|
+
* stride for any plane to 0 is the same as setting it to the component width
|
502
|
+
* of the plane. If <code>strides</code> is null, then the strides for all
|
503
|
+
* planes will be set to their respective component widths. You can adjust
|
504
|
+
* the strides in order to add an arbitrary amount of line padding to each
|
505
|
+
* plane.
|
506
|
+
*
|
507
|
+
* @param flags the bitwise OR of one or more of
|
508
|
+
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
509
|
+
*
|
510
|
+
* @return a YUV planar image.
|
511
|
+
*/
|
512
|
+
public YUVImage encodeYUV(int[] strides, int flags) throws TJException {
|
513
|
+
checkSourceImage();
|
514
|
+
checkSubsampling();
|
515
|
+
YUVImage dstYUVImage = new YUVImage(srcWidth, strides, srcHeight, subsamp);
|
516
|
+
encodeYUV(dstYUVImage, flags);
|
517
|
+
return dstYUVImage;
|
518
|
+
}
|
519
|
+
|
520
|
+
/**
|
521
|
+
* @deprecated Use {@link #encodeYUV(int, int)} instead.
|
522
|
+
*/
|
523
|
+
@SuppressWarnings("checkstyle:JavadocMethod")
|
524
|
+
@Deprecated
|
525
|
+
public byte[] encodeYUV(int flags) throws TJException {
|
526
|
+
checkSourceImage();
|
527
|
+
checkSubsampling();
|
528
|
+
YUVImage dstYUVImage = new YUVImage(srcWidth, 4, srcHeight, subsamp);
|
529
|
+
encodeYUV(dstYUVImage, flags);
|
530
|
+
return dstYUVImage.getBuf();
|
531
|
+
}
|
532
|
+
|
533
|
+
/**
|
534
|
+
* @deprecated Use
|
535
|
+
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
536
|
+
* {@link #encodeYUV(byte[], int)} instead.
|
537
|
+
*/
|
538
|
+
@SuppressWarnings("checkstyle:JavadocMethod")
|
539
|
+
@Deprecated
|
540
|
+
public void encodeYUV(BufferedImage srcImage, byte[] dstBuf, int flags)
|
541
|
+
throws TJException {
|
542
|
+
setSourceImage(srcImage, 0, 0, 0, 0);
|
543
|
+
encodeYUV(dstBuf, flags);
|
544
|
+
}
|
545
|
+
|
546
|
+
/**
|
547
|
+
* @deprecated Use
|
548
|
+
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
549
|
+
* {@link #encodeYUV(int, int)} instead.
|
550
|
+
*/
|
551
|
+
@SuppressWarnings("checkstyle:JavadocMethod")
|
552
|
+
@Deprecated
|
553
|
+
public byte[] encodeYUV(BufferedImage srcImage, int flags)
|
554
|
+
throws TJException {
|
555
|
+
setSourceImage(srcImage, 0, 0, 0, 0);
|
556
|
+
return encodeYUV(flags);
|
557
|
+
}
|
558
|
+
|
559
|
+
/**
|
560
|
+
* Returns the size of the image (in bytes) generated by the most recent
|
561
|
+
* compress operation.
|
562
|
+
*
|
563
|
+
* @return the size of the image (in bytes) generated by the most recent
|
564
|
+
* compress operation.
|
565
|
+
*/
|
566
|
+
public int getCompressedSize() {
|
567
|
+
return compressedSize;
|
568
|
+
}
|
569
|
+
|
570
|
+
/**
|
571
|
+
* Free the native structures associated with this compressor instance.
|
572
|
+
*/
|
573
|
+
@Override
|
574
|
+
public void close() throws TJException {
|
575
|
+
if (handle != 0)
|
576
|
+
destroy();
|
577
|
+
}
|
578
|
+
|
579
|
+
@SuppressWarnings("checkstyle:DesignForExtension")
|
580
|
+
@Override
|
581
|
+
protected void finalize() throws Throwable {
|
582
|
+
try {
|
583
|
+
close();
|
584
|
+
} catch (TJException e) {
|
585
|
+
} finally {
|
586
|
+
super.finalize();
|
587
|
+
}
|
588
|
+
};
|
589
|
+
|
590
|
+
private native void init() throws TJException;
|
591
|
+
|
592
|
+
private native void destroy() throws TJException;
|
593
|
+
|
594
|
+
// JPEG size in bytes is returned
|
595
|
+
@SuppressWarnings("checkstyle:HiddenField")
|
596
|
+
@Deprecated
|
597
|
+
private native int compress(byte[] srcBuf, int width, int pitch,
|
598
|
+
int height, int pixelFormat, byte[] jpegBuf, int jpegSubsamp, int jpegQual,
|
599
|
+
int flags) throws TJException;
|
600
|
+
|
601
|
+
@SuppressWarnings("checkstyle:HiddenField")
|
602
|
+
private native int compress(byte[] srcBuf, int x, int y, int width,
|
603
|
+
int pitch, int height, int pixelFormat, byte[] jpegBuf, int jpegSubsamp,
|
604
|
+
int jpegQual, int flags) throws TJException;
|
605
|
+
|
606
|
+
@SuppressWarnings("checkstyle:HiddenField")
|
607
|
+
@Deprecated
|
608
|
+
private native int compress(int[] srcBuf, int width, int stride,
|
609
|
+
int height, int pixelFormat, byte[] jpegBuf, int jpegSubsamp, int jpegQual,
|
610
|
+
int flags) throws TJException;
|
611
|
+
|
612
|
+
@SuppressWarnings("checkstyle:HiddenField")
|
613
|
+
private native int compress(int[] srcBuf, int x, int y, int width,
|
614
|
+
int stride, int height, int pixelFormat, byte[] jpegBuf, int jpegSubsamp,
|
615
|
+
int jpegQual, int flags) throws TJException;
|
616
|
+
|
617
|
+
@SuppressWarnings("checkstyle:HiddenField")
|
618
|
+
private native int compressFromYUV(byte[][] srcPlanes, int[] srcOffsets,
|
619
|
+
int width, int[] srcStrides, int height, int subsamp, byte[] jpegBuf,
|
620
|
+
int jpegQual, int flags)
|
621
|
+
throws TJException;
|
622
|
+
|
623
|
+
@SuppressWarnings("checkstyle:HiddenField")
|
624
|
+
@Deprecated
|
625
|
+
private native void encodeYUV(byte[] srcBuf, int width, int pitch,
|
626
|
+
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
627
|
+
throws TJException;
|
628
|
+
|
629
|
+
@SuppressWarnings("checkstyle:HiddenField")
|
630
|
+
private native void encodeYUV(byte[] srcBuf, int x, int y, int width,
|
631
|
+
int pitch, int height, int pixelFormat, byte[][] dstPlanes,
|
632
|
+
int[] dstOffsets, int[] dstStrides, int subsamp, int flags)
|
633
|
+
throws TJException;
|
634
|
+
|
635
|
+
@SuppressWarnings("checkstyle:HiddenField")
|
636
|
+
@Deprecated
|
637
|
+
private native void encodeYUV(int[] srcBuf, int width, int stride,
|
638
|
+
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
639
|
+
throws TJException;
|
640
|
+
|
641
|
+
@SuppressWarnings("checkstyle:HiddenField")
|
642
|
+
private native void encodeYUV(int[] srcBuf, int x, int y, int width,
|
643
|
+
int srcStride, int height, int pixelFormat, byte[][] dstPlanes,
|
644
|
+
int[] dstOffsets, int[] dstStrides, int subsamp, int flags)
|
645
|
+
throws TJException;
|
646
|
+
|
647
|
+
static {
|
648
|
+
TJLoader.load();
|
649
|
+
}
|
650
|
+
|
651
|
+
private void checkSourceImage() {
|
652
|
+
if (srcWidth < 1 || srcHeight < 1)
|
653
|
+
throw new IllegalStateException(NO_ASSOC_ERROR);
|
654
|
+
}
|
655
|
+
|
656
|
+
private void checkSubsampling() {
|
657
|
+
if (subsamp < 0)
|
658
|
+
throw new IllegalStateException("Subsampling level not set");
|
659
|
+
}
|
660
|
+
|
661
|
+
private long handle = 0;
|
662
|
+
private byte[] srcBuf = null;
|
663
|
+
private int[] srcBufInt = null;
|
664
|
+
private int srcWidth = 0;
|
665
|
+
private int srcHeight = 0;
|
666
|
+
private int srcX = -1;
|
667
|
+
private int srcY = -1;
|
668
|
+
private int srcPitch = 0;
|
669
|
+
private int srcStride = 0;
|
670
|
+
private int srcPixelFormat = -1;
|
671
|
+
private YUVImage srcYUVImage = null;
|
672
|
+
private int subsamp = -1;
|
673
|
+
private int jpegQuality = -1;
|
674
|
+
private int compressedSize = 0;
|
675
|
+
private int yuvPad = 4;
|
676
|
+
private ByteOrder byteOrder = null;
|
677
|
+
}
|