image_pack 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +13 -3
  4. data/ext/image_pack/image_pack.c +742 -263
  5. data/ext/image_pack/mozjpeg_sources.rb +5 -0
  6. data/ext/image_pack/vendor/mozjpeg/simd/arm/neon-compat.h +26 -0
  7. data/ext/image_pack/vendor/mozjpeg/transupp.c +2373 -0
  8. data/lib/image_pack/version.rb +1 -1
  9. data/lib/image_pack.rb +119 -5
  10. metadata +4 -73
  11. data/ext/image_pack/vendor/mozjpeg/croptest.in +0 -95
  12. data/ext/image_pack/vendor/mozjpeg/libjpeg.map.in +0 -11
  13. data/ext/image_pack/vendor/mozjpeg/simd/arm/aarch32/jsimd_neon.S +0 -1200
  14. data/ext/image_pack/vendor/mozjpeg/simd/arm/aarch64/jsimd_neon.S +0 -2254
  15. data/ext/image_pack/vendor/mozjpeg/simd/i386/jccolext-avx2.asm +0 -578
  16. data/ext/image_pack/vendor/mozjpeg/simd/i386/jccolext-mmx.asm +0 -476
  17. data/ext/image_pack/vendor/mozjpeg/simd/i386/jccolext-sse2.asm +0 -503
  18. data/ext/image_pack/vendor/mozjpeg/simd/i386/jccolor-avx2.asm +0 -121
  19. data/ext/image_pack/vendor/mozjpeg/simd/i386/jccolor-mmx.asm +0 -121
  20. data/ext/image_pack/vendor/mozjpeg/simd/i386/jccolor-sse2.asm +0 -120
  21. data/ext/image_pack/vendor/mozjpeg/simd/i386/jcgray-avx2.asm +0 -113
  22. data/ext/image_pack/vendor/mozjpeg/simd/i386/jcgray-mmx.asm +0 -113
  23. data/ext/image_pack/vendor/mozjpeg/simd/i386/jcgray-sse2.asm +0 -112
  24. data/ext/image_pack/vendor/mozjpeg/simd/i386/jcgryext-avx2.asm +0 -457
  25. data/ext/image_pack/vendor/mozjpeg/simd/i386/jcgryext-mmx.asm +0 -355
  26. data/ext/image_pack/vendor/mozjpeg/simd/i386/jcgryext-sse2.asm +0 -382
  27. data/ext/image_pack/vendor/mozjpeg/simd/i386/jchuff-sse2.asm +0 -761
  28. data/ext/image_pack/vendor/mozjpeg/simd/i386/jcphuff-sse2.asm +0 -662
  29. data/ext/image_pack/vendor/mozjpeg/simd/i386/jcsample-avx2.asm +0 -388
  30. data/ext/image_pack/vendor/mozjpeg/simd/i386/jcsample-mmx.asm +0 -324
  31. data/ext/image_pack/vendor/mozjpeg/simd/i386/jcsample-sse2.asm +0 -351
  32. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdcolext-avx2.asm +0 -515
  33. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdcolext-mmx.asm +0 -404
  34. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdcolext-sse2.asm +0 -458
  35. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdcolor-avx2.asm +0 -118
  36. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdcolor-mmx.asm +0 -117
  37. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdcolor-sse2.asm +0 -117
  38. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdmerge-avx2.asm +0 -136
  39. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdmerge-mmx.asm +0 -123
  40. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdmerge-sse2.asm +0 -135
  41. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdmrgext-avx2.asm +0 -575
  42. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdmrgext-mmx.asm +0 -460
  43. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdmrgext-sse2.asm +0 -517
  44. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdsample-avx2.asm +0 -760
  45. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdsample-mmx.asm +0 -731
  46. data/ext/image_pack/vendor/mozjpeg/simd/i386/jdsample-sse2.asm +0 -724
  47. data/ext/image_pack/vendor/mozjpeg/simd/i386/jfdctflt-3dn.asm +0 -318
  48. data/ext/image_pack/vendor/mozjpeg/simd/i386/jfdctflt-sse.asm +0 -369
  49. data/ext/image_pack/vendor/mozjpeg/simd/i386/jfdctfst-mmx.asm +0 -395
  50. data/ext/image_pack/vendor/mozjpeg/simd/i386/jfdctfst-sse2.asm +0 -403
  51. data/ext/image_pack/vendor/mozjpeg/simd/i386/jfdctint-avx2.asm +0 -331
  52. data/ext/image_pack/vendor/mozjpeg/simd/i386/jfdctint-mmx.asm +0 -620
  53. data/ext/image_pack/vendor/mozjpeg/simd/i386/jfdctint-sse2.asm +0 -633
  54. data/ext/image_pack/vendor/mozjpeg/simd/i386/jidctflt-3dn.asm +0 -451
  55. data/ext/image_pack/vendor/mozjpeg/simd/i386/jidctflt-sse.asm +0 -571
  56. data/ext/image_pack/vendor/mozjpeg/simd/i386/jidctflt-sse2.asm +0 -497
  57. data/ext/image_pack/vendor/mozjpeg/simd/i386/jidctfst-mmx.asm +0 -499
  58. data/ext/image_pack/vendor/mozjpeg/simd/i386/jidctfst-sse2.asm +0 -501
  59. data/ext/image_pack/vendor/mozjpeg/simd/i386/jidctint-avx2.asm +0 -453
  60. data/ext/image_pack/vendor/mozjpeg/simd/i386/jidctint-mmx.asm +0 -851
  61. data/ext/image_pack/vendor/mozjpeg/simd/i386/jidctint-sse2.asm +0 -858
  62. data/ext/image_pack/vendor/mozjpeg/simd/i386/jidctred-mmx.asm +0 -704
  63. data/ext/image_pack/vendor/mozjpeg/simd/i386/jidctred-sse2.asm +0 -592
  64. data/ext/image_pack/vendor/mozjpeg/simd/i386/jquant-3dn.asm +0 -230
  65. data/ext/image_pack/vendor/mozjpeg/simd/i386/jquant-mmx.asm +0 -276
  66. data/ext/image_pack/vendor/mozjpeg/simd/i386/jquant-sse.asm +0 -208
  67. data/ext/image_pack/vendor/mozjpeg/simd/i386/jquantf-sse2.asm +0 -168
  68. data/ext/image_pack/vendor/mozjpeg/simd/i386/jquanti-avx2.asm +0 -188
  69. data/ext/image_pack/vendor/mozjpeg/simd/i386/jquanti-sse2.asm +0 -201
  70. data/ext/image_pack/vendor/mozjpeg/simd/i386/jsimdcpu.asm +0 -135
  71. data/ext/image_pack/vendor/mozjpeg/simd/mips/jsimd_dspr2.S +0 -4543
  72. data/ext/image_pack/vendor/mozjpeg/simd/mips/jsimd_dspr2_asm.h +0 -292
  73. data/ext/image_pack/vendor/mozjpeg/simd/mips64/jcsample.h +0 -28
  74. data/ext/image_pack/vendor/mozjpeg/simd/mips64/jsimd_mmi.h +0 -69
  75. data/ext/image_pack/vendor/mozjpeg/simd/mips64/loongson-mmintrin.h +0 -1334
  76. data/ext/image_pack/vendor/mozjpeg/simd/powerpc/jcsample.h +0 -28
  77. data/ext/image_pack/vendor/mozjpeg/simd/powerpc/jsimd_altivec.h +0 -98
  78. data/ext/image_pack/vendor/mozjpeg/tjbenchtest.in +0 -256
  79. data/ext/image_pack/vendor/mozjpeg/tjbenchtest.java.in +0 -215
  80. data/ext/image_pack/vendor/mozjpeg/tjexampletest.in +0 -149
  81. data/ext/image_pack/vendor/mozjpeg/tjexampletest.java.in +0 -151
@@ -71,6 +71,7 @@ module ImagePackMozjpegSources
71
71
  jutils.c
72
72
  jmemmgr.c
73
73
  jmemnobs.c
74
+ transupp.c
74
75
  ].freeze
75
76
 
76
77
  # MozJPEG/libjpeg-turbo uses these top-level .c files as textual include
@@ -166,6 +167,10 @@ module ImagePackMozjpegSources
166
167
 
167
168
  if relative_path.include?("/")
168
169
  return false unless relative_path.start_with?("simd/")
170
+ return false if relative_path.start_with?("simd/i386/", "simd/mips/", "simd/mips64/",
171
+ "simd/powerpc/", "simd/arm/aarch32/")
172
+ return false unless relative_path.start_with?("simd/arm/", "simd/x86_64/", "simd/nasm/") ||
173
+ relative_path == "simd/jsimd.h"
169
174
 
170
175
  return SIMD_EXTENSIONS.include?(File.extname(relative_path))
171
176
  end
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Generated by image_pack extconf.rb (replaces simd/arm/neon-compat.h.in
3
+ * which CMake would otherwise process). All three intrinsic feature flags
4
+ * are unconditionally enabled — every AArch64 toolchain image_pack supports
5
+ * provides them.
6
+ */
7
+ #ifndef IMAGE_PACK_NEON_COMPAT_H
8
+ #define IMAGE_PACK_NEON_COMPAT_H
9
+
10
+ #define HAVE_VLD1_S16_X3
11
+ #define HAVE_VLD1_U16_X2
12
+ #define HAVE_VLD1Q_U8_X4
13
+
14
+ #if defined(_MSC_VER) && !defined(__clang__)
15
+ #define BUILTIN_CLZ(x) _CountLeadingZeros(x)
16
+ #define BUILTIN_CLZLL(x) _CountLeadingZeros64(x)
17
+ #define BUILTIN_BSWAP64(x) _byteswap_uint64(x)
18
+ #elif defined(__clang__) || defined(__GNUC__)
19
+ #define BUILTIN_CLZ(x) __builtin_clz(x)
20
+ #define BUILTIN_CLZLL(x) __builtin_clzll(x)
21
+ #define BUILTIN_BSWAP64(x) __builtin_bswap64(x)
22
+ #else
23
+ #error "Unknown compiler"
24
+ #endif
25
+
26
+ #endif /* IMAGE_PACK_NEON_COMPAT_H */