laag-libjpeg-turbo 1.5.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (444) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +57 -0
  3. data/LICENSE.txt +139 -0
  4. data/README.org +34 -0
  5. data/ext/laag/libjpeg-turbo/extconf.rb +16 -0
  6. data/laag-libjpeg-turbo.gemspec +20 -0
  7. data/lib/laag/libjpeg-turbo.rb +29 -0
  8. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/.gitignore +14 -0
  9. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/.travis.yml +131 -0
  10. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/BUILDING.md +964 -0
  11. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/CMakeLists.txt +962 -0
  12. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/ChangeLog.md +1151 -0
  13. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/LICENSE.md +139 -0
  14. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/Makefile.am +794 -0
  15. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/README.ijg +279 -0
  16. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/README.md +341 -0
  17. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/acinclude.m4 +287 -0
  18. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/appveyor.yml +57 -0
  19. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/bmp.c +341 -0
  20. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/bmp.h +42 -0
  21. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/cderror.h +136 -0
  22. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/cdjpeg.c +144 -0
  23. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/cdjpeg.h +153 -0
  24. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/change.log +315 -0
  25. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/ci/keys.enc +0 -0
  26. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/cjpeg.1 +351 -0
  27. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/cjpeg.c +644 -0
  28. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/cmakescripts/cmake_uninstall.cmake.in +24 -0
  29. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/cmakescripts/testclean.cmake +39 -0
  30. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/coderules.txt +78 -0
  31. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/configure.ac +616 -0
  32. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/djpeg.1 +293 -0
  33. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/djpeg.c +782 -0
  34. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/annotated.html +104 -0
  35. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/bc_s.png +0 -0
  36. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/bdwn.png +0 -0
  37. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/classes.html +106 -0
  38. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/closed.png +0 -0
  39. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/doxygen-extra.css +3 -0
  40. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/doxygen.css +1184 -0
  41. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/doxygen.png +0 -0
  42. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/dynsections.js +97 -0
  43. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2blank.png +0 -0
  44. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2cl.png +0 -0
  45. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2doc.png +0 -0
  46. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2folderclosed.png +0 -0
  47. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2folderopen.png +0 -0
  48. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2lastnode.png +0 -0
  49. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2link.png +0 -0
  50. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2mlastnode.png +0 -0
  51. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2mnode.png +0 -0
  52. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2mo.png +0 -0
  53. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2node.png +0 -0
  54. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2ns.png +0 -0
  55. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2plastnode.png +0 -0
  56. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2pnode.png +0 -0
  57. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2splitbar.png +0 -0
  58. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/ftv2vertline.png +0 -0
  59. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/functions.html +134 -0
  60. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/functions_vars.html +134 -0
  61. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/group___turbo_j_p_e_g.html +2446 -0
  62. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/index.html +90 -0
  63. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/jquery.js +8 -0
  64. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/modules.html +95 -0
  65. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/nav_f.png +0 -0
  66. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/nav_g.png +0 -0
  67. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/nav_h.png +0 -0
  68. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/open.png +0 -0
  69. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_63.html +26 -0
  70. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_63.js +4 -0
  71. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_64.html +26 -0
  72. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_64.js +5 -0
  73. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_68.html +26 -0
  74. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_68.js +4 -0
  75. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_6e.html +26 -0
  76. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_6e.js +4 -0
  77. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_6f.html +26 -0
  78. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_6f.js +5 -0
  79. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_72.html +26 -0
  80. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_72.js +4 -0
  81. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_74.html +26 -0
  82. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_74.js +89 -0
  83. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_77.html +26 -0
  84. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_77.js +4 -0
  85. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_78.html +26 -0
  86. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_78.js +4 -0
  87. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_79.html +26 -0
  88. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/all_79.js +4 -0
  89. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/classes_74.html +26 -0
  90. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/classes_74.js +6 -0
  91. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/close.png +0 -0
  92. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/enums_74.html +26 -0
  93. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/enums_74.js +7 -0
  94. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/enumvalues_74.html +26 -0
  95. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/enumvalues_74.js +34 -0
  96. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/functions_74.html +26 -0
  97. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/functions_74.js +28 -0
  98. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/groups_74.html +26 -0
  99. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/groups_74.js +4 -0
  100. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/mag_sel.png +0 -0
  101. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/nomatches.html +12 -0
  102. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/search.css +271 -0
  103. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/search.js +809 -0
  104. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/search_l.png +0 -0
  105. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/search_m.png +0 -0
  106. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/search_r.png +0 -0
  107. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/typedefs_74.html +26 -0
  108. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/typedefs_74.js +5 -0
  109. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_63.html +26 -0
  110. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_63.js +4 -0
  111. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_64.html +26 -0
  112. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_64.js +5 -0
  113. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_68.html +26 -0
  114. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_68.js +4 -0
  115. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_6e.html +26 -0
  116. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_6e.js +4 -0
  117. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_6f.html +26 -0
  118. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_6f.js +5 -0
  119. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_72.html +26 -0
  120. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_72.js +4 -0
  121. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_74.html +26 -0
  122. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_74.js +9 -0
  123. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_77.html +26 -0
  124. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_77.js +4 -0
  125. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_78.html +26 -0
  126. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_78.js +4 -0
  127. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_79.html +26 -0
  128. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/search/variables_79.js +4 -0
  129. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/structtjregion.html +186 -0
  130. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/structtjscalingfactor.html +148 -0
  131. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/structtjtransform.html +212 -0
  132. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/sync_off.png +0 -0
  133. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/sync_on.png +0 -0
  134. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/tab_a.png +0 -0
  135. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/tab_b.png +0 -0
  136. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/tab_h.png +0 -0
  137. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/tab_s.png +0 -0
  138. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doc/html/tabs.css +60 -0
  139. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doxygen-extra.css +3 -0
  140. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/doxygen.config +16 -0
  141. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/example.c +433 -0
  142. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jaricom.c +156 -0
  143. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/CMakeLists.txt +57 -0
  144. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/MANIFEST.MF +2 -0
  145. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/Makefile.am +75 -0
  146. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/README +52 -0
  147. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/TJBench.java +926 -0
  148. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/TJExample.java +362 -0
  149. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/TJUnitTest.java +959 -0
  150. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/allclasses-frame.html +24 -0
  151. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/allclasses-noframe.html +24 -0
  152. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/constant-values.html +479 -0
  153. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/deprecated-list.html +248 -0
  154. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/help-doc.html +206 -0
  155. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/index-all.html +980 -0
  156. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/index.html +70 -0
  157. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/org/libjpegturbo/turbojpeg/TJ.html +1254 -0
  158. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html +922 -0
  159. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html +237 -0
  160. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html +1235 -0
  161. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/org/libjpegturbo/turbojpeg/TJException.html +287 -0
  162. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/org/libjpegturbo/turbojpeg/TJScalingFactor.html +333 -0
  163. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/org/libjpegturbo/turbojpeg/TJTransform.html +706 -0
  164. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html +417 -0
  165. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/org/libjpegturbo/turbojpeg/YUVImage.html +761 -0
  166. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/org/libjpegturbo/turbojpeg/package-frame.html +31 -0
  167. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/org/libjpegturbo/turbojpeg/package-summary.html +198 -0
  168. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/org/libjpegturbo/turbojpeg/package-tree.html +156 -0
  169. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/overview-tree.html +160 -0
  170. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/package-list +1 -0
  171. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/resources/background.gif +0 -0
  172. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/resources/tab.gif +0 -0
  173. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/resources/titlebar.gif +0 -0
  174. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/resources/titlebar_end.gif +0 -0
  175. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/serialized-form.html +159 -0
  176. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/doc/stylesheet.css +474 -0
  177. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org/libjpegturbo/turbojpeg/TJ.java +513 -0
  178. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org/libjpegturbo/turbojpeg/TJCompressor.java +658 -0
  179. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org/libjpegturbo/turbojpeg/TJCustomFilter.java +76 -0
  180. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org/libjpegturbo/turbojpeg/TJDecompressor.java +909 -0
  181. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org/libjpegturbo/turbojpeg/TJException.java +53 -0
  182. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org/libjpegturbo/turbojpeg/TJLoader.java.in +35 -0
  183. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org/libjpegturbo/turbojpeg/TJLoader.java.tmpl +59 -0
  184. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org/libjpegturbo/turbojpeg/TJScalingFactor.java +104 -0
  185. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org/libjpegturbo/turbojpeg/TJTransform.java +208 -0
  186. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org/libjpegturbo/turbojpeg/TJTransformer.java +163 -0
  187. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org/libjpegturbo/turbojpeg/YUVImage.java +443 -0
  188. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org_libjpegturbo_turbojpeg_TJ.h +129 -0
  189. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org_libjpegturbo_turbojpeg_TJCompressor.h +101 -0
  190. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org_libjpegturbo_turbojpeg_TJDecompressor.h +101 -0
  191. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/java/org_libjpegturbo_turbojpeg_TJTransformer.h +29 -0
  192. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcapimin.c +295 -0
  193. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcapistd.c +162 -0
  194. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcarith.c +928 -0
  195. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jccoefct.c +449 -0
  196. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jccolext.c +148 -0
  197. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jccolor.c +719 -0
  198. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcdctmgr.c +721 -0
  199. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jchuff.c +1091 -0
  200. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jchuff.h +43 -0
  201. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcinit.c +77 -0
  202. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcmainct.c +162 -0
  203. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcmarker.c +665 -0
  204. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcmaster.c +639 -0
  205. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcomapi.c +109 -0
  206. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jconfig.h.in +73 -0
  207. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jconfig.txt +143 -0
  208. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jconfigint.h.in +17 -0
  209. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcparam.c +542 -0
  210. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcphuff.c +834 -0
  211. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcprepct.c +357 -0
  212. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcsample.c +539 -0
  213. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jcstest.c +126 -0
  214. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jctrans.c +402 -0
  215. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdapimin.c +407 -0
  216. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdapistd.c +637 -0
  217. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdarith.c +769 -0
  218. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdatadst-tj.c +202 -0
  219. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdatadst.c +293 -0
  220. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdatasrc-tj.c +191 -0
  221. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdatasrc.c +295 -0
  222. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdcoefct.c +693 -0
  223. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdcoefct.h +82 -0
  224. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdcol565.c +384 -0
  225. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdcolext.c +143 -0
  226. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdcolor.c +897 -0
  227. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdct.h +208 -0
  228. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jddctmgr.c +352 -0
  229. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdhuff.c +822 -0
  230. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdhuff.h +234 -0
  231. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdinput.c +405 -0
  232. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdmainct.c +456 -0
  233. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdmainct.h +71 -0
  234. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdmarker.c +1377 -0
  235. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdmaster.c +736 -0
  236. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdmaster.h +28 -0
  237. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdmerge.c +627 -0
  238. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdmrg565.c +356 -0
  239. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdmrgext.c +186 -0
  240. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdphuff.c +674 -0
  241. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdpostct.c +290 -0
  242. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdsample.c +517 -0
  243. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdsample.h +50 -0
  244. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jdtrans.c +155 -0
  245. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jerror.c +251 -0
  246. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jerror.h +317 -0
  247. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jfdctflt.c +169 -0
  248. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jfdctfst.c +227 -0
  249. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jfdctint.c +286 -0
  250. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jidctflt.c +240 -0
  251. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jidctfst.c +371 -0
  252. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jidctint.c +2627 -0
  253. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jidctred.c +403 -0
  254. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jinclude.h +84 -0
  255. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jmemmgr.c +1183 -0
  256. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jmemnobs.c +115 -0
  257. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jmemsys.h +178 -0
  258. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jmorecfg.h +421 -0
  259. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jpeg_nbits_table.h +4098 -0
  260. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jpegcomp.h +31 -0
  261. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jpegint.h +368 -0
  262. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jpeglib.h +1122 -0
  263. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jpegtran.1 +290 -0
  264. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jpegtran.c +551 -0
  265. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jquant1.c +857 -0
  266. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jquant2.c +1282 -0
  267. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jsimd.h +93 -0
  268. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jsimd_none.c +404 -0
  269. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jsimddct.h +74 -0
  270. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jstdhuff.c +135 -0
  271. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jutils.c +133 -0
  272. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/jversion.h +49 -0
  273. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/libjpeg.map.in +11 -0
  274. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/libjpeg.txt +3104 -0
  275. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/md5/CMakeLists.txt +1 -0
  276. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/md5/Makefile.am +4 -0
  277. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/md5/md5.c +340 -0
  278. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/md5/md5.h +49 -0
  279. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/md5/md5cmp.c +60 -0
  280. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/md5/md5hl.c +114 -0
  281. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/rdbmp.c +483 -0
  282. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/rdcolmap.c +254 -0
  283. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/rdgif.c +39 -0
  284. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/rdjpgcom.1 +63 -0
  285. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/rdjpgcom.c +510 -0
  286. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/rdppm.c +471 -0
  287. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/rdrle.c +389 -0
  288. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/rdswitch.c +424 -0
  289. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/rdtarga.c +503 -0
  290. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/release/Distribution.xml +24 -0
  291. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/release/License.rtf +20 -0
  292. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/release/ReadMe.txt +5 -0
  293. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/release/Welcome.rtf +17 -0
  294. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/release/deb-control.tmpl +31 -0
  295. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/release/libjpeg-turbo.nsi.in +162 -0
  296. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/release/libjpeg-turbo.spec.in +164 -0
  297. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/release/libjpeg.pc.in +10 -0
  298. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/release/libturbojpeg.pc.in +10 -0
  299. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/release/makecygwinpkg.in +42 -0
  300. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/release/makedpkg.in +82 -0
  301. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/release/makemacpkg.in +470 -0
  302. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/release/uninstall.in +112 -0
  303. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/sharedlib/CMakeLists.txt +73 -0
  304. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/CMakeLists.txt +81 -0
  305. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/Makefile.am +102 -0
  306. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jccolext-altivec.c +267 -0
  307. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jccolext-mmx.asm +476 -0
  308. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jccolext-sse2-64.asm +486 -0
  309. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jccolext-sse2.asm +503 -0
  310. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jccolor-altivec.c +104 -0
  311. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jccolor-mmx.asm +122 -0
  312. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jccolor-sse2-64.asm +121 -0
  313. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jccolor-sse2.asm +121 -0
  314. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcgray-altivec.c +99 -0
  315. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcgray-mmx.asm +115 -0
  316. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcgray-sse2-64.asm +114 -0
  317. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcgray-sse2.asm +114 -0
  318. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcgryext-altivec.c +227 -0
  319. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcgryext-mmx.asm +356 -0
  320. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcgryext-sse2-64.asm +365 -0
  321. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcgryext-sse2.asm +384 -0
  322. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jchuff-sse2-64.asm +360 -0
  323. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jchuff-sse2.asm +426 -0
  324. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcolsamp.inc +104 -0
  325. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcsample-altivec.c +158 -0
  326. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcsample-mmx.asm +323 -0
  327. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcsample-sse2-64.asm +329 -0
  328. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcsample-sse2.asm +350 -0
  329. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jcsample.h +28 -0
  330. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdcolext-altivec.c +274 -0
  331. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdcolext-mmx.asm +404 -0
  332. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdcolext-sse2-64.asm +440 -0
  333. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdcolext-sse2.asm +459 -0
  334. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdcolor-altivec.c +96 -0
  335. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdcolor-mmx.asm +119 -0
  336. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdcolor-sse2-64.asm +119 -0
  337. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdcolor-sse2.asm +119 -0
  338. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdct.inc +27 -0
  339. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdmerge-altivec.c +108 -0
  340. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdmerge-mmx.asm +125 -0
  341. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdmerge-sse2-64.asm +125 -0
  342. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdmerge-sse2.asm +125 -0
  343. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdmrgext-altivec.c +323 -0
  344. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdmrgext-mmx.asm +463 -0
  345. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdmrgext-sse2-64.asm +537 -0
  346. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdmrgext-sse2.asm +518 -0
  347. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdsample-altivec.c +392 -0
  348. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdsample-mmx.asm +736 -0
  349. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdsample-sse2-64.asm +670 -0
  350. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jdsample-sse2.asm +728 -0
  351. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jfdctflt-3dn.asm +319 -0
  352. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jfdctflt-sse-64.asm +357 -0
  353. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jfdctflt-sse.asm +369 -0
  354. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jfdctfst-altivec.c +156 -0
  355. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jfdctfst-mmx.asm +396 -0
  356. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jfdctfst-sse2-64.asm +391 -0
  357. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jfdctfst-sse2.asm +403 -0
  358. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jfdctint-altivec.c +262 -0
  359. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jfdctint-mmx.asm +621 -0
  360. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jfdctint-sse2-64.asm +621 -0
  361. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jfdctint-sse2.asm +633 -0
  362. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctflt-3dn.asm +451 -0
  363. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctflt-sse.asm +571 -0
  364. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctflt-sse2-64.asm +482 -0
  365. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctflt-sse2.asm +497 -0
  366. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctfst-altivec.c +257 -0
  367. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctfst-mmx.asm +499 -0
  368. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctfst-sse2-64.asm +491 -0
  369. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctfst-sse2.asm +501 -0
  370. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctint-altivec.c +359 -0
  371. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctint-mmx.asm +851 -0
  372. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctint-sse2-64.asm +847 -0
  373. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctint-sse2.asm +858 -0
  374. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctred-mmx.asm +705 -0
  375. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctred-sse2-64.asm +575 -0
  376. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jidctred-sse2.asm +593 -0
  377. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jpeg_nbits_table.inc +4097 -0
  378. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jquant-3dn.asm +232 -0
  379. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jquant-mmx.asm +273 -0
  380. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jquant-sse.asm +210 -0
  381. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jquantf-sse2-64.asm +157 -0
  382. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jquantf-sse2.asm +170 -0
  383. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jquanti-altivec.c +252 -0
  384. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jquanti-sse2-64.asm +186 -0
  385. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jquanti-sse2.asm +199 -0
  386. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimd.h +871 -0
  387. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimd_altivec.h +99 -0
  388. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimd_arm.c +728 -0
  389. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimd_arm64.c +803 -0
  390. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimd_arm64_neon.S +3425 -0
  391. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimd_arm_neon.S +2878 -0
  392. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimd_i386.c +1091 -0
  393. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimd_mips.c +1140 -0
  394. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimd_mips_dspr2.S +4486 -0
  395. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimd_mips_dspr2_asm.h +283 -0
  396. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimd_powerpc.c +852 -0
  397. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimd_x86_64.c +887 -0
  398. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimdcfg.inc.h +130 -0
  399. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimdcpu.asm +104 -0
  400. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/jsimdext.inc +375 -0
  401. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/simd/nasm_lt.sh +60 -0
  402. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/structure.txt +904 -0
  403. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/testimages/nightshot_iso_100.bmp +0 -0
  404. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/testimages/nightshot_iso_100.txt +25 -0
  405. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/testimages/testimgari.jpg +0 -0
  406. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/testimages/testimgint.jpg +0 -0
  407. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/testimages/testorig.jpg +0 -0
  408. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/testimages/testorig.ppm +4 -0
  409. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/testimages/testorig12.jpg +0 -0
  410. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/testimages/vgl_5674_0098.bmp +0 -0
  411. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/testimages/vgl_6434_0018a.bmp +0 -0
  412. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/testimages/vgl_6548_0026a.bmp +0 -0
  413. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/tjbench.c +1010 -0
  414. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/tjbenchtest.in +252 -0
  415. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/tjbenchtest.java.in +207 -0
  416. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/tjexampletest.in +150 -0
  417. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/tjunittest.c +734 -0
  418. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/tjutil.c +66 -0
  419. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/tjutil.h +47 -0
  420. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/transupp.c +1626 -0
  421. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/transupp.h +207 -0
  422. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/turbojpeg-jni.c +1166 -0
  423. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/turbojpeg-mapfile +56 -0
  424. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/turbojpeg-mapfile.jni +92 -0
  425. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/turbojpeg.c +2175 -0
  426. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/turbojpeg.h +1545 -0
  427. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/usage.txt +635 -0
  428. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/win/jconfig.h.in +51 -0
  429. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/win/jconfigint.h.in +13 -0
  430. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/win/jpeg62-memsrcdst.def +106 -0
  431. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/win/jpeg62.def +104 -0
  432. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/win/jpeg7-memsrcdst.def +108 -0
  433. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/win/jpeg7.def +106 -0
  434. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/win/jpeg8.def +109 -0
  435. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/win/jsimdcfg.inc +94 -0
  436. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/wizard.txt +211 -0
  437. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/wrbmp.c +494 -0
  438. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/wrgif.c +413 -0
  439. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/wrjpgcom.1 +103 -0
  440. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/wrjpgcom.c +592 -0
  441. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/wrppm.c +280 -0
  442. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/wrrle.c +308 -0
  443. data/vendor/github.com/libjpeg-turbo/libjpeg-turbo/wrtarga.c +261 -0
  444. metadata +509 -0
@@ -0,0 +1,143 @@
1
+ /*
2
+ * jdcolext.c
3
+ *
4
+ * This file was part of the Independent JPEG Group's software:
5
+ * Copyright (C) 1991-1997, Thomas G. Lane.
6
+ * libjpeg-turbo Modifications:
7
+ * Copyright (C) 2009, 2011, 2015, D. R. Commander.
8
+ * For conditions of distribution and use, see the accompanying README.ijg
9
+ * file.
10
+ *
11
+ * This file contains output colorspace conversion routines.
12
+ */
13
+
14
+
15
+ /* This file is included by jdcolor.c */
16
+
17
+
18
+ /*
19
+ * Convert some rows of samples to the output colorspace.
20
+ *
21
+ * Note that we change from noninterleaved, one-plane-per-component format
22
+ * to interleaved-pixel format. The output buffer is therefore three times
23
+ * as wide as the input buffer.
24
+ * A starting row offset is provided only for the input buffer. The caller
25
+ * can easily adjust the passed output_buf value to accommodate any row
26
+ * offset required on that side.
27
+ */
28
+
29
+ INLINE
30
+ LOCAL(void)
31
+ ycc_rgb_convert_internal (j_decompress_ptr cinfo,
32
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
33
+ JSAMPARRAY output_buf, int num_rows)
34
+ {
35
+ my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
36
+ register int y, cb, cr;
37
+ register JSAMPROW outptr;
38
+ register JSAMPROW inptr0, inptr1, inptr2;
39
+ register JDIMENSION col;
40
+ JDIMENSION num_cols = cinfo->output_width;
41
+ /* copy these pointers into registers if possible */
42
+ register JSAMPLE * range_limit = cinfo->sample_range_limit;
43
+ register int * Crrtab = cconvert->Cr_r_tab;
44
+ register int * Cbbtab = cconvert->Cb_b_tab;
45
+ register JLONG * Crgtab = cconvert->Cr_g_tab;
46
+ register JLONG * Cbgtab = cconvert->Cb_g_tab;
47
+ SHIFT_TEMPS
48
+
49
+ while (--num_rows >= 0) {
50
+ inptr0 = input_buf[0][input_row];
51
+ inptr1 = input_buf[1][input_row];
52
+ inptr2 = input_buf[2][input_row];
53
+ input_row++;
54
+ outptr = *output_buf++;
55
+ for (col = 0; col < num_cols; col++) {
56
+ y = GETJSAMPLE(inptr0[col]);
57
+ cb = GETJSAMPLE(inptr1[col]);
58
+ cr = GETJSAMPLE(inptr2[col]);
59
+ /* Range-limiting is essential due to noise introduced by DCT losses. */
60
+ outptr[RGB_RED] = range_limit[y + Crrtab[cr]];
61
+ outptr[RGB_GREEN] = range_limit[y +
62
+ ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
63
+ SCALEBITS))];
64
+ outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]];
65
+ /* Set unused byte to 0xFF so it can be interpreted as an opaque */
66
+ /* alpha channel value */
67
+ #ifdef RGB_ALPHA
68
+ outptr[RGB_ALPHA] = 0xFF;
69
+ #endif
70
+ outptr += RGB_PIXELSIZE;
71
+ }
72
+ }
73
+ }
74
+
75
+
76
+ /*
77
+ * Convert grayscale to RGB: just duplicate the graylevel three times.
78
+ * This is provided to support applications that don't want to cope
79
+ * with grayscale as a separate case.
80
+ */
81
+
82
+ INLINE
83
+ LOCAL(void)
84
+ gray_rgb_convert_internal (j_decompress_ptr cinfo,
85
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
86
+ JSAMPARRAY output_buf, int num_rows)
87
+ {
88
+ register JSAMPROW inptr, outptr;
89
+ register JDIMENSION col;
90
+ JDIMENSION num_cols = cinfo->output_width;
91
+
92
+ while (--num_rows >= 0) {
93
+ inptr = input_buf[0][input_row++];
94
+ outptr = *output_buf++;
95
+ for (col = 0; col < num_cols; col++) {
96
+ /* We can dispense with GETJSAMPLE() here */
97
+ outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
98
+ /* Set unused byte to 0xFF so it can be interpreted as an opaque */
99
+ /* alpha channel value */
100
+ #ifdef RGB_ALPHA
101
+ outptr[RGB_ALPHA] = 0xFF;
102
+ #endif
103
+ outptr += RGB_PIXELSIZE;
104
+ }
105
+ }
106
+ }
107
+
108
+
109
+ /*
110
+ * Convert RGB to extended RGB: just swap the order of source pixels
111
+ */
112
+
113
+ INLINE
114
+ LOCAL(void)
115
+ rgb_rgb_convert_internal (j_decompress_ptr cinfo,
116
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
117
+ JSAMPARRAY output_buf, int num_rows)
118
+ {
119
+ register JSAMPROW inptr0, inptr1, inptr2;
120
+ register JSAMPROW outptr;
121
+ register JDIMENSION col;
122
+ JDIMENSION num_cols = cinfo->output_width;
123
+
124
+ while (--num_rows >= 0) {
125
+ inptr0 = input_buf[0][input_row];
126
+ inptr1 = input_buf[1][input_row];
127
+ inptr2 = input_buf[2][input_row];
128
+ input_row++;
129
+ outptr = *output_buf++;
130
+ for (col = 0; col < num_cols; col++) {
131
+ /* We can dispense with GETJSAMPLE() here */
132
+ outptr[RGB_RED] = inptr0[col];
133
+ outptr[RGB_GREEN] = inptr1[col];
134
+ outptr[RGB_BLUE] = inptr2[col];
135
+ /* Set unused byte to 0xFF so it can be interpreted as an opaque */
136
+ /* alpha channel value */
137
+ #ifdef RGB_ALPHA
138
+ outptr[RGB_ALPHA] = 0xFF;
139
+ #endif
140
+ outptr += RGB_PIXELSIZE;
141
+ }
142
+ }
143
+ }
@@ -0,0 +1,897 @@
1
+ /*
2
+ * jdcolor.c
3
+ *
4
+ * This file was part of the Independent JPEG Group's software:
5
+ * Copyright (C) 1991-1997, Thomas G. Lane.
6
+ * Modified 2011 by Guido Vollbeding.
7
+ * libjpeg-turbo Modifications:
8
+ * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
9
+ * Copyright (C) 2009, 2011-2012, 2014-2015, D. R. Commander.
10
+ * Copyright (C) 2013, Linaro Limited.
11
+ * For conditions of distribution and use, see the accompanying README.ijg
12
+ * file.
13
+ *
14
+ * This file contains output colorspace conversion routines.
15
+ */
16
+
17
+ #define JPEG_INTERNALS
18
+ #include "jinclude.h"
19
+ #include "jpeglib.h"
20
+ #include "jsimd.h"
21
+ #include "jconfigint.h"
22
+
23
+
24
+ /* Private subobject */
25
+
26
+ typedef struct {
27
+ struct jpeg_color_deconverter pub; /* public fields */
28
+
29
+ /* Private state for YCC->RGB conversion */
30
+ int *Cr_r_tab; /* => table for Cr to R conversion */
31
+ int *Cb_b_tab; /* => table for Cb to B conversion */
32
+ JLONG *Cr_g_tab; /* => table for Cr to G conversion */
33
+ JLONG *Cb_g_tab; /* => table for Cb to G conversion */
34
+
35
+ /* Private state for RGB->Y conversion */
36
+ JLONG *rgb_y_tab; /* => table for RGB to Y conversion */
37
+ } my_color_deconverter;
38
+
39
+ typedef my_color_deconverter *my_cconvert_ptr;
40
+
41
+
42
+ /**************** YCbCr -> RGB conversion: most common case **************/
43
+ /**************** RGB -> Y conversion: less common case **************/
44
+
45
+ /*
46
+ * YCbCr is defined per CCIR 601-1, except that Cb and Cr are
47
+ * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.
48
+ * The conversion equations to be implemented are therefore
49
+ *
50
+ * R = Y + 1.40200 * Cr
51
+ * G = Y - 0.34414 * Cb - 0.71414 * Cr
52
+ * B = Y + 1.77200 * Cb
53
+ *
54
+ * Y = 0.29900 * R + 0.58700 * G + 0.11400 * B
55
+ *
56
+ * where Cb and Cr represent the incoming values less CENTERJSAMPLE.
57
+ * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)
58
+ *
59
+ * To avoid floating-point arithmetic, we represent the fractional constants
60
+ * as integers scaled up by 2^16 (about 4 digits precision); we have to divide
61
+ * the products by 2^16, with appropriate rounding, to get the correct answer.
62
+ * Notice that Y, being an integral input, does not contribute any fraction
63
+ * so it need not participate in the rounding.
64
+ *
65
+ * For even more speed, we avoid doing any multiplications in the inner loop
66
+ * by precalculating the constants times Cb and Cr for all possible values.
67
+ * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);
68
+ * for 12-bit samples it is still acceptable. It's not very reasonable for
69
+ * 16-bit samples, but if you want lossless storage you shouldn't be changing
70
+ * colorspace anyway.
71
+ * The Cr=>R and Cb=>B values can be rounded to integers in advance; the
72
+ * values for the G calculation are left scaled up, since we must add them
73
+ * together before rounding.
74
+ */
75
+
76
+ #define SCALEBITS 16 /* speediest right-shift on some machines */
77
+ #define ONE_HALF ((JLONG) 1 << (SCALEBITS-1))
78
+ #define FIX(x) ((JLONG) ((x) * (1L<<SCALEBITS) + 0.5))
79
+
80
+ /* We allocate one big table for RGB->Y conversion and divide it up into
81
+ * three parts, instead of doing three alloc_small requests. This lets us
82
+ * use a single table base address, which can be held in a register in the
83
+ * inner loops on many machines (more than can hold all three addresses,
84
+ * anyway).
85
+ */
86
+
87
+ #define R_Y_OFF 0 /* offset to R => Y section */
88
+ #define G_Y_OFF (1*(MAXJSAMPLE+1)) /* offset to G => Y section */
89
+ #define B_Y_OFF (2*(MAXJSAMPLE+1)) /* etc. */
90
+ #define TABLE_SIZE (3*(MAXJSAMPLE+1))
91
+
92
+
93
+ /* Include inline routines for colorspace extensions */
94
+
95
+ #include "jdcolext.c"
96
+ #undef RGB_RED
97
+ #undef RGB_GREEN
98
+ #undef RGB_BLUE
99
+ #undef RGB_PIXELSIZE
100
+
101
+ #define RGB_RED EXT_RGB_RED
102
+ #define RGB_GREEN EXT_RGB_GREEN
103
+ #define RGB_BLUE EXT_RGB_BLUE
104
+ #define RGB_PIXELSIZE EXT_RGB_PIXELSIZE
105
+ #define ycc_rgb_convert_internal ycc_extrgb_convert_internal
106
+ #define gray_rgb_convert_internal gray_extrgb_convert_internal
107
+ #define rgb_rgb_convert_internal rgb_extrgb_convert_internal
108
+ #include "jdcolext.c"
109
+ #undef RGB_RED
110
+ #undef RGB_GREEN
111
+ #undef RGB_BLUE
112
+ #undef RGB_PIXELSIZE
113
+ #undef ycc_rgb_convert_internal
114
+ #undef gray_rgb_convert_internal
115
+ #undef rgb_rgb_convert_internal
116
+
117
+ #define RGB_RED EXT_RGBX_RED
118
+ #define RGB_GREEN EXT_RGBX_GREEN
119
+ #define RGB_BLUE EXT_RGBX_BLUE
120
+ #define RGB_ALPHA 3
121
+ #define RGB_PIXELSIZE EXT_RGBX_PIXELSIZE
122
+ #define ycc_rgb_convert_internal ycc_extrgbx_convert_internal
123
+ #define gray_rgb_convert_internal gray_extrgbx_convert_internal
124
+ #define rgb_rgb_convert_internal rgb_extrgbx_convert_internal
125
+ #include "jdcolext.c"
126
+ #undef RGB_RED
127
+ #undef RGB_GREEN
128
+ #undef RGB_BLUE
129
+ #undef RGB_ALPHA
130
+ #undef RGB_PIXELSIZE
131
+ #undef ycc_rgb_convert_internal
132
+ #undef gray_rgb_convert_internal
133
+ #undef rgb_rgb_convert_internal
134
+
135
+ #define RGB_RED EXT_BGR_RED
136
+ #define RGB_GREEN EXT_BGR_GREEN
137
+ #define RGB_BLUE EXT_BGR_BLUE
138
+ #define RGB_PIXELSIZE EXT_BGR_PIXELSIZE
139
+ #define ycc_rgb_convert_internal ycc_extbgr_convert_internal
140
+ #define gray_rgb_convert_internal gray_extbgr_convert_internal
141
+ #define rgb_rgb_convert_internal rgb_extbgr_convert_internal
142
+ #include "jdcolext.c"
143
+ #undef RGB_RED
144
+ #undef RGB_GREEN
145
+ #undef RGB_BLUE
146
+ #undef RGB_PIXELSIZE
147
+ #undef ycc_rgb_convert_internal
148
+ #undef gray_rgb_convert_internal
149
+ #undef rgb_rgb_convert_internal
150
+
151
+ #define RGB_RED EXT_BGRX_RED
152
+ #define RGB_GREEN EXT_BGRX_GREEN
153
+ #define RGB_BLUE EXT_BGRX_BLUE
154
+ #define RGB_ALPHA 3
155
+ #define RGB_PIXELSIZE EXT_BGRX_PIXELSIZE
156
+ #define ycc_rgb_convert_internal ycc_extbgrx_convert_internal
157
+ #define gray_rgb_convert_internal gray_extbgrx_convert_internal
158
+ #define rgb_rgb_convert_internal rgb_extbgrx_convert_internal
159
+ #include "jdcolext.c"
160
+ #undef RGB_RED
161
+ #undef RGB_GREEN
162
+ #undef RGB_BLUE
163
+ #undef RGB_ALPHA
164
+ #undef RGB_PIXELSIZE
165
+ #undef ycc_rgb_convert_internal
166
+ #undef gray_rgb_convert_internal
167
+ #undef rgb_rgb_convert_internal
168
+
169
+ #define RGB_RED EXT_XBGR_RED
170
+ #define RGB_GREEN EXT_XBGR_GREEN
171
+ #define RGB_BLUE EXT_XBGR_BLUE
172
+ #define RGB_ALPHA 0
173
+ #define RGB_PIXELSIZE EXT_XBGR_PIXELSIZE
174
+ #define ycc_rgb_convert_internal ycc_extxbgr_convert_internal
175
+ #define gray_rgb_convert_internal gray_extxbgr_convert_internal
176
+ #define rgb_rgb_convert_internal rgb_extxbgr_convert_internal
177
+ #include "jdcolext.c"
178
+ #undef RGB_RED
179
+ #undef RGB_GREEN
180
+ #undef RGB_BLUE
181
+ #undef RGB_ALPHA
182
+ #undef RGB_PIXELSIZE
183
+ #undef ycc_rgb_convert_internal
184
+ #undef gray_rgb_convert_internal
185
+ #undef rgb_rgb_convert_internal
186
+
187
+ #define RGB_RED EXT_XRGB_RED
188
+ #define RGB_GREEN EXT_XRGB_GREEN
189
+ #define RGB_BLUE EXT_XRGB_BLUE
190
+ #define RGB_ALPHA 0
191
+ #define RGB_PIXELSIZE EXT_XRGB_PIXELSIZE
192
+ #define ycc_rgb_convert_internal ycc_extxrgb_convert_internal
193
+ #define gray_rgb_convert_internal gray_extxrgb_convert_internal
194
+ #define rgb_rgb_convert_internal rgb_extxrgb_convert_internal
195
+ #include "jdcolext.c"
196
+ #undef RGB_RED
197
+ #undef RGB_GREEN
198
+ #undef RGB_BLUE
199
+ #undef RGB_ALPHA
200
+ #undef RGB_PIXELSIZE
201
+ #undef ycc_rgb_convert_internal
202
+ #undef gray_rgb_convert_internal
203
+ #undef rgb_rgb_convert_internal
204
+
205
+
206
+ /*
207
+ * Initialize tables for YCC->RGB colorspace conversion.
208
+ */
209
+
210
+ LOCAL(void)
211
+ build_ycc_rgb_table (j_decompress_ptr cinfo)
212
+ {
213
+ my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
214
+ int i;
215
+ JLONG x;
216
+ SHIFT_TEMPS
217
+
218
+ cconvert->Cr_r_tab = (int *)
219
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
220
+ (MAXJSAMPLE+1) * sizeof(int));
221
+ cconvert->Cb_b_tab = (int *)
222
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
223
+ (MAXJSAMPLE+1) * sizeof(int));
224
+ cconvert->Cr_g_tab = (JLONG *)
225
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
226
+ (MAXJSAMPLE+1) * sizeof(JLONG));
227
+ cconvert->Cb_g_tab = (JLONG *)
228
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
229
+ (MAXJSAMPLE+1) * sizeof(JLONG));
230
+
231
+ for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) {
232
+ /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */
233
+ /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */
234
+ /* Cr=>R value is nearest int to 1.40200 * x */
235
+ cconvert->Cr_r_tab[i] = (int)
236
+ RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS);
237
+ /* Cb=>B value is nearest int to 1.77200 * x */
238
+ cconvert->Cb_b_tab[i] = (int)
239
+ RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS);
240
+ /* Cr=>G value is scaled-up -0.71414 * x */
241
+ cconvert->Cr_g_tab[i] = (- FIX(0.71414)) * x;
242
+ /* Cb=>G value is scaled-up -0.34414 * x */
243
+ /* We also add in ONE_HALF so that need not do it in inner loop */
244
+ cconvert->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF;
245
+ }
246
+ }
247
+
248
+
249
+ /*
250
+ * Convert some rows of samples to the output colorspace.
251
+ */
252
+
253
+ METHODDEF(void)
254
+ ycc_rgb_convert (j_decompress_ptr cinfo,
255
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
256
+ JSAMPARRAY output_buf, int num_rows)
257
+ {
258
+ switch (cinfo->out_color_space) {
259
+ case JCS_EXT_RGB:
260
+ ycc_extrgb_convert_internal(cinfo, input_buf, input_row, output_buf,
261
+ num_rows);
262
+ break;
263
+ case JCS_EXT_RGBX:
264
+ case JCS_EXT_RGBA:
265
+ ycc_extrgbx_convert_internal(cinfo, input_buf, input_row, output_buf,
266
+ num_rows);
267
+ break;
268
+ case JCS_EXT_BGR:
269
+ ycc_extbgr_convert_internal(cinfo, input_buf, input_row, output_buf,
270
+ num_rows);
271
+ break;
272
+ case JCS_EXT_BGRX:
273
+ case JCS_EXT_BGRA:
274
+ ycc_extbgrx_convert_internal(cinfo, input_buf, input_row, output_buf,
275
+ num_rows);
276
+ break;
277
+ case JCS_EXT_XBGR:
278
+ case JCS_EXT_ABGR:
279
+ ycc_extxbgr_convert_internal(cinfo, input_buf, input_row, output_buf,
280
+ num_rows);
281
+ break;
282
+ case JCS_EXT_XRGB:
283
+ case JCS_EXT_ARGB:
284
+ ycc_extxrgb_convert_internal(cinfo, input_buf, input_row, output_buf,
285
+ num_rows);
286
+ break;
287
+ default:
288
+ ycc_rgb_convert_internal(cinfo, input_buf, input_row, output_buf,
289
+ num_rows);
290
+ break;
291
+ }
292
+ }
293
+
294
+
295
+ /**************** Cases other than YCbCr -> RGB **************/
296
+
297
+
298
+ /*
299
+ * Initialize for RGB->grayscale colorspace conversion.
300
+ */
301
+
302
+ LOCAL(void)
303
+ build_rgb_y_table (j_decompress_ptr cinfo)
304
+ {
305
+ my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
306
+ JLONG *rgb_y_tab;
307
+ JLONG i;
308
+
309
+ /* Allocate and fill in the conversion tables. */
310
+ cconvert->rgb_y_tab = rgb_y_tab = (JLONG *)
311
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
312
+ (TABLE_SIZE * sizeof(JLONG)));
313
+
314
+ for (i = 0; i <= MAXJSAMPLE; i++) {
315
+ rgb_y_tab[i+R_Y_OFF] = FIX(0.29900) * i;
316
+ rgb_y_tab[i+G_Y_OFF] = FIX(0.58700) * i;
317
+ rgb_y_tab[i+B_Y_OFF] = FIX(0.11400) * i + ONE_HALF;
318
+ }
319
+ }
320
+
321
+
322
+ /*
323
+ * Convert RGB to grayscale.
324
+ */
325
+
326
+ METHODDEF(void)
327
+ rgb_gray_convert (j_decompress_ptr cinfo,
328
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
329
+ JSAMPARRAY output_buf, int num_rows)
330
+ {
331
+ my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
332
+ register int r, g, b;
333
+ register JLONG *ctab = cconvert->rgb_y_tab;
334
+ register JSAMPROW outptr;
335
+ register JSAMPROW inptr0, inptr1, inptr2;
336
+ register JDIMENSION col;
337
+ JDIMENSION num_cols = cinfo->output_width;
338
+
339
+ while (--num_rows >= 0) {
340
+ inptr0 = input_buf[0][input_row];
341
+ inptr1 = input_buf[1][input_row];
342
+ inptr2 = input_buf[2][input_row];
343
+ input_row++;
344
+ outptr = *output_buf++;
345
+ for (col = 0; col < num_cols; col++) {
346
+ r = GETJSAMPLE(inptr0[col]);
347
+ g = GETJSAMPLE(inptr1[col]);
348
+ b = GETJSAMPLE(inptr2[col]);
349
+ /* Y */
350
+ outptr[col] = (JSAMPLE)
351
+ ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF])
352
+ >> SCALEBITS);
353
+ }
354
+ }
355
+ }
356
+
357
+
358
+ /*
359
+ * Color conversion for no colorspace change: just copy the data,
360
+ * converting from separate-planes to interleaved representation.
361
+ */
362
+
363
+ METHODDEF(void)
364
+ null_convert (j_decompress_ptr cinfo,
365
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
366
+ JSAMPARRAY output_buf, int num_rows)
367
+ {
368
+ register JSAMPROW inptr, inptr0, inptr1, inptr2, inptr3, outptr;
369
+ register JDIMENSION col;
370
+ register int num_components = cinfo->num_components;
371
+ JDIMENSION num_cols = cinfo->output_width;
372
+ int ci;
373
+
374
+ if (num_components == 3) {
375
+ while (--num_rows >= 0) {
376
+ inptr0 = input_buf[0][input_row];
377
+ inptr1 = input_buf[1][input_row];
378
+ inptr2 = input_buf[2][input_row];
379
+ input_row++;
380
+ outptr = *output_buf++;
381
+ for (col = 0; col < num_cols; col++) {
382
+ *outptr++ = inptr0[col];
383
+ *outptr++ = inptr1[col];
384
+ *outptr++ = inptr2[col];
385
+ }
386
+ }
387
+ } else if (num_components == 4) {
388
+ while (--num_rows >= 0) {
389
+ inptr0 = input_buf[0][input_row];
390
+ inptr1 = input_buf[1][input_row];
391
+ inptr2 = input_buf[2][input_row];
392
+ inptr3 = input_buf[3][input_row];
393
+ input_row++;
394
+ outptr = *output_buf++;
395
+ for (col = 0; col < num_cols; col++) {
396
+ *outptr++ = inptr0[col];
397
+ *outptr++ = inptr1[col];
398
+ *outptr++ = inptr2[col];
399
+ *outptr++ = inptr3[col];
400
+ }
401
+ }
402
+ } else {
403
+ while (--num_rows >= 0) {
404
+ for (ci = 0; ci < num_components; ci++) {
405
+ inptr = input_buf[ci][input_row];
406
+ outptr = *output_buf;
407
+ for (col = 0; col < num_cols; col++) {
408
+ outptr[ci] = inptr[col];
409
+ outptr += num_components;
410
+ }
411
+ }
412
+ output_buf++;
413
+ input_row++;
414
+ }
415
+ }
416
+ }
417
+
418
+
419
+ /*
420
+ * Color conversion for grayscale: just copy the data.
421
+ * This also works for YCbCr -> grayscale conversion, in which
422
+ * we just copy the Y (luminance) component and ignore chrominance.
423
+ */
424
+
425
+ METHODDEF(void)
426
+ grayscale_convert (j_decompress_ptr cinfo,
427
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
428
+ JSAMPARRAY output_buf, int num_rows)
429
+ {
430
+ jcopy_sample_rows(input_buf[0], (int) input_row, output_buf, 0,
431
+ num_rows, cinfo->output_width);
432
+ }
433
+
434
+
435
+ /*
436
+ * Convert grayscale to RGB
437
+ */
438
+
439
+ METHODDEF(void)
440
+ gray_rgb_convert (j_decompress_ptr cinfo,
441
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
442
+ JSAMPARRAY output_buf, int num_rows)
443
+ {
444
+ switch (cinfo->out_color_space) {
445
+ case JCS_EXT_RGB:
446
+ gray_extrgb_convert_internal(cinfo, input_buf, input_row, output_buf,
447
+ num_rows);
448
+ break;
449
+ case JCS_EXT_RGBX:
450
+ case JCS_EXT_RGBA:
451
+ gray_extrgbx_convert_internal(cinfo, input_buf, input_row, output_buf,
452
+ num_rows);
453
+ break;
454
+ case JCS_EXT_BGR:
455
+ gray_extbgr_convert_internal(cinfo, input_buf, input_row, output_buf,
456
+ num_rows);
457
+ break;
458
+ case JCS_EXT_BGRX:
459
+ case JCS_EXT_BGRA:
460
+ gray_extbgrx_convert_internal(cinfo, input_buf, input_row, output_buf,
461
+ num_rows);
462
+ break;
463
+ case JCS_EXT_XBGR:
464
+ case JCS_EXT_ABGR:
465
+ gray_extxbgr_convert_internal(cinfo, input_buf, input_row, output_buf,
466
+ num_rows);
467
+ break;
468
+ case JCS_EXT_XRGB:
469
+ case JCS_EXT_ARGB:
470
+ gray_extxrgb_convert_internal(cinfo, input_buf, input_row, output_buf,
471
+ num_rows);
472
+ break;
473
+ default:
474
+ gray_rgb_convert_internal(cinfo, input_buf, input_row, output_buf,
475
+ num_rows);
476
+ break;
477
+ }
478
+ }
479
+
480
+
481
+ /*
482
+ * Convert plain RGB to extended RGB
483
+ */
484
+
485
+ METHODDEF(void)
486
+ rgb_rgb_convert (j_decompress_ptr cinfo,
487
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
488
+ JSAMPARRAY output_buf, int num_rows)
489
+ {
490
+ switch (cinfo->out_color_space) {
491
+ case JCS_EXT_RGB:
492
+ rgb_extrgb_convert_internal(cinfo, input_buf, input_row, output_buf,
493
+ num_rows);
494
+ break;
495
+ case JCS_EXT_RGBX:
496
+ case JCS_EXT_RGBA:
497
+ rgb_extrgbx_convert_internal(cinfo, input_buf, input_row, output_buf,
498
+ num_rows);
499
+ break;
500
+ case JCS_EXT_BGR:
501
+ rgb_extbgr_convert_internal(cinfo, input_buf, input_row, output_buf,
502
+ num_rows);
503
+ break;
504
+ case JCS_EXT_BGRX:
505
+ case JCS_EXT_BGRA:
506
+ rgb_extbgrx_convert_internal(cinfo, input_buf, input_row, output_buf,
507
+ num_rows);
508
+ break;
509
+ case JCS_EXT_XBGR:
510
+ case JCS_EXT_ABGR:
511
+ rgb_extxbgr_convert_internal(cinfo, input_buf, input_row, output_buf,
512
+ num_rows);
513
+ break;
514
+ case JCS_EXT_XRGB:
515
+ case JCS_EXT_ARGB:
516
+ rgb_extxrgb_convert_internal(cinfo, input_buf, input_row, output_buf,
517
+ num_rows);
518
+ break;
519
+ default:
520
+ rgb_rgb_convert_internal(cinfo, input_buf, input_row, output_buf,
521
+ num_rows);
522
+ break;
523
+ }
524
+ }
525
+
526
+
527
+ /*
528
+ * Adobe-style YCCK->CMYK conversion.
529
+ * We convert YCbCr to R=1-C, G=1-M, and B=1-Y using the same
530
+ * conversion as above, while passing K (black) unchanged.
531
+ * We assume build_ycc_rgb_table has been called.
532
+ */
533
+
534
+ METHODDEF(void)
535
+ ycck_cmyk_convert (j_decompress_ptr cinfo,
536
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
537
+ JSAMPARRAY output_buf, int num_rows)
538
+ {
539
+ my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
540
+ register int y, cb, cr;
541
+ register JSAMPROW outptr;
542
+ register JSAMPROW inptr0, inptr1, inptr2, inptr3;
543
+ register JDIMENSION col;
544
+ JDIMENSION num_cols = cinfo->output_width;
545
+ /* copy these pointers into registers if possible */
546
+ register JSAMPLE *range_limit = cinfo->sample_range_limit;
547
+ register int *Crrtab = cconvert->Cr_r_tab;
548
+ register int *Cbbtab = cconvert->Cb_b_tab;
549
+ register JLONG *Crgtab = cconvert->Cr_g_tab;
550
+ register JLONG *Cbgtab = cconvert->Cb_g_tab;
551
+ SHIFT_TEMPS
552
+
553
+ while (--num_rows >= 0) {
554
+ inptr0 = input_buf[0][input_row];
555
+ inptr1 = input_buf[1][input_row];
556
+ inptr2 = input_buf[2][input_row];
557
+ inptr3 = input_buf[3][input_row];
558
+ input_row++;
559
+ outptr = *output_buf++;
560
+ for (col = 0; col < num_cols; col++) {
561
+ y = GETJSAMPLE(inptr0[col]);
562
+ cb = GETJSAMPLE(inptr1[col]);
563
+ cr = GETJSAMPLE(inptr2[col]);
564
+ /* Range-limiting is essential due to noise introduced by DCT losses. */
565
+ outptr[0] = range_limit[MAXJSAMPLE - (y + Crrtab[cr])]; /* red */
566
+ outptr[1] = range_limit[MAXJSAMPLE - (y + /* green */
567
+ ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
568
+ SCALEBITS)))];
569
+ outptr[2] = range_limit[MAXJSAMPLE - (y + Cbbtab[cb])]; /* blue */
570
+ /* K passes through unchanged */
571
+ outptr[3] = inptr3[col]; /* don't need GETJSAMPLE here */
572
+ outptr += 4;
573
+ }
574
+ }
575
+ }
576
+
577
+
578
+ /*
579
+ * RGB565 conversion
580
+ */
581
+
582
+ #define PACK_SHORT_565_LE(r, g, b) ((((r) << 8) & 0xF800) | \
583
+ (((g) << 3) & 0x7E0) | ((b) >> 3))
584
+ #define PACK_SHORT_565_BE(r, g, b) (((r) & 0xF8) | ((g) >> 5) | \
585
+ (((g) << 11) & 0xE000) | \
586
+ (((b) << 5) & 0x1F00))
587
+
588
+ #define PACK_TWO_PIXELS_LE(l, r) ((r << 16) | l)
589
+ #define PACK_TWO_PIXELS_BE(l, r) ((l << 16) | r)
590
+
591
+ #define PACK_NEED_ALIGNMENT(ptr) (((size_t)(ptr)) & 3)
592
+
593
+ #define WRITE_TWO_ALIGNED_PIXELS(addr, pixels) ((*(int *)(addr)) = pixels)
594
+
595
+ #define DITHER_565_R(r, dither) ((r) + ((dither) & 0xFF))
596
+ #define DITHER_565_G(g, dither) ((g) + (((dither) & 0xFF) >> 1))
597
+ #define DITHER_565_B(b, dither) ((b) + ((dither) & 0xFF))
598
+
599
+
600
+ /* Declarations for ordered dithering
601
+ *
602
+ * We use a 4x4 ordered dither array packed into 32 bits. This array is
603
+ * sufficent for dithering RGB888 to RGB565.
604
+ */
605
+
606
+ #define DITHER_MASK 0x3
607
+ #define DITHER_ROTATE(x) ((((x) & 0xFF) << 24) | (((x) >> 8) & 0x00FFFFFF))
608
+ static const JLONG dither_matrix[4] = {
609
+ 0x0008020A,
610
+ 0x0C040E06,
611
+ 0x030B0109,
612
+ 0x0F070D05
613
+ };
614
+
615
+
616
+ static INLINE boolean is_big_endian(void)
617
+ {
618
+ int test_value = 1;
619
+ if (*(char *)&test_value != 1)
620
+ return TRUE;
621
+ return FALSE;
622
+ }
623
+
624
+
625
+ /* Include inline routines for RGB565 conversion */
626
+
627
+ #define PACK_SHORT_565 PACK_SHORT_565_LE
628
+ #define PACK_TWO_PIXELS PACK_TWO_PIXELS_LE
629
+ #define ycc_rgb565_convert_internal ycc_rgb565_convert_le
630
+ #define ycc_rgb565D_convert_internal ycc_rgb565D_convert_le
631
+ #define rgb_rgb565_convert_internal rgb_rgb565_convert_le
632
+ #define rgb_rgb565D_convert_internal rgb_rgb565D_convert_le
633
+ #define gray_rgb565_convert_internal gray_rgb565_convert_le
634
+ #define gray_rgb565D_convert_internal gray_rgb565D_convert_le
635
+ #include "jdcol565.c"
636
+ #undef PACK_SHORT_565
637
+ #undef PACK_TWO_PIXELS
638
+ #undef ycc_rgb565_convert_internal
639
+ #undef ycc_rgb565D_convert_internal
640
+ #undef rgb_rgb565_convert_internal
641
+ #undef rgb_rgb565D_convert_internal
642
+ #undef gray_rgb565_convert_internal
643
+ #undef gray_rgb565D_convert_internal
644
+
645
+ #define PACK_SHORT_565 PACK_SHORT_565_BE
646
+ #define PACK_TWO_PIXELS PACK_TWO_PIXELS_BE
647
+ #define ycc_rgb565_convert_internal ycc_rgb565_convert_be
648
+ #define ycc_rgb565D_convert_internal ycc_rgb565D_convert_be
649
+ #define rgb_rgb565_convert_internal rgb_rgb565_convert_be
650
+ #define rgb_rgb565D_convert_internal rgb_rgb565D_convert_be
651
+ #define gray_rgb565_convert_internal gray_rgb565_convert_be
652
+ #define gray_rgb565D_convert_internal gray_rgb565D_convert_be
653
+ #include "jdcol565.c"
654
+ #undef PACK_SHORT_565
655
+ #undef PACK_TWO_PIXELS
656
+ #undef ycc_rgb565_convert_internal
657
+ #undef ycc_rgb565D_convert_internal
658
+ #undef rgb_rgb565_convert_internal
659
+ #undef rgb_rgb565D_convert_internal
660
+ #undef gray_rgb565_convert_internal
661
+ #undef gray_rgb565D_convert_internal
662
+
663
+
664
+ METHODDEF(void)
665
+ ycc_rgb565_convert (j_decompress_ptr cinfo,
666
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
667
+ JSAMPARRAY output_buf, int num_rows)
668
+ {
669
+ if (is_big_endian())
670
+ ycc_rgb565_convert_be(cinfo, input_buf, input_row, output_buf, num_rows);
671
+ else
672
+ ycc_rgb565_convert_le(cinfo, input_buf, input_row, output_buf, num_rows);
673
+ }
674
+
675
+
676
+ METHODDEF(void)
677
+ ycc_rgb565D_convert (j_decompress_ptr cinfo,
678
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
679
+ JSAMPARRAY output_buf, int num_rows)
680
+ {
681
+ if (is_big_endian())
682
+ ycc_rgb565D_convert_be(cinfo, input_buf, input_row, output_buf, num_rows);
683
+ else
684
+ ycc_rgb565D_convert_le(cinfo, input_buf, input_row, output_buf, num_rows);
685
+ }
686
+
687
+
688
+ METHODDEF(void)
689
+ rgb_rgb565_convert (j_decompress_ptr cinfo,
690
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
691
+ JSAMPARRAY output_buf, int num_rows)
692
+ {
693
+ if (is_big_endian())
694
+ rgb_rgb565_convert_be(cinfo, input_buf, input_row, output_buf, num_rows);
695
+ else
696
+ rgb_rgb565_convert_le(cinfo, input_buf, input_row, output_buf, num_rows);
697
+ }
698
+
699
+
700
+ METHODDEF(void)
701
+ rgb_rgb565D_convert (j_decompress_ptr cinfo,
702
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
703
+ JSAMPARRAY output_buf, int num_rows)
704
+ {
705
+ if (is_big_endian())
706
+ rgb_rgb565D_convert_be(cinfo, input_buf, input_row, output_buf, num_rows);
707
+ else
708
+ rgb_rgb565D_convert_le(cinfo, input_buf, input_row, output_buf, num_rows);
709
+ }
710
+
711
+
712
+ METHODDEF(void)
713
+ gray_rgb565_convert (j_decompress_ptr cinfo,
714
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
715
+ JSAMPARRAY output_buf, int num_rows)
716
+ {
717
+ if (is_big_endian())
718
+ gray_rgb565_convert_be(cinfo, input_buf, input_row, output_buf, num_rows);
719
+ else
720
+ gray_rgb565_convert_le(cinfo, input_buf, input_row, output_buf, num_rows);
721
+ }
722
+
723
+
724
+ METHODDEF(void)
725
+ gray_rgb565D_convert (j_decompress_ptr cinfo,
726
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
727
+ JSAMPARRAY output_buf, int num_rows)
728
+ {
729
+ if (is_big_endian())
730
+ gray_rgb565D_convert_be(cinfo, input_buf, input_row, output_buf, num_rows);
731
+ else
732
+ gray_rgb565D_convert_le(cinfo, input_buf, input_row, output_buf, num_rows);
733
+ }
734
+
735
+
736
+ /*
737
+ * Empty method for start_pass.
738
+ */
739
+
740
+ METHODDEF(void)
741
+ start_pass_dcolor (j_decompress_ptr cinfo)
742
+ {
743
+ /* no work needed */
744
+ }
745
+
746
+
747
+ /*
748
+ * Module initialization routine for output colorspace conversion.
749
+ */
750
+
751
+ GLOBAL(void)
752
+ jinit_color_deconverter (j_decompress_ptr cinfo)
753
+ {
754
+ my_cconvert_ptr cconvert;
755
+ int ci;
756
+
757
+ cconvert = (my_cconvert_ptr)
758
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
759
+ sizeof(my_color_deconverter));
760
+ cinfo->cconvert = (struct jpeg_color_deconverter *) cconvert;
761
+ cconvert->pub.start_pass = start_pass_dcolor;
762
+
763
+ /* Make sure num_components agrees with jpeg_color_space */
764
+ switch (cinfo->jpeg_color_space) {
765
+ case JCS_GRAYSCALE:
766
+ if (cinfo->num_components != 1)
767
+ ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
768
+ break;
769
+
770
+ case JCS_RGB:
771
+ case JCS_YCbCr:
772
+ if (cinfo->num_components != 3)
773
+ ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
774
+ break;
775
+
776
+ case JCS_CMYK:
777
+ case JCS_YCCK:
778
+ if (cinfo->num_components != 4)
779
+ ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
780
+ break;
781
+
782
+ default: /* JCS_UNKNOWN can be anything */
783
+ if (cinfo->num_components < 1)
784
+ ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
785
+ break;
786
+ }
787
+
788
+ /* Set out_color_components and conversion method based on requested space.
789
+ * Also clear the component_needed flags for any unused components,
790
+ * so that earlier pipeline stages can avoid useless computation.
791
+ */
792
+
793
+ switch (cinfo->out_color_space) {
794
+ case JCS_GRAYSCALE:
795
+ cinfo->out_color_components = 1;
796
+ if (cinfo->jpeg_color_space == JCS_GRAYSCALE ||
797
+ cinfo->jpeg_color_space == JCS_YCbCr) {
798
+ cconvert->pub.color_convert = grayscale_convert;
799
+ /* For color->grayscale conversion, only the Y (0) component is needed */
800
+ for (ci = 1; ci < cinfo->num_components; ci++)
801
+ cinfo->comp_info[ci].component_needed = FALSE;
802
+ } else if (cinfo->jpeg_color_space == JCS_RGB) {
803
+ cconvert->pub.color_convert = rgb_gray_convert;
804
+ build_rgb_y_table(cinfo);
805
+ } else
806
+ ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
807
+ break;
808
+
809
+ case JCS_RGB:
810
+ case JCS_EXT_RGB:
811
+ case JCS_EXT_RGBX:
812
+ case JCS_EXT_BGR:
813
+ case JCS_EXT_BGRX:
814
+ case JCS_EXT_XBGR:
815
+ case JCS_EXT_XRGB:
816
+ case JCS_EXT_RGBA:
817
+ case JCS_EXT_BGRA:
818
+ case JCS_EXT_ABGR:
819
+ case JCS_EXT_ARGB:
820
+ cinfo->out_color_components = rgb_pixelsize[cinfo->out_color_space];
821
+ if (cinfo->jpeg_color_space == JCS_YCbCr) {
822
+ if (jsimd_can_ycc_rgb())
823
+ cconvert->pub.color_convert = jsimd_ycc_rgb_convert;
824
+ else {
825
+ cconvert->pub.color_convert = ycc_rgb_convert;
826
+ build_ycc_rgb_table(cinfo);
827
+ }
828
+ } else if (cinfo->jpeg_color_space == JCS_GRAYSCALE) {
829
+ cconvert->pub.color_convert = gray_rgb_convert;
830
+ } else if (cinfo->jpeg_color_space == JCS_RGB) {
831
+ if (rgb_red[cinfo->out_color_space] == 0 &&
832
+ rgb_green[cinfo->out_color_space] == 1 &&
833
+ rgb_blue[cinfo->out_color_space] == 2 &&
834
+ rgb_pixelsize[cinfo->out_color_space] == 3)
835
+ cconvert->pub.color_convert = null_convert;
836
+ else
837
+ cconvert->pub.color_convert = rgb_rgb_convert;
838
+ } else
839
+ ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
840
+ break;
841
+
842
+ case JCS_RGB565:
843
+ cinfo->out_color_components = 3;
844
+ if (cinfo->dither_mode == JDITHER_NONE) {
845
+ if (cinfo->jpeg_color_space == JCS_YCbCr) {
846
+ if (jsimd_can_ycc_rgb565())
847
+ cconvert->pub.color_convert = jsimd_ycc_rgb565_convert;
848
+ else {
849
+ cconvert->pub.color_convert = ycc_rgb565_convert;
850
+ build_ycc_rgb_table(cinfo);
851
+ }
852
+ } else if (cinfo->jpeg_color_space == JCS_GRAYSCALE) {
853
+ cconvert->pub.color_convert = gray_rgb565_convert;
854
+ } else if (cinfo->jpeg_color_space == JCS_RGB) {
855
+ cconvert->pub.color_convert = rgb_rgb565_convert;
856
+ } else
857
+ ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
858
+ } else {
859
+ /* only ordered dithering is supported */
860
+ if (cinfo->jpeg_color_space == JCS_YCbCr) {
861
+ cconvert->pub.color_convert = ycc_rgb565D_convert;
862
+ build_ycc_rgb_table(cinfo);
863
+ } else if (cinfo->jpeg_color_space == JCS_GRAYSCALE) {
864
+ cconvert->pub.color_convert = gray_rgb565D_convert;
865
+ } else if (cinfo->jpeg_color_space == JCS_RGB) {
866
+ cconvert->pub.color_convert = rgb_rgb565D_convert;
867
+ } else
868
+ ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
869
+ }
870
+ break;
871
+
872
+ case JCS_CMYK:
873
+ cinfo->out_color_components = 4;
874
+ if (cinfo->jpeg_color_space == JCS_YCCK) {
875
+ cconvert->pub.color_convert = ycck_cmyk_convert;
876
+ build_ycc_rgb_table(cinfo);
877
+ } else if (cinfo->jpeg_color_space == JCS_CMYK) {
878
+ cconvert->pub.color_convert = null_convert;
879
+ } else
880
+ ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
881
+ break;
882
+
883
+ default:
884
+ /* Permit null conversion to same output space */
885
+ if (cinfo->out_color_space == cinfo->jpeg_color_space) {
886
+ cinfo->out_color_components = cinfo->num_components;
887
+ cconvert->pub.color_convert = null_convert;
888
+ } else /* unsupported non-null conversion */
889
+ ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
890
+ break;
891
+ }
892
+
893
+ if (cinfo->quantize_colors)
894
+ cinfo->output_components = 1; /* single colormapped output component */
895
+ else
896
+ cinfo->output_components = cinfo->out_color_components;
897
+ }