image_intensities 1.0.3 → 1.0.4

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 (93) hide show
  1. checksums.yaml +4 -4
  2. data/ext/image_intensities/Makefile +73 -4
  3. data/ext/image_intensities/turbojpeg/cderror.h +137 -0
  4. data/ext/image_intensities/turbojpeg/cdjpeg.h +157 -0
  5. data/ext/image_intensities/turbojpeg/cmyk.h +61 -0
  6. data/ext/image_intensities/turbojpeg/jaricom.c +157 -0
  7. data/ext/image_intensities/turbojpeg/jcapimin.c +295 -0
  8. data/ext/image_intensities/turbojpeg/jcapistd.c +162 -0
  9. data/ext/image_intensities/turbojpeg/jcarith.c +932 -0
  10. data/ext/image_intensities/turbojpeg/jccoefct.c +449 -0
  11. data/ext/image_intensities/turbojpeg/jccolext.c +144 -0
  12. data/ext/image_intensities/turbojpeg/jccolor.c +710 -0
  13. data/ext/image_intensities/turbojpeg/jcdctmgr.c +721 -0
  14. data/ext/image_intensities/turbojpeg/jchuff.c +1096 -0
  15. data/ext/image_intensities/turbojpeg/jchuff.h +42 -0
  16. data/ext/image_intensities/turbojpeg/jcicc.c +105 -0
  17. data/ext/image_intensities/turbojpeg/jcinit.c +77 -0
  18. data/ext/image_intensities/turbojpeg/jcmainct.c +162 -0
  19. data/ext/image_intensities/turbojpeg/jcmarker.c +664 -0
  20. data/ext/image_intensities/turbojpeg/jcmaster.c +640 -0
  21. data/ext/image_intensities/turbojpeg/jcomapi.c +109 -0
  22. data/ext/image_intensities/turbojpeg/jconfig.h +73 -0
  23. data/ext/image_intensities/turbojpeg/jconfigint.h +31 -0
  24. data/ext/image_intensities/turbojpeg/jcparam.c +541 -0
  25. data/ext/image_intensities/turbojpeg/jcphuff.c +1105 -0
  26. data/ext/image_intensities/turbojpeg/jcprepct.c +351 -0
  27. data/ext/image_intensities/turbojpeg/jcsample.c +539 -0
  28. data/ext/image_intensities/turbojpeg/jctrans.c +400 -0
  29. data/ext/image_intensities/turbojpeg/jdapimin.c +407 -0
  30. data/ext/image_intensities/turbojpeg/jdapistd.c +639 -0
  31. data/ext/image_intensities/turbojpeg/jdarith.c +773 -0
  32. data/ext/image_intensities/turbojpeg/jdatadst-tj.c +203 -0
  33. data/ext/image_intensities/turbojpeg/jdatadst.c +293 -0
  34. data/ext/image_intensities/turbojpeg/jdatasrc-tj.c +194 -0
  35. data/ext/image_intensities/turbojpeg/jdatasrc.c +295 -0
  36. data/ext/image_intensities/turbojpeg/jdcoefct.c +692 -0
  37. data/ext/image_intensities/turbojpeg/jdcoefct.h +82 -0
  38. data/ext/image_intensities/turbojpeg/jdcol565.c +384 -0
  39. data/ext/image_intensities/turbojpeg/jdcolext.c +143 -0
  40. data/ext/image_intensities/turbojpeg/jdcolor.c +883 -0
  41. data/ext/image_intensities/turbojpeg/jdct.h +208 -0
  42. data/ext/image_intensities/turbojpeg/jddctmgr.c +352 -0
  43. data/ext/image_intensities/turbojpeg/jdhuff.c +831 -0
  44. data/ext/image_intensities/turbojpeg/jdhuff.h +238 -0
  45. data/ext/image_intensities/turbojpeg/jdicc.c +171 -0
  46. data/ext/image_intensities/turbojpeg/jdinput.c +408 -0
  47. data/ext/image_intensities/turbojpeg/jdmainct.c +460 -0
  48. data/ext/image_intensities/turbojpeg/jdmainct.h +71 -0
  49. data/ext/image_intensities/turbojpeg/jdmarker.c +1377 -0
  50. data/ext/image_intensities/turbojpeg/jdmaster.c +737 -0
  51. data/ext/image_intensities/turbojpeg/jdmaster.h +28 -0
  52. data/ext/image_intensities/turbojpeg/jdmerge.c +617 -0
  53. data/ext/image_intensities/turbojpeg/jdmrg565.c +354 -0
  54. data/ext/image_intensities/turbojpeg/jdmrgext.c +184 -0
  55. data/ext/image_intensities/turbojpeg/jdphuff.c +687 -0
  56. data/ext/image_intensities/turbojpeg/jdpostct.c +294 -0
  57. data/ext/image_intensities/turbojpeg/jdsample.c +518 -0
  58. data/ext/image_intensities/turbojpeg/jdsample.h +50 -0
  59. data/ext/image_intensities/turbojpeg/jdtrans.c +155 -0
  60. data/ext/image_intensities/turbojpeg/jerror.c +251 -0
  61. data/ext/image_intensities/turbojpeg/jfdctflt.c +169 -0
  62. data/ext/image_intensities/turbojpeg/jfdctfst.c +227 -0
  63. data/ext/image_intensities/turbojpeg/jfdctint.c +288 -0
  64. data/ext/image_intensities/turbojpeg/jidctflt.c +240 -0
  65. data/ext/image_intensities/turbojpeg/jidctfst.c +371 -0
  66. data/ext/image_intensities/turbojpeg/jidctint.c +2627 -0
  67. data/ext/image_intensities/turbojpeg/jidctred.c +409 -0
  68. data/ext/image_intensities/turbojpeg/jinclude.h +88 -0
  69. data/ext/image_intensities/turbojpeg/jmemmgr.c +1179 -0
  70. data/ext/image_intensities/turbojpeg/jmemnobs.c +115 -0
  71. data/ext/image_intensities/turbojpeg/jmemsys.h +178 -0
  72. data/ext/image_intensities/turbojpeg/jpeg_nbits_table.h +4098 -0
  73. data/ext/image_intensities/turbojpeg/jpegcomp.h +31 -0
  74. data/ext/image_intensities/turbojpeg/jquant1.c +859 -0
  75. data/ext/image_intensities/turbojpeg/jquant2.c +1285 -0
  76. data/ext/image_intensities/turbojpeg/jsimd.h +117 -0
  77. data/ext/image_intensities/turbojpeg/jsimd_none.c +418 -0
  78. data/ext/image_intensities/turbojpeg/jsimddct.h +70 -0
  79. data/ext/image_intensities/turbojpeg/jstdhuff.c +143 -0
  80. data/ext/image_intensities/turbojpeg/jutils.c +133 -0
  81. data/ext/image_intensities/turbojpeg/jversion.h +52 -0
  82. data/ext/image_intensities/turbojpeg/libturbojpeg.a +0 -0
  83. data/ext/image_intensities/turbojpeg/rdbmp.c +689 -0
  84. data/ext/image_intensities/turbojpeg/rdppm.c +766 -0
  85. data/ext/image_intensities/turbojpeg/tjutil.h +47 -0
  86. data/ext/image_intensities/turbojpeg/transupp.c +1628 -0
  87. data/ext/image_intensities/turbojpeg/transupp.h +210 -0
  88. data/ext/image_intensities/turbojpeg/turbojpeg.c +2150 -0
  89. data/ext/image_intensities/turbojpeg/wrbmp.c +558 -0
  90. data/ext/image_intensities/turbojpeg/wrppm.c +365 -0
  91. data/image_intensities.gemspec +1 -1
  92. data/lib/image_intensities/version.rb +1 -1
  93. metadata +91 -3
@@ -0,0 +1,109 @@
1
+ /*
2
+ * jcomapi.c
3
+ *
4
+ * This file was part of the Independent JPEG Group's software:
5
+ * Copyright (C) 1994-1997, Thomas G. Lane.
6
+ * It was modified by The libjpeg-turbo Project to include only code relevant
7
+ * to libjpeg-turbo.
8
+ * For conditions of distribution and use, see the accompanying README.ijg
9
+ * file.
10
+ *
11
+ * This file contains application interface routines that are used for both
12
+ * compression and decompression.
13
+ */
14
+
15
+ #define JPEG_INTERNALS
16
+ #include "jinclude.h"
17
+ #include "jpeglib.h"
18
+
19
+
20
+ /*
21
+ * Abort processing of a JPEG compression or decompression operation,
22
+ * but don't destroy the object itself.
23
+ *
24
+ * For this, we merely clean up all the nonpermanent memory pools.
25
+ * Note that temp files (virtual arrays) are not allowed to belong to
26
+ * the permanent pool, so we will be able to close all temp files here.
27
+ * Closing a data source or destination, if necessary, is the application's
28
+ * responsibility.
29
+ */
30
+
31
+ GLOBAL(void)
32
+ jpeg_abort(j_common_ptr cinfo)
33
+ {
34
+ int pool;
35
+
36
+ /* Do nothing if called on a not-initialized or destroyed JPEG object. */
37
+ if (cinfo->mem == NULL)
38
+ return;
39
+
40
+ /* Releasing pools in reverse order might help avoid fragmentation
41
+ * with some (brain-damaged) malloc libraries.
42
+ */
43
+ for (pool = JPOOL_NUMPOOLS - 1; pool > JPOOL_PERMANENT; pool--) {
44
+ (*cinfo->mem->free_pool) (cinfo, pool);
45
+ }
46
+
47
+ /* Reset overall state for possible reuse of object */
48
+ if (cinfo->is_decompressor) {
49
+ cinfo->global_state = DSTATE_START;
50
+ /* Try to keep application from accessing now-deleted marker list.
51
+ * A bit kludgy to do it here, but this is the most central place.
52
+ */
53
+ ((j_decompress_ptr)cinfo)->marker_list = NULL;
54
+ } else {
55
+ cinfo->global_state = CSTATE_START;
56
+ }
57
+ }
58
+
59
+
60
+ /*
61
+ * Destruction of a JPEG object.
62
+ *
63
+ * Everything gets deallocated except the master jpeg_compress_struct itself
64
+ * and the error manager struct. Both of these are supplied by the application
65
+ * and must be freed, if necessary, by the application. (Often they are on
66
+ * the stack and so don't need to be freed anyway.)
67
+ * Closing a data source or destination, if necessary, is the application's
68
+ * responsibility.
69
+ */
70
+
71
+ GLOBAL(void)
72
+ jpeg_destroy(j_common_ptr cinfo)
73
+ {
74
+ /* We need only tell the memory manager to release everything. */
75
+ /* NB: mem pointer is NULL if memory mgr failed to initialize. */
76
+ if (cinfo->mem != NULL)
77
+ (*cinfo->mem->self_destruct) (cinfo);
78
+ cinfo->mem = NULL; /* be safe if jpeg_destroy is called twice */
79
+ cinfo->global_state = 0; /* mark it destroyed */
80
+ }
81
+
82
+
83
+ /*
84
+ * Convenience routines for allocating quantization and Huffman tables.
85
+ * (Would jutils.c be a more reasonable place to put these?)
86
+ */
87
+
88
+ GLOBAL(JQUANT_TBL *)
89
+ jpeg_alloc_quant_table(j_common_ptr cinfo)
90
+ {
91
+ JQUANT_TBL *tbl;
92
+
93
+ tbl = (JQUANT_TBL *)
94
+ (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, sizeof(JQUANT_TBL));
95
+ tbl->sent_table = FALSE; /* make sure this is false in any new table */
96
+ return tbl;
97
+ }
98
+
99
+
100
+ GLOBAL(JHUFF_TBL *)
101
+ jpeg_alloc_huff_table(j_common_ptr cinfo)
102
+ {
103
+ JHUFF_TBL *tbl;
104
+
105
+ tbl = (JHUFF_TBL *)
106
+ (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, sizeof(JHUFF_TBL));
107
+ tbl->sent_table = FALSE; /* make sure this is false in any new table */
108
+ return tbl;
109
+ }
@@ -0,0 +1,73 @@
1
+ /* Version ID for the JPEG library.
2
+ * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
3
+ */
4
+ #define JPEG_LIB_VERSION 62
5
+
6
+ /* libjpeg-turbo version */
7
+ #define LIBJPEG_TURBO_VERSION 2.0.3
8
+
9
+ /* libjpeg-turbo version in integer form */
10
+ #define LIBJPEG_TURBO_VERSION_NUMBER 2000003
11
+
12
+ /* Support arithmetic encoding */
13
+ #define C_ARITH_CODING_SUPPORTED 1
14
+
15
+ /* Support arithmetic decoding */
16
+ #define D_ARITH_CODING_SUPPORTED 1
17
+
18
+ /* Support in-memory source/destination managers */
19
+ /* #undef MEM_SRCDST_SUPPORTED */
20
+
21
+ /* Use accelerated SIMD routines. */
22
+ /* #undef WITH_SIMD */
23
+
24
+ /*
25
+ * Define BITS_IN_JSAMPLE as either
26
+ * 8 for 8-bit sample values (the usual setting)
27
+ * 12 for 12-bit sample values
28
+ * Only 8 and 12 are legal data precisions for lossy JPEG according to the
29
+ * JPEG standard, and the IJG code does not support anything else!
30
+ * We do not support run-time selection of data precision, sorry.
31
+ */
32
+
33
+ #define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
34
+
35
+ /* Define to 1 if you have the <locale.h> header file. */
36
+ #define HAVE_LOCALE_H 1
37
+
38
+ /* Define to 1 if you have the <stddef.h> header file. */
39
+ #define HAVE_STDDEF_H 1
40
+
41
+ /* Define to 1 if you have the <stdlib.h> header file. */
42
+ #define HAVE_STDLIB_H 1
43
+
44
+ /* Define if you need to include <sys/types.h> to get size_t. */
45
+ #define NEED_SYS_TYPES_H 1
46
+
47
+ /* Define if you have BSD-like bzero and bcopy in <strings.h> rather than
48
+ memset/memcpy in <string.h>. */
49
+ /* #undef NEED_BSD_STRINGS */
50
+
51
+ /* Define to 1 if the system has the type `unsigned char'. */
52
+ #define HAVE_UNSIGNED_CHAR 1
53
+
54
+ /* Define to 1 if the system has the type `unsigned short'. */
55
+ #define HAVE_UNSIGNED_SHORT 1
56
+
57
+ /* Compiler does not support pointers to undefined structures. */
58
+ /* #undef INCOMPLETE_TYPES_BROKEN */
59
+
60
+ /* Define if your (broken) compiler shifts signed values as if they were
61
+ unsigned. */
62
+ /* #undef RIGHT_SHIFT_IS_UNSIGNED */
63
+
64
+ /* Define to 1 if type `char' is unsigned and you are not using gcc. */
65
+ #ifndef __CHAR_UNSIGNED__
66
+ /* #undef __CHAR_UNSIGNED__ */
67
+ #endif
68
+
69
+ /* Define to empty if `const' does not conform to ANSI C. */
70
+ /* #undef const */
71
+
72
+ /* Define to `unsigned int' if <sys/types.h> does not define. */
73
+ /* #undef size_t */
@@ -0,0 +1,31 @@
1
+ /* libjpeg-turbo build number */
2
+ #define BUILD "20190807"
3
+
4
+ /* Compiler's inline keyword */
5
+ #undef inline
6
+
7
+ /* How to obtain function inlining. */
8
+ #define INLINE __inline__
9
+
10
+ /* Define to the full name of this package. */
11
+ #define PACKAGE_NAME "libjpeg-turbo"
12
+
13
+ /* Version number of package */
14
+ #define VERSION "2.0.3"
15
+
16
+ /* The size of `size_t', as computed by sizeof. */
17
+ #define SIZEOF_SIZE_T 8
18
+
19
+ /* Define if your compiler has __builtin_ctzl() and sizeof(unsigned long) == sizeof(size_t). */
20
+ #define HAVE_BUILTIN_CTZL
21
+
22
+ /* Define to 1 if you have the <intrin.h> header file. */
23
+ /* #undef HAVE_INTRIN_H */
24
+
25
+ #if defined(_MSC_VER) && defined(HAVE_INTRIN_H)
26
+ #if (SIZEOF_SIZE_T == 8)
27
+ #define HAVE_BITSCANFORWARD64
28
+ #elif (SIZEOF_SIZE_T == 4)
29
+ #define HAVE_BITSCANFORWARD
30
+ #endif
31
+ #endif