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,42 @@
1
+ /*
2
+ * jchuff.h
3
+ *
4
+ * This file was part of the Independent JPEG Group's software:
5
+ * Copyright (C) 1991-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 declarations for Huffman entropy encoding routines
12
+ * that are shared between the sequential encoder (jchuff.c) and the
13
+ * progressive encoder (jcphuff.c). No other modules need to see these.
14
+ */
15
+
16
+ /* The legal range of a DCT coefficient is
17
+ * -1024 .. +1023 for 8-bit data;
18
+ * -16384 .. +16383 for 12-bit data.
19
+ * Hence the magnitude should always fit in 10 or 14 bits respectively.
20
+ */
21
+
22
+ #if BITS_IN_JSAMPLE == 8
23
+ #define MAX_COEF_BITS 10
24
+ #else
25
+ #define MAX_COEF_BITS 14
26
+ #endif
27
+
28
+ /* Derived data constructed for each Huffman table */
29
+
30
+ typedef struct {
31
+ unsigned int ehufco[256]; /* code for each symbol */
32
+ char ehufsi[256]; /* length of code for each symbol */
33
+ /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */
34
+ } c_derived_tbl;
35
+
36
+ /* Expand a Huffman table definition into the derived format */
37
+ EXTERN(void) jpeg_make_c_derived_tbl(j_compress_ptr cinfo, boolean isDC,
38
+ int tblno, c_derived_tbl **pdtbl);
39
+
40
+ /* Generate an optimal table definition given the specified counts */
41
+ EXTERN(void) jpeg_gen_optimal_table(j_compress_ptr cinfo, JHUFF_TBL *htbl,
42
+ long freq[]);
@@ -0,0 +1,105 @@
1
+ /*
2
+ * jcicc.c
3
+ *
4
+ * Copyright (C) 1997-1998, Thomas G. Lane, Todd Newman.
5
+ * Copyright (C) 2017, D. R. Commander.
6
+ * For conditions of distribution and use, see the accompanying README.ijg
7
+ * file.
8
+ *
9
+ * This file provides code to write International Color Consortium (ICC) device
10
+ * profiles embedded in JFIF JPEG image files. The ICC has defined a standard
11
+ * for including such data in JPEG "APP2" markers. The code given here does
12
+ * not know anything about the internal structure of the ICC profile data; it
13
+ * just knows how to embed the profile data in a JPEG file while writing it.
14
+ */
15
+
16
+ #define JPEG_INTERNALS
17
+ #include "jinclude.h"
18
+ #include "jpeglib.h"
19
+ #include "jerror.h"
20
+
21
+
22
+ /*
23
+ * Since an ICC profile can be larger than the maximum size of a JPEG marker
24
+ * (64K), we need provisions to split it into multiple markers. The format
25
+ * defined by the ICC specifies one or more APP2 markers containing the
26
+ * following data:
27
+ * Identifying string ASCII "ICC_PROFILE\0" (12 bytes)
28
+ * Marker sequence number 1 for first APP2, 2 for next, etc (1 byte)
29
+ * Number of markers Total number of APP2's used (1 byte)
30
+ * Profile data (remainder of APP2 data)
31
+ * Decoders should use the marker sequence numbers to reassemble the profile,
32
+ * rather than assuming that the APP2 markers appear in the correct sequence.
33
+ */
34
+
35
+ #define ICC_MARKER (JPEG_APP0 + 2) /* JPEG marker code for ICC */
36
+ #define ICC_OVERHEAD_LEN 14 /* size of non-profile data in APP2 */
37
+ #define MAX_BYTES_IN_MARKER 65533 /* maximum data len of a JPEG marker */
38
+ #define MAX_DATA_BYTES_IN_MARKER (MAX_BYTES_IN_MARKER - ICC_OVERHEAD_LEN)
39
+
40
+
41
+ /*
42
+ * This routine writes the given ICC profile data into a JPEG file. It *must*
43
+ * be called AFTER calling jpeg_start_compress() and BEFORE the first call to
44
+ * jpeg_write_scanlines(). (This ordering ensures that the APP2 marker(s) will
45
+ * appear after the SOI and JFIF or Adobe markers, but before all else.)
46
+ */
47
+
48
+ GLOBAL(void)
49
+ jpeg_write_icc_profile(j_compress_ptr cinfo, const JOCTET *icc_data_ptr,
50
+ unsigned int icc_data_len)
51
+ {
52
+ unsigned int num_markers; /* total number of markers we'll write */
53
+ int cur_marker = 1; /* per spec, counting starts at 1 */
54
+ unsigned int length; /* number of bytes to write in this marker */
55
+
56
+ if (icc_data_ptr == NULL || icc_data_len == 0)
57
+ ERREXIT(cinfo, JERR_BUFFER_SIZE);
58
+ if (cinfo->global_state < CSTATE_SCANNING)
59
+ ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
60
+
61
+ /* Calculate the number of markers we'll need, rounding up of course */
62
+ num_markers = icc_data_len / MAX_DATA_BYTES_IN_MARKER;
63
+ if (num_markers * MAX_DATA_BYTES_IN_MARKER != icc_data_len)
64
+ num_markers++;
65
+
66
+ while (icc_data_len > 0) {
67
+ /* length of profile to put in this marker */
68
+ length = icc_data_len;
69
+ if (length > MAX_DATA_BYTES_IN_MARKER)
70
+ length = MAX_DATA_BYTES_IN_MARKER;
71
+ icc_data_len -= length;
72
+
73
+ /* Write the JPEG marker header (APP2 code and marker length) */
74
+ jpeg_write_m_header(cinfo, ICC_MARKER,
75
+ (unsigned int)(length + ICC_OVERHEAD_LEN));
76
+
77
+ /* Write the marker identifying string "ICC_PROFILE" (null-terminated). We
78
+ * code it in this less-than-transparent way so that the code works even if
79
+ * the local character set is not ASCII.
80
+ */
81
+ jpeg_write_m_byte(cinfo, 0x49);
82
+ jpeg_write_m_byte(cinfo, 0x43);
83
+ jpeg_write_m_byte(cinfo, 0x43);
84
+ jpeg_write_m_byte(cinfo, 0x5F);
85
+ jpeg_write_m_byte(cinfo, 0x50);
86
+ jpeg_write_m_byte(cinfo, 0x52);
87
+ jpeg_write_m_byte(cinfo, 0x4F);
88
+ jpeg_write_m_byte(cinfo, 0x46);
89
+ jpeg_write_m_byte(cinfo, 0x49);
90
+ jpeg_write_m_byte(cinfo, 0x4C);
91
+ jpeg_write_m_byte(cinfo, 0x45);
92
+ jpeg_write_m_byte(cinfo, 0x0);
93
+
94
+ /* Add the sequencing info */
95
+ jpeg_write_m_byte(cinfo, cur_marker);
96
+ jpeg_write_m_byte(cinfo, (int)num_markers);
97
+
98
+ /* Add the profile data */
99
+ while (length--) {
100
+ jpeg_write_m_byte(cinfo, *icc_data_ptr);
101
+ icc_data_ptr++;
102
+ }
103
+ cur_marker++;
104
+ }
105
+ }
@@ -0,0 +1,77 @@
1
+ /*
2
+ * jcinit.c
3
+ *
4
+ * Copyright (C) 1991-1997, Thomas G. Lane.
5
+ * This file is part of the Independent JPEG Group's software.
6
+ * For conditions of distribution and use, see the accompanying README.ijg
7
+ * file.
8
+ *
9
+ * This file contains initialization logic for the JPEG compressor.
10
+ * This routine is in charge of selecting the modules to be executed and
11
+ * making an initialization call to each one.
12
+ *
13
+ * Logically, this code belongs in jcmaster.c. It's split out because
14
+ * linking this routine implies linking the entire compression library.
15
+ * For a transcoding-only application, we want to be able to use jcmaster.c
16
+ * without linking in the whole library.
17
+ */
18
+
19
+ #define JPEG_INTERNALS
20
+ #include "jinclude.h"
21
+ #include "jpeglib.h"
22
+
23
+
24
+ /*
25
+ * Master selection of compression modules.
26
+ * This is done once at the start of processing an image. We determine
27
+ * which modules will be used and give them appropriate initialization calls.
28
+ */
29
+
30
+ GLOBAL(void)
31
+ jinit_compress_master(j_compress_ptr cinfo)
32
+ {
33
+ /* Initialize master control (includes parameter checking/processing) */
34
+ jinit_c_master_control(cinfo, FALSE /* full compression */);
35
+
36
+ /* Preprocessing */
37
+ if (!cinfo->raw_data_in) {
38
+ jinit_color_converter(cinfo);
39
+ jinit_downsampler(cinfo);
40
+ jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */);
41
+ }
42
+ /* Forward DCT */
43
+ jinit_forward_dct(cinfo);
44
+ /* Entropy encoding: either Huffman or arithmetic coding. */
45
+ if (cinfo->arith_code) {
46
+ #ifdef C_ARITH_CODING_SUPPORTED
47
+ jinit_arith_encoder(cinfo);
48
+ #else
49
+ ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
50
+ #endif
51
+ } else {
52
+ if (cinfo->progressive_mode) {
53
+ #ifdef C_PROGRESSIVE_SUPPORTED
54
+ jinit_phuff_encoder(cinfo);
55
+ #else
56
+ ERREXIT(cinfo, JERR_NOT_COMPILED);
57
+ #endif
58
+ } else
59
+ jinit_huff_encoder(cinfo);
60
+ }
61
+
62
+ /* Need a full-image coefficient buffer in any multi-pass mode. */
63
+ jinit_c_coef_controller(cinfo, (boolean)(cinfo->num_scans > 1 ||
64
+ cinfo->optimize_coding));
65
+ jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */);
66
+
67
+ jinit_marker_writer(cinfo);
68
+
69
+ /* We can now tell the memory manager to allocate virtual arrays. */
70
+ (*cinfo->mem->realize_virt_arrays) ((j_common_ptr)cinfo);
71
+
72
+ /* Write the datastream header (SOI) immediately.
73
+ * Frame and scan headers are postponed till later.
74
+ * This lets application insert special markers after the SOI.
75
+ */
76
+ (*cinfo->marker->write_file_header) (cinfo);
77
+ }
@@ -0,0 +1,162 @@
1
+ /*
2
+ * jcmainct.c
3
+ *
4
+ * This file was part of the Independent JPEG Group's software:
5
+ * Copyright (C) 1994-1996, 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 the main buffer controller for compression.
12
+ * The main buffer lies between the pre-processor and the JPEG
13
+ * compressor proper; it holds downsampled data in the JPEG colorspace.
14
+ */
15
+
16
+ #define JPEG_INTERNALS
17
+ #include "jinclude.h"
18
+ #include "jpeglib.h"
19
+
20
+
21
+ /* Private buffer controller object */
22
+
23
+ typedef struct {
24
+ struct jpeg_c_main_controller pub; /* public fields */
25
+
26
+ JDIMENSION cur_iMCU_row; /* number of current iMCU row */
27
+ JDIMENSION rowgroup_ctr; /* counts row groups received in iMCU row */
28
+ boolean suspended; /* remember if we suspended output */
29
+ J_BUF_MODE pass_mode; /* current operating mode */
30
+
31
+ /* If using just a strip buffer, this points to the entire set of buffers
32
+ * (we allocate one for each component). In the full-image case, this
33
+ * points to the currently accessible strips of the virtual arrays.
34
+ */
35
+ JSAMPARRAY buffer[MAX_COMPONENTS];
36
+ } my_main_controller;
37
+
38
+ typedef my_main_controller *my_main_ptr;
39
+
40
+
41
+ /* Forward declarations */
42
+ METHODDEF(void) process_data_simple_main(j_compress_ptr cinfo,
43
+ JSAMPARRAY input_buf,
44
+ JDIMENSION *in_row_ctr,
45
+ JDIMENSION in_rows_avail);
46
+
47
+
48
+ /*
49
+ * Initialize for a processing pass.
50
+ */
51
+
52
+ METHODDEF(void)
53
+ start_pass_main(j_compress_ptr cinfo, J_BUF_MODE pass_mode)
54
+ {
55
+ my_main_ptr main_ptr = (my_main_ptr)cinfo->main;
56
+
57
+ /* Do nothing in raw-data mode. */
58
+ if (cinfo->raw_data_in)
59
+ return;
60
+
61
+ if (pass_mode != JBUF_PASS_THRU)
62
+ ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
63
+
64
+ main_ptr->cur_iMCU_row = 0; /* initialize counters */
65
+ main_ptr->rowgroup_ctr = 0;
66
+ main_ptr->suspended = FALSE;
67
+ main_ptr->pass_mode = pass_mode; /* save mode for use by process_data */
68
+ main_ptr->pub.process_data = process_data_simple_main;
69
+ }
70
+
71
+
72
+ /*
73
+ * Process some data.
74
+ * This routine handles the simple pass-through mode,
75
+ * where we have only a strip buffer.
76
+ */
77
+
78
+ METHODDEF(void)
79
+ process_data_simple_main(j_compress_ptr cinfo, JSAMPARRAY input_buf,
80
+ JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)
81
+ {
82
+ my_main_ptr main_ptr = (my_main_ptr)cinfo->main;
83
+
84
+ while (main_ptr->cur_iMCU_row < cinfo->total_iMCU_rows) {
85
+ /* Read input data if we haven't filled the main buffer yet */
86
+ if (main_ptr->rowgroup_ctr < DCTSIZE)
87
+ (*cinfo->prep->pre_process_data) (cinfo, input_buf, in_row_ctr,
88
+ in_rows_avail, main_ptr->buffer,
89
+ &main_ptr->rowgroup_ctr,
90
+ (JDIMENSION)DCTSIZE);
91
+
92
+ /* If we don't have a full iMCU row buffered, return to application for
93
+ * more data. Note that preprocessor will always pad to fill the iMCU row
94
+ * at the bottom of the image.
95
+ */
96
+ if (main_ptr->rowgroup_ctr != DCTSIZE)
97
+ return;
98
+
99
+ /* Send the completed row to the compressor */
100
+ if (!(*cinfo->coef->compress_data) (cinfo, main_ptr->buffer)) {
101
+ /* If compressor did not consume the whole row, then we must need to
102
+ * suspend processing and return to the application. In this situation
103
+ * we pretend we didn't yet consume the last input row; otherwise, if
104
+ * it happened to be the last row of the image, the application would
105
+ * think we were done.
106
+ */
107
+ if (!main_ptr->suspended) {
108
+ (*in_row_ctr)--;
109
+ main_ptr->suspended = TRUE;
110
+ }
111
+ return;
112
+ }
113
+ /* We did finish the row. Undo our little suspension hack if a previous
114
+ * call suspended; then mark the main buffer empty.
115
+ */
116
+ if (main_ptr->suspended) {
117
+ (*in_row_ctr)++;
118
+ main_ptr->suspended = FALSE;
119
+ }
120
+ main_ptr->rowgroup_ctr = 0;
121
+ main_ptr->cur_iMCU_row++;
122
+ }
123
+ }
124
+
125
+
126
+ /*
127
+ * Initialize main buffer controller.
128
+ */
129
+
130
+ GLOBAL(void)
131
+ jinit_c_main_controller(j_compress_ptr cinfo, boolean need_full_buffer)
132
+ {
133
+ my_main_ptr main_ptr;
134
+ int ci;
135
+ jpeg_component_info *compptr;
136
+
137
+ main_ptr = (my_main_ptr)
138
+ (*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE,
139
+ sizeof(my_main_controller));
140
+ cinfo->main = (struct jpeg_c_main_controller *)main_ptr;
141
+ main_ptr->pub.start_pass = start_pass_main;
142
+
143
+ /* We don't need to create a buffer in raw-data mode. */
144
+ if (cinfo->raw_data_in)
145
+ return;
146
+
147
+ /* Create the buffer. It holds downsampled data, so each component
148
+ * may be of a different size.
149
+ */
150
+ if (need_full_buffer) {
151
+ ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
152
+ } else {
153
+ /* Allocate a strip buffer for each component */
154
+ for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
155
+ ci++, compptr++) {
156
+ main_ptr->buffer[ci] = (*cinfo->mem->alloc_sarray)
157
+ ((j_common_ptr)cinfo, JPOOL_IMAGE,
158
+ compptr->width_in_blocks * DCTSIZE,
159
+ (JDIMENSION)(compptr->v_samp_factor * DCTSIZE));
160
+ }
161
+ }
162
+ }