home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume29 / jpeg / part16 < prev    next >
Encoding:
Text File  |  1992-04-02  |  53.9 KB  |  1,401 lines

  1. Newsgroups: comp.sources.misc
  2. From: jpeg-info@uunet.uu.net (Independent JPEG Group)
  3. Subject:  REPOST: v29i016:  jpeg - JPEG image compression, Part16/18
  4. Message-ID: <1992Mar28.212117.29215@sparky.imd.sterling.com>
  5. X-Md4-Signature: aa48c5adc5cb63f30b3d2652bd455c9a
  6. Date: Sat, 28 Mar 1992 21:21:17 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: jpeg-info@uunet.uu.net (Independent JPEG Group)
  10. Posting-number: Volume 29, Issue 16
  11. Archive-name: jpeg/part16
  12. Environment: UNIX, VMS, MS-DOS, Mac, Amiga, Cray
  13.  
  14. [ Reposted due to a propagation problem.  -Kent+ ]
  15.  
  16. #! /bin/sh
  17. # into a shell via "sh file" or similar.  To overwrite existing files,
  18. # type "sh file -c".
  19. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  20. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  21. # Contents:  jddeflts.c jdmcu.c jwrtarga.c makdjpeg.cf makefile.bcc
  22. #   makefile.manx makefile.mc5 testimg.jpg.u testorig.jpg.u
  23. # Wrapped by kent@sparky on Mon Mar 23 16:02:56 1992
  24. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  25. echo If this archive is complete, you will see the following message:
  26. echo '          "shar: End of archive 16 (of 18)."'
  27. if test -f 'jddeflts.c' -a "${1}" != "-c" ; then 
  28.   echo shar: Will not clobber existing file \"'jddeflts.c'\"
  29. else
  30.   echo shar: Extracting \"'jddeflts.c'\" \(6026 characters\)
  31.   sed "s/^X//" >'jddeflts.c' <<'END_OF_FILE'
  32. X/*
  33. X * jddeflts.c
  34. X *
  35. X * Copyright (C) 1991, 1992, Thomas G. Lane.
  36. X * This file is part of the Independent JPEG Group's software.
  37. X * For conditions of distribution and use, see the accompanying README file.
  38. X *
  39. X * This file contains optional default-setting code for the JPEG decompressor.
  40. X * User interfaces do not have to use this file, but those that don't use it
  41. X * must know more about the innards of the JPEG code.
  42. X */
  43. X
  44. X#include "jinclude.h"
  45. X
  46. X
  47. X/* Default do-nothing progress monitoring routine.
  48. X * This can be overridden by a user interface that wishes to
  49. X * provide progress monitoring; just set methods->progress_monitor
  50. X * after j_d_defaults is done.  The routine will be called periodically
  51. X * during the decompression process.
  52. X *
  53. X * During any one pass, loopcounter increases from 0 up to (not including)
  54. X * looplimit; the step size is not necessarily 1.  Both the step size and
  55. X * the limit may differ between passes.  The expected total number of passes
  56. X * is in cinfo->total_passes, and the number of passes already completed is
  57. X * in cinfo->completed_passes.  Thus the fraction of work completed may be
  58. X * estimated as
  59. X *        completed_passes + (loopcounter/looplimit)
  60. X *        ------------------------------------------
  61. X *                total_passes
  62. X * ignoring the fact that the passes may not be equal amounts of work.
  63. X *
  64. X * When decompressing, the total_passes figure is an estimate that may be
  65. X * on the high side; completed_passes will jump by more than one if some
  66. X * passes are skipped.
  67. X */
  68. X
  69. XMETHODDEF void
  70. Xprogress_monitor (decompress_info_ptr cinfo, long loopcounter, long looplimit)
  71. X{
  72. X  /* do nothing */
  73. X}
  74. X
  75. X
  76. X/*
  77. X * Reload the input buffer after it's been emptied, and return the next byte.
  78. X * See the JGETC macro for calling conditions.
  79. X *
  80. X * This routine can be overridden by the system-dependent user interface,
  81. X * in case the data source is not a stdio stream or some other special
  82. X * condition applies.  Note, however, that this capability only applies for
  83. X * JFIF or similar serial-access JPEG file formats.  The input file control
  84. X * module for a random-access format such as TIFF/JPEG would most likely
  85. X * override the read_jpeg_data method with its own routine.
  86. X */
  87. X
  88. XMETHODDEF int
  89. Xread_jpeg_data (decompress_info_ptr cinfo)
  90. X{
  91. X  cinfo->next_input_byte = cinfo->input_buffer + MIN_UNGET;
  92. X
  93. X  cinfo->bytes_in_buffer = (int) JFREAD(cinfo->input_file,
  94. X                    cinfo->next_input_byte,
  95. X                    JPEG_BUF_SIZE);
  96. X  
  97. X  if (cinfo->bytes_in_buffer <= 0)
  98. X    ERREXIT(cinfo->emethods, "Unexpected EOF in JPEG file");
  99. X
  100. X  return JGETC(cinfo);
  101. X}
  102. X
  103. X
  104. X
  105. X/* Default parameter setup for decompression.
  106. X *
  107. X * User interfaces that don't choose to use this routine must do their
  108. X * own setup of all these parameters.  Alternately, you can call this
  109. X * to establish defaults and then alter parameters selectively.  This
  110. X * is the recommended approach since, if we add any new parameters,
  111. X * your code will still work (they'll be set to reasonable defaults).
  112. X *
  113. X * standard_buffering should be TRUE to cause an input buffer to be allocated
  114. X * (the normal case); if FALSE, the user interface must provide a buffer.
  115. X * This option is most useful in the case that the buffer must not be freed
  116. X * at the end of an image.  (For example, when reading a sequence of images
  117. X * from a single file, the remaining data in the buffer represents the
  118. X * start of the next image and mustn't be discarded.)  To handle this,
  119. X * allocate the input buffer yourself at startup, WITHOUT using alloc_small
  120. X * (probably a direct call to malloc() instead).  Then pass FALSE on each
  121. X * call to j_d_defaults to ensure the buffer state is not modified.
  122. X *
  123. X * If the source of the JPEG data is not a stdio stream, override the
  124. X * read_jpeg_data method with your own routine after calling j_d_defaults.
  125. X * You can still use the standard buffer if it's appropriate.
  126. X *
  127. X * CAUTION: if you want to decompress multiple images per run, it's necessary
  128. X * to call j_d_defaults before *each* call to jpeg_decompress, since subsidiary
  129. X * structures like the quantization tables are automatically freed during
  130. X * cleanup.
  131. X */
  132. X
  133. XGLOBAL void
  134. Xj_d_defaults (decompress_info_ptr cinfo, boolean standard_buffering)
  135. X/* NB: the external methods must already be set up. */
  136. X{
  137. X  short i;
  138. X
  139. X  /* Initialize pointers as needed to mark stuff unallocated. */
  140. X  /* Outer application may fill in default tables for abbreviated files... */
  141. X  cinfo->comp_info = NULL;
  142. X  for (i = 0; i < NUM_QUANT_TBLS; i++)
  143. X    cinfo->quant_tbl_ptrs[i] = NULL;
  144. X  for (i = 0; i < NUM_HUFF_TBLS; i++) {
  145. X    cinfo->dc_huff_tbl_ptrs[i] = NULL;
  146. X    cinfo->ac_huff_tbl_ptrs[i] = NULL;
  147. X  }
  148. X  cinfo->colormap = NULL;
  149. X
  150. X  /* Default to RGB output */
  151. X  /* UI can override by changing out_color_space */
  152. X  cinfo->out_color_space = CS_RGB;
  153. X  cinfo->jpeg_color_space = CS_UNKNOWN;
  154. X  /* Setting any other value in jpeg_color_space overrides heuristics in */
  155. X  /* jrdjfif.c.  That might be useful when reading non-JFIF JPEG files, */
  156. X  /* but ordinarily the UI shouldn't change it. */
  157. X  
  158. X  /* Default to no gamma correction of output */
  159. X  cinfo->output_gamma = 1.0;
  160. X  
  161. X  /* Default to no color quantization */
  162. X  cinfo->quantize_colors = FALSE;
  163. X  /* but set reasonable default parameters for quantization, */
  164. X  /* so that turning on quantize_colors is sufficient to do something useful */
  165. X  cinfo->two_pass_quantize = TRUE;
  166. X  cinfo->use_dithering = TRUE;
  167. X  cinfo->desired_number_of_colors = 256;
  168. X  
  169. X  /* Default to no smoothing */
  170. X  cinfo->do_block_smoothing = FALSE;
  171. X  cinfo->do_pixel_smoothing = FALSE;
  172. X  
  173. X  /* Allocate memory for input buffer, unless outer application provides it. */
  174. X  if (standard_buffering) {
  175. X    cinfo->input_buffer = (char *) (*cinfo->emethods->alloc_small)
  176. X                    ((size_t) (JPEG_BUF_SIZE + MIN_UNGET));
  177. X    cinfo->bytes_in_buffer = 0;    /* initialize buffer to empty */
  178. X  }
  179. X
  180. X  /* Install standard buffer-reloading method (outer code may override). */
  181. X  cinfo->methods->read_jpeg_data = read_jpeg_data;
  182. X
  183. X  /* Install default do-nothing progress monitoring method. */
  184. X  cinfo->methods->progress_monitor = progress_monitor;
  185. X}
  186. END_OF_FILE
  187.   if test 6026 -ne `wc -c <'jddeflts.c'`; then
  188.     echo shar: \"'jddeflts.c'\" unpacked with wrong size!
  189.   fi
  190.   # end of 'jddeflts.c'
  191. fi
  192. if test -f 'jdmcu.c' -a "${1}" != "-c" ; then 
  193.   echo shar: Will not clobber existing file \"'jdmcu.c'\"
  194. else
  195.   echo shar: Extracting \"'jdmcu.c'\" \(6106 characters\)
  196.   sed "s/^X//" >'jdmcu.c' <<'END_OF_FILE'
  197. X/*
  198. X * jdmcu.c
  199. X *
  200. X * Copyright (C) 1991, 1992, Thomas G. Lane.
  201. X * This file is part of the Independent JPEG Group's software.
  202. X * For conditions of distribution and use, see the accompanying README file.
  203. X *
  204. X * This file contains MCU disassembly routines and quantization descaling.
  205. X * These routines are invoked via the disassemble_MCU, reverse_DCT, and
  206. X * disassemble_init/term methods.
  207. X */
  208. X
  209. X#include "jinclude.h"
  210. X
  211. X
  212. X/*
  213. X * Quantization descaling and zigzag reordering
  214. X */
  215. X
  216. X
  217. X/* ZAG[i] is the natural-order position of the i'th element of zigzag order. */
  218. X
  219. Xstatic const short ZAG[DCTSIZE2] = {
  220. X  0,  1,  8, 16,  9,  2,  3, 10,
  221. X 17, 24, 32, 25, 18, 11,  4,  5,
  222. X 12, 19, 26, 33, 40, 48, 41, 34,
  223. X 27, 20, 13,  6,  7, 14, 21, 28,
  224. X 35, 42, 49, 56, 57, 50, 43, 36,
  225. X 29, 22, 15, 23, 30, 37, 44, 51,
  226. X 58, 59, 52, 45, 38, 31, 39, 46,
  227. X 53, 60, 61, 54, 47, 55, 62, 63
  228. X};
  229. X
  230. X
  231. XLOCAL void
  232. Xqdescale_zig (JBLOCK input, JBLOCKROW outputptr, QUANT_TBL_PTR quanttbl)
  233. X{
  234. X  const short * zagptr = ZAG;
  235. X  short i;
  236. X
  237. X  for (i = DCTSIZE2-1; i >= 0; i--) {
  238. X    (*outputptr)[*zagptr++] = (*input++) * (*quanttbl++);
  239. X  }
  240. X}
  241. X
  242. X
  243. X
  244. X/*
  245. X * Fetch one MCU row from entropy_decode, build coefficient array.
  246. X * This version is used for noninterleaved (single-component) scans.
  247. X */
  248. X
  249. XMETHODDEF void
  250. Xdisassemble_noninterleaved_MCU (decompress_info_ptr cinfo,
  251. X                JBLOCKIMAGE image_data)
  252. X{
  253. X  JBLOCK MCU_data[1];
  254. X  long mcuindex;
  255. X  jpeg_component_info * compptr;
  256. X  QUANT_TBL_PTR quant_ptr;
  257. X
  258. X  /* this is pretty easy since there is one component and one block per MCU */
  259. X  compptr = cinfo->cur_comp_info[0];
  260. X  quant_ptr = cinfo->quant_tbl_ptrs[compptr->quant_tbl_no];
  261. X  for (mcuindex = 0; mcuindex < cinfo->MCUs_per_row; mcuindex++) {
  262. X    /* Fetch the coefficient data */
  263. X    (*cinfo->methods->entropy_decode) (cinfo, MCU_data);
  264. X    /* Descale, reorder, and distribute it into the image array */
  265. X    qdescale_zig(MCU_data[0], image_data[0][0] + mcuindex, quant_ptr);
  266. X  }
  267. X}
  268. X
  269. X
  270. X/*
  271. X * Fetch one MCU row from entropy_decode, build coefficient array.
  272. X * This version is used for interleaved (multi-component) scans.
  273. X */
  274. X
  275. XMETHODDEF void
  276. Xdisassemble_interleaved_MCU (decompress_info_ptr cinfo,
  277. X                 JBLOCKIMAGE image_data)
  278. X{
  279. X  JBLOCK MCU_data[MAX_BLOCKS_IN_MCU];
  280. X  long mcuindex;
  281. X  short blkn, ci, xpos, ypos;
  282. X  jpeg_component_info * compptr;
  283. X  QUANT_TBL_PTR quant_ptr;
  284. X  JBLOCKROW image_ptr;
  285. X
  286. X  for (mcuindex = 0; mcuindex < cinfo->MCUs_per_row; mcuindex++) {
  287. X    /* Fetch the coefficient data */
  288. X    (*cinfo->methods->entropy_decode) (cinfo, MCU_data);
  289. X    /* Descale, reorder, and distribute it into the image array */
  290. X    blkn = 0;
  291. X    for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
  292. X      compptr = cinfo->cur_comp_info[ci];
  293. X      quant_ptr = cinfo->quant_tbl_ptrs[compptr->quant_tbl_no];
  294. X      for (ypos = 0; ypos < compptr->MCU_height; ypos++) {
  295. X    image_ptr = image_data[ci][ypos] + (mcuindex * compptr->MCU_width);
  296. X    for (xpos = 0; xpos < compptr->MCU_width; xpos++) {
  297. X      qdescale_zig(MCU_data[blkn], image_ptr, quant_ptr);
  298. X      image_ptr++;
  299. X      blkn++;
  300. X    }
  301. X      }
  302. X    }
  303. X  }
  304. X}
  305. X
  306. X
  307. X/*
  308. X * Perform inverse DCT on each block in an MCU row's worth of data;
  309. X * output the results into a sample array starting at row start_row.
  310. X * NB: start_row can only be nonzero when dealing with a single-component
  311. X * scan; otherwise we'd have to pass different offsets for different
  312. X * components, since the heights of interleaved MCU rows can vary.
  313. X * But the pipeline controller logic is such that this is not necessary.
  314. X */
  315. X
  316. XMETHODDEF void
  317. Xreverse_DCT (decompress_info_ptr cinfo,
  318. X         JBLOCKIMAGE coeff_data, JSAMPIMAGE output_data, int start_row)
  319. X{
  320. X  DCTBLOCK block;
  321. X  JBLOCKROW browptr;
  322. X  JSAMPARRAY srowptr;
  323. X  long blocksperrow, bi;
  324. X  short numrows, ri;
  325. X  short ci;
  326. X
  327. X  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
  328. X    /* calculate size of an MCU row in this component */
  329. X    blocksperrow = cinfo->cur_comp_info[ci]->subsampled_width / DCTSIZE;
  330. X    numrows = cinfo->cur_comp_info[ci]->MCU_height;
  331. X    /* iterate through all blocks in MCU row */
  332. X    for (ri = 0; ri < numrows; ri++) {
  333. X      browptr = coeff_data[ci][ri];
  334. X      srowptr = output_data[ci] + (ri * DCTSIZE + start_row);
  335. X      for (bi = 0; bi < blocksperrow; bi++) {
  336. X    /* copy the data into a local DCTBLOCK.  This allows for change of
  337. X     * representation (if DCTELEM != JCOEF).  On 80x86 machines it also
  338. X     * brings the data back from FAR storage to NEAR storage.
  339. X     */
  340. X    { register JCOEFPTR elemptr = browptr[bi];
  341. X      register DCTELEM *localblkptr = block;
  342. X      register short elem = DCTSIZE2;
  343. X
  344. X      while (--elem >= 0)
  345. X        *localblkptr++ = (DCTELEM) *elemptr++;
  346. X    }
  347. X
  348. X    j_rev_dct(block);    /* perform inverse DCT */
  349. X
  350. X    /* output the data into the sample array.
  351. X     * Note change from signed to unsigned representation:
  352. X     * DCT calculation works with values +-CENTERJSAMPLE,
  353. X     * but sample arrays always hold 0..MAXJSAMPLE.
  354. X     * Have to do explicit range-limiting because of quantization errors
  355. X     * and so forth in the DCT/IDCT phase.
  356. X     */
  357. X    { register JSAMPROW elemptr;
  358. X      register DCTELEM *localblkptr = block;
  359. X      register short elemr, elemc;
  360. X      register DCTELEM temp;
  361. X
  362. X      for (elemr = 0; elemr < DCTSIZE; elemr++) {
  363. X        elemptr = srowptr[elemr] + (bi * DCTSIZE);
  364. X        for (elemc = 0; elemc < DCTSIZE; elemc++) {
  365. X          temp = (*localblkptr++) + CENTERJSAMPLE;
  366. X          if (temp < 0) temp = 0;
  367. X          else if (temp > MAXJSAMPLE) temp = MAXJSAMPLE;
  368. X          *elemptr++ = (JSAMPLE) temp;
  369. X        }
  370. X      }
  371. X    }
  372. X      }
  373. X    }
  374. X  }
  375. X}
  376. X
  377. X
  378. X/*
  379. X * Initialize for processing a scan.
  380. X */
  381. X
  382. XMETHODDEF void
  383. Xdisassemble_init (decompress_info_ptr cinfo)
  384. X{
  385. X  /* no work for now */
  386. X}
  387. X
  388. X
  389. X/*
  390. X * Clean up after a scan.
  391. X */
  392. X
  393. XMETHODDEF void
  394. Xdisassemble_term (decompress_info_ptr cinfo)
  395. X{
  396. X  /* no work for now */
  397. X}
  398. X
  399. X
  400. X
  401. X/*
  402. X * The method selection routine for MCU disassembly.
  403. X */
  404. X
  405. XGLOBAL void
  406. Xjseldmcu (decompress_info_ptr cinfo)
  407. X{
  408. X  if (cinfo->comps_in_scan == 1)
  409. X    cinfo->methods->disassemble_MCU = disassemble_noninterleaved_MCU;
  410. X  else
  411. X    cinfo->methods->disassemble_MCU = disassemble_interleaved_MCU;
  412. X  cinfo->methods->reverse_DCT = reverse_DCT;
  413. X  cinfo->methods->disassemble_init = disassemble_init;
  414. X  cinfo->methods->disassemble_term = disassemble_term;
  415. X}
  416. END_OF_FILE
  417.   if test 6106 -ne `wc -c <'jdmcu.c'`; then
  418.     echo shar: \"'jdmcu.c'\" unpacked with wrong size!
  419.   fi
  420.   # end of 'jdmcu.c'
  421. fi
  422. if test -f 'jwrtarga.c' -a "${1}" != "-c" ; then 
  423.   echo shar: Will not clobber existing file \"'jwrtarga.c'\"
  424. else
  425.   echo shar: Extracting \"'jwrtarga.c'\" \(5888 characters\)
  426.   sed "s/^X//" >'jwrtarga.c' <<'END_OF_FILE'
  427. X/*
  428. X * jwrtarga.c
  429. X *
  430. X * Copyright (C) 1991, 1992, Thomas G. Lane.
  431. X * This file is part of the Independent JPEG Group's software.
  432. X * For conditions of distribution and use, see the accompanying README file.
  433. X *
  434. X * This file contains routines to write output images in Targa format.
  435. X *
  436. X * These routines may need modification for non-Unix environments or
  437. X * specialized applications.  As they stand, they assume output to
  438. X * an ordinary stdio stream.
  439. X *
  440. X * These routines are invoked via the methods put_pixel_rows, put_color_map,
  441. X * and output_init/term.
  442. X *
  443. X * Based on code contributed by Lee Daniel Crocker.
  444. X */
  445. X
  446. X#include "jinclude.h"
  447. X
  448. X#ifdef TARGA_SUPPORTED
  449. X
  450. X
  451. X/*
  452. X * To support 12-bit JPEG data, we'd have to scale output down to 8 bits.
  453. X * This is not yet implemented.
  454. X */
  455. X
  456. X#ifndef EIGHT_BIT_SAMPLES
  457. X  Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */
  458. X#endif
  459. X
  460. X
  461. XLOCAL void
  462. Xwrite_header (decompress_info_ptr cinfo, int num_colors)
  463. X/* Create and write a Targa header */
  464. X{
  465. X  char targaheader[18];
  466. X
  467. X  /* Set unused fields of header to 0 */
  468. X  MEMZERO((void *) targaheader, SIZEOF(targaheader));
  469. X
  470. X  if (num_colors > 0) {
  471. X    targaheader[1] = 1;        /* color map type 1 */
  472. X    targaheader[5] = (char) (num_colors & 0xFF);
  473. X    targaheader[6] = (char) (num_colors >> 8);
  474. X    targaheader[7] = 24;    /* 24 bits per cmap entry */
  475. X  }
  476. X
  477. X  targaheader[12] = (char) (cinfo->image_width & 0xFF);
  478. X  targaheader[13] = (char) (cinfo->image_width >> 8);
  479. X  targaheader[14] = (char) (cinfo->image_height & 0xFF);
  480. X  targaheader[15] = (char) (cinfo->image_height >> 8);
  481. X  targaheader[17] = 0x20;    /* Top-down, non-interlaced */
  482. X
  483. X  if (cinfo->out_color_space == CS_GRAYSCALE) {
  484. X    targaheader[2] = 3;        /* image type = uncompressed gray-scale */
  485. X    targaheader[16] = 8;    /* bits per pixel */
  486. X  } else {            /* must be RGB */
  487. X    if (num_colors > 0) {
  488. X      targaheader[2] = 1;    /* image type = colormapped RGB */
  489. X      targaheader[16] = 8;
  490. X    } else {
  491. X      targaheader[2] = 2;    /* image type = uncompressed RGB */
  492. X      targaheader[16] = 24;
  493. X    }
  494. X  }
  495. X
  496. X  if (JFWRITE(cinfo->output_file, targaheader, 18) != (size_t) 18)
  497. X    ERREXIT(cinfo->emethods, "Could not write Targa header");
  498. X}
  499. X
  500. X
  501. X/*
  502. X * Write the file header.
  503. X */
  504. X
  505. XMETHODDEF void
  506. Xoutput_init (decompress_info_ptr cinfo)
  507. X{
  508. X  if (cinfo->out_color_space == CS_GRAYSCALE) {
  509. X    /* Targa doesn't have a mapped grayscale format, so we will */
  510. X    /* demap quantized gray output.  Never emit a colormap. */
  511. X    write_header(cinfo, 0);
  512. X  } else if (cinfo->out_color_space == CS_RGB) {
  513. X    /* For quantized output, defer writing header until put_color_map time. */
  514. X    if (! cinfo->quantize_colors)
  515. X      write_header(cinfo, 0);
  516. X  } else {
  517. X    ERREXIT(cinfo->emethods, "Targa output must be grayscale or RGB");
  518. X  }
  519. X}
  520. X
  521. X
  522. X/*
  523. X * Write some pixel data.
  524. X */
  525. X
  526. XMETHODDEF void
  527. Xput_pixel_rows (decompress_info_ptr cinfo, int num_rows,
  528. X        JSAMPIMAGE pixel_data)
  529. X{
  530. X  register FILE * outfile = cinfo->output_file;
  531. X  register JSAMPROW ptr0, ptr1, ptr2;
  532. X  register long col;
  533. X  register long width = cinfo->image_width;
  534. X  register int row;
  535. X  
  536. X  if (cinfo->final_out_comps == 1) {
  537. X    /* here for grayscale or quantized color output */
  538. X    for (row = 0; row < num_rows; row++) {
  539. X      ptr0 = pixel_data[0][row];
  540. X      for (col = width; col > 0; col--) {
  541. X    putc(GETJSAMPLE(*ptr0), outfile);
  542. X    ptr0++;
  543. X      }
  544. X    }
  545. X  } else {
  546. X    /* here for unquantized color output */
  547. X    for (row = 0; row < num_rows; row++) {
  548. X      ptr0 = pixel_data[0][row];
  549. X      ptr1 = pixel_data[1][row];
  550. X      ptr2 = pixel_data[2][row];
  551. X      for (col = width; col > 0; col--) {
  552. X    putc(GETJSAMPLE(*ptr2), outfile); /* write in BGR order */
  553. X    ptr2++;
  554. X    putc(GETJSAMPLE(*ptr1), outfile);
  555. X    ptr1++;
  556. X    putc(GETJSAMPLE(*ptr0), outfile);
  557. X    ptr0++;
  558. X      }
  559. X    }
  560. X  }
  561. X}
  562. X
  563. X
  564. X/*
  565. X * Write some demapped pixel data when color quantization is in effect.
  566. X * For Targa, this is only applied to grayscale data.
  567. X */
  568. X
  569. XMETHODDEF void
  570. Xput_demapped_rows (decompress_info_ptr cinfo, int num_rows,
  571. X           JSAMPIMAGE pixel_data)
  572. X{
  573. X  register FILE * outfile = cinfo->output_file;
  574. X  register JSAMPARRAY color_map = cinfo->colormap;
  575. X  register JSAMPROW ptr;
  576. X  register long col;
  577. X  long width = cinfo->image_width;
  578. X  int row;
  579. X  
  580. X  for (row = 0; row < num_rows; row++) {
  581. X    ptr = pixel_data[0][row];
  582. X    for (col = width; col > 0; col--) {
  583. X      putc(GETJSAMPLE(color_map[0][GETJSAMPLE(*ptr)]), outfile);
  584. X      ptr++;
  585. X    }
  586. X  }
  587. X}
  588. X
  589. X
  590. X/*
  591. X * Write the color map.
  592. X */
  593. X
  594. XMETHODDEF void
  595. Xput_color_map (decompress_info_ptr cinfo, int num_colors, JSAMPARRAY colormap)
  596. X{
  597. X  register FILE * outfile = cinfo->output_file;
  598. X  int i;
  599. X
  600. X  if (cinfo->out_color_space == CS_RGB) {
  601. X    /* We only support 8-bit colormap indexes, so only 256 colors */
  602. X    if (num_colors > 256)
  603. X      ERREXIT(cinfo->emethods, "Too many colors for Targa output");
  604. X    /* Time to write the header */
  605. X    write_header(cinfo, num_colors);
  606. X    /* Write the colormap.  Note Targa uses BGR byte order */
  607. X    for (i = 0; i < num_colors; i++) {
  608. X      putc(GETJSAMPLE(colormap[2][i]), outfile);
  609. X      putc(GETJSAMPLE(colormap[1][i]), outfile);
  610. X      putc(GETJSAMPLE(colormap[0][i]), outfile);
  611. X    }
  612. X  } else {
  613. X    cinfo->methods->put_pixel_rows = put_demapped_rows;
  614. X  }
  615. X}
  616. X
  617. X
  618. X/*
  619. X * Finish up at the end of the file.
  620. X */
  621. X
  622. XMETHODDEF void
  623. Xoutput_term (decompress_info_ptr cinfo)
  624. X{
  625. X  /* No work except to make sure we wrote the output file OK */
  626. X  fflush(cinfo->output_file);
  627. X  if (ferror(cinfo->output_file))
  628. X    ERREXIT(cinfo->emethods, "Output file write error");
  629. X}
  630. X
  631. X
  632. X/*
  633. X * The method selection routine for Targa format output.
  634. X * This should be called from d_ui_method_selection if Targa output is wanted.
  635. X */
  636. X
  637. XGLOBAL void
  638. Xjselwtarga (decompress_info_ptr cinfo)
  639. X{
  640. X  cinfo->methods->output_init = output_init;
  641. X  cinfo->methods->put_color_map = put_color_map;
  642. X  cinfo->methods->put_pixel_rows = put_pixel_rows;
  643. X  cinfo->methods->output_term = output_term;
  644. X}
  645. X
  646. X#endif /* TARGA_SUPPORTED */
  647. END_OF_FILE
  648.   if test 5888 -ne `wc -c <'jwrtarga.c'`; then
  649.     echo shar: \"'jwrtarga.c'\" unpacked with wrong size!
  650.   fi
  651.   # end of 'jwrtarga.c'
  652. fi
  653. if test -f 'makdjpeg.cf' -a "${1}" != "-c" ; then 
  654.   echo shar: Will not clobber existing file \"'makdjpeg.cf'\"
  655. else
  656.   echo shar: Extracting \"'makdjpeg.cf'\" \(300 characters\)
  657.   sed "s/^X//" >'makdjpeg.cf' <<'END_OF_FILE'
  658. XL jdmain.mix jdmaster.mix jddeflts.mix jbsmooth.mix jdarith.mix jdcolor.mix
  659. XL jdhuff.mix jdmcu.mix jdpipe.mix jdsample.mix jquant1.mix jquant2.mix
  660. XL jrevdct.mix jrdjfif.mix jwrgif.mix jwrppm.mix jwrrle.mix jwrtarga.mix
  661. XL jutils.mix jerror.mix jmemmgr.mix jmemsys.mix jmemdosa.mix
  662. Xfa;
  663. Xb djpeg,8K,48K,
  664. END_OF_FILE
  665.   if test 300 -ne `wc -c <'makdjpeg.cf'`; then
  666.     echo shar: \"'makdjpeg.cf'\" unpacked with wrong size!
  667.   fi
  668.   # end of 'makdjpeg.cf'
  669. fi
  670. if test -f 'makefile.bcc' -a "${1}" != "-c" ; then 
  671.   echo shar: Will not clobber existing file \"'makefile.bcc'\"
  672. else
  673.   echo shar: Extracting \"'makefile.bcc'\" \(6113 characters\)
  674.   sed "s/^X//" >'makefile.bcc' <<'END_OF_FILE'
  675. X# Makefile for Independent JPEG Group's software
  676. X
  677. X# This makefile is suitable for Borland C (Turbo C) on MS-DOS.
  678. X# It is set up for Borland C++, revision 3.0 or later.
  679. X# For older versions (pre-3.0), replace "-O2" with "-O -G -Z" in CFLAGS.
  680. X# If you have an even older version of Turbo C, you may be able to make it
  681. X# work by saying "CC= tcc" below.  (Very early versions of Turbo C++,
  682. X# like 1.01, are so buggy that you may as well forget it.)
  683. X# Thanks to Tom Wright and Ge' Weijers for this file.
  684. X
  685. X# Read SETUP instructions before saying "make" !!
  686. X
  687. X# The name of your C compiler:
  688. XCC= bcc
  689. X
  690. X# You may need to adjust these cc options:
  691. XCFLAGS= -DHAVE_STDC -DINCLUDES_ARE_ANSI \
  692. X    -ms -DMSDOS -DINCOMPLETE_TYPES_BROKEN -w-par -O2
  693. X# -DHAVE_STDC -DINCLUDES_ARE_ANSI enable ANSI-C features (we DON'T want -A)
  694. X# -ms selects small memory model for most efficient code
  695. X# -DMSDOS enables DOS-specific code
  696. X# -DINCOMPLETE_TYPES_BROKEN suppresses bogus warning about undefined structures
  697. X# -w-par suppresses warnings about unused function parameters
  698. X# -O2 enables full code optimization (for pre-3.0 Borland C++, use -O -G -Z)
  699. X
  700. X# Link-time cc options:
  701. XLDFLAGS= -ms
  702. X# memory model option here must match CFLAGS!
  703. X
  704. X
  705. X# source files (independently compilable files)
  706. XSOURCES= jbsmooth.c jcarith.c jccolor.c jcdeflts.c jcexpand.c jchuff.c \
  707. X        jcmain.c jcmaster.c jcmcu.c jcpipe.c jcsample.c jdarith.c jdcolor.c \
  708. X        jddeflts.c jdhuff.c jdmain.c jdmaster.c jdmcu.c jdpipe.c jdsample.c \
  709. X        jerror.c jquant1.c jquant2.c jfwddct.c jrevdct.c jutils.c jmemmgr.c \
  710. X        jrdjfif.c jrdgif.c jrdppm.c jrdrle.c jrdtarga.c jwrjfif.c jwrgif.c \
  711. X        jwrppm.c jwrrle.c jwrtarga.c
  712. X# virtual source files (not present in distribution file)
  713. XVIRTSOURCES= jmemsys.c
  714. X# system-dependent implementations of source files
  715. XSYSDEPFILES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemdos.h \
  716. X        jmemdosa.asm
  717. X# files included by source files
  718. XINCLUDES= jinclude.h jconfig.h jpegdata.h jversion.h jmemsys.h egetopt.c
  719. X# documentation, test, and support files
  720. XDOCS= README SETUP USAGE CHANGELOG cjpeg.1 djpeg.1 architecture codingrules
  721. XMAKEFILES= makefile.ansi makefile.unix makefile.manx makefile.sas \
  722. X        makefile.mc5 makefile.mc6 makcjpeg.lnk makdjpeg.lnk makefile.bcc \
  723. X        makcjpeg.lst makdjpeg.lst makefile.pwc makcjpeg.cf makdjpeg.cf \
  724. X        makljpeg.cf makefile.mms makefile.vms makvms.opt
  725. XOTHERFILES= ansi2knr.c ckconfig.c example.c
  726. XTESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg
  727. XDISTFILES= $(DOCS) $(MAKEFILES) $(SOURCES) $(SYSDEPFILES) $(INCLUDES) \
  728. X        $(OTHERFILES) $(TESTFILES)
  729. X# objectfiles common to cjpeg and djpeg
  730. XCOMOBJECTS= jutils.obj jerror.obj jmemmgr.obj jmemsys.obj jmemdosa.obj
  731. X# compression objectfiles
  732. XCLIBOBJECTS= jcmaster.obj jcdeflts.obj jcarith.obj jccolor.obj jcexpand.obj \
  733. X        jchuff.obj jcmcu.obj jcpipe.obj jcsample.obj jfwddct.obj \
  734. X        jwrjfif.obj jrdgif.obj jrdppm.obj jrdrle.obj jrdtarga.obj
  735. XCOBJECTS= jcmain.obj $(CLIBOBJECTS) $(COMOBJECTS)
  736. X# decompression objectfiles
  737. XDLIBOBJECTS= jdmaster.obj jddeflts.obj jbsmooth.obj jdarith.obj jdcolor.obj \
  738. X        jdhuff.obj jdmcu.obj jdpipe.obj jdsample.obj jquant1.obj \
  739. X        jquant2.obj jrevdct.obj jrdjfif.obj jwrgif.obj jwrppm.obj \
  740. X        jwrrle.obj jwrtarga.obj
  741. XDOBJECTS= jdmain.obj $(DLIBOBJECTS) $(COMOBJECTS)
  742. X# These objectfiles are included in libjpeg.lib
  743. XLIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
  744. X
  745. X
  746. Xall: cjpeg.exe djpeg.exe
  747. X
  748. X
  749. Xcjpeg.exe: $(COBJECTS)
  750. X    $(CC) $(LDFLAGS) -ecjpeg.exe @makcjpeg.lst
  751. X
  752. Xdjpeg.exe: $(DOBJECTS)
  753. X    $(CC) $(LDFLAGS) -edjpeg.exe @makdjpeg.lst
  754. X
  755. X.c.obj:
  756. X    $(CC) $(CFLAGS) -c $<
  757. X
  758. Xclean:
  759. X    del *.obj
  760. X    del cjpeg.exe
  761. X    del djpeg.exe
  762. X    del testout.*
  763. X
  764. Xtest:
  765. X    del testout.*
  766. X    djpeg testorig.jpg testout.ppm
  767. X    djpeg -G testorig.jpg testout.gif
  768. X    cjpeg testimg.ppm testout.jpg
  769. X    fc testimg.ppm testout.ppm
  770. X    fc testimg.gif testout.gif
  771. X    fc testimg.jpg testout.jpg
  772. X
  773. X
  774. Xjbsmooth.obj : jbsmooth.c jinclude.h jconfig.h jpegdata.h
  775. Xjcarith.obj : jcarith.c jinclude.h jconfig.h jpegdata.h
  776. Xjccolor.obj : jccolor.c jinclude.h jconfig.h jpegdata.h
  777. Xjcdeflts.obj : jcdeflts.c jinclude.h jconfig.h jpegdata.h
  778. Xjcexpand.obj : jcexpand.c jinclude.h jconfig.h jpegdata.h
  779. Xjchuff.obj : jchuff.c jinclude.h jconfig.h jpegdata.h
  780. Xjcmain.obj : jcmain.c jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c
  781. Xjcmaster.obj : jcmaster.c jinclude.h jconfig.h jpegdata.h
  782. Xjcmcu.obj : jcmcu.c jinclude.h jconfig.h jpegdata.h
  783. Xjcpipe.obj : jcpipe.c jinclude.h jconfig.h jpegdata.h
  784. Xjcsample.obj : jcsample.c jinclude.h jconfig.h jpegdata.h
  785. Xjdarith.obj : jdarith.c jinclude.h jconfig.h jpegdata.h
  786. Xjdcolor.obj : jdcolor.c jinclude.h jconfig.h jpegdata.h
  787. Xjddeflts.obj : jddeflts.c jinclude.h jconfig.h jpegdata.h
  788. Xjdhuff.obj : jdhuff.c jinclude.h jconfig.h jpegdata.h
  789. Xjdmain.obj : jdmain.c jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c
  790. Xjdmaster.obj : jdmaster.c jinclude.h jconfig.h jpegdata.h
  791. Xjdmcu.obj : jdmcu.c jinclude.h jconfig.h jpegdata.h
  792. Xjdpipe.obj : jdpipe.c jinclude.h jconfig.h jpegdata.h
  793. Xjdsample.obj : jdsample.c jinclude.h jconfig.h jpegdata.h
  794. Xjerror.obj : jerror.c jinclude.h jconfig.h jpegdata.h
  795. Xjquant1.obj : jquant1.c jinclude.h jconfig.h jpegdata.h
  796. Xjquant2.obj : jquant2.c jinclude.h jconfig.h jpegdata.h
  797. Xjfwddct.obj : jfwddct.c jinclude.h jconfig.h jpegdata.h
  798. Xjrevdct.obj : jrevdct.c jinclude.h jconfig.h jpegdata.h
  799. Xjutils.obj : jutils.c jinclude.h jconfig.h jpegdata.h
  800. Xjmemmgr.obj : jmemmgr.c jinclude.h jconfig.h jpegdata.h jmemsys.h
  801. Xjrdjfif.obj : jrdjfif.c jinclude.h jconfig.h jpegdata.h
  802. Xjrdgif.obj : jrdgif.c jinclude.h jconfig.h jpegdata.h
  803. Xjrdppm.obj : jrdppm.c jinclude.h jconfig.h jpegdata.h
  804. Xjrdrle.obj : jrdrle.c jinclude.h jconfig.h jpegdata.h
  805. Xjrdtarga.obj : jrdtarga.c jinclude.h jconfig.h jpegdata.h
  806. Xjwrjfif.obj : jwrjfif.c jinclude.h jconfig.h jpegdata.h
  807. Xjwrgif.obj : jwrgif.c jinclude.h jconfig.h jpegdata.h
  808. Xjwrppm.obj : jwrppm.c jinclude.h jconfig.h jpegdata.h
  809. Xjwrrle.obj : jwrrle.c jinclude.h jconfig.h jpegdata.h
  810. Xjwrtarga.obj : jwrtarga.c jinclude.h jconfig.h jpegdata.h
  811. Xjmemsys.obj : jmemsys.c jinclude.h jconfig.h jpegdata.h jmemsys.h
  812. Xjmemdosa.obj : jmemdosa.asm
  813. X    tasm /mx jmemdosa.asm
  814. END_OF_FILE
  815.   if test 6113 -ne `wc -c <'makefile.bcc'`; then
  816.     echo shar: \"'makefile.bcc'\" unpacked with wrong size!
  817.   fi
  818.   # end of 'makefile.bcc'
  819. fi
  820. if test -f 'makefile.manx' -a "${1}" != "-c" ; then 
  821.   echo shar: Will not clobber existing file \"'makefile.manx'\"
  822. else
  823.   echo shar: Extracting \"'makefile.manx'\" \(5948 characters\)
  824.   sed "s/^X//" >'makefile.manx' <<'END_OF_FILE'
  825. X# Makefile for Independent JPEG Group's software
  826. X
  827. X# This makefile is for Amiga systems using Manx Aztec C ver 5.x.
  828. X# Use jmemname.c as the system-dependent memory manager.
  829. X# Thanks to D.J. James (djjames@cup.portal.com) for this version.
  830. X
  831. X# Read SETUP instructions before saying "make" !!
  832. X
  833. X# The name of your C compiler:
  834. XCC= cc
  835. X
  836. X# You may need to adjust these cc options:
  837. XCFLAGS= -MC -MD -sf -sn -sp -DAMIGA -DTWO_FILE_COMMANDLINE \
  838. X    -DNEED_SIGNAL_CATCHER -Dsignal_catcher=_abort
  839. X
  840. X# Link-time cc options:
  841. XLDFLAGS= 
  842. X
  843. X# To link any special libraries, add the necessary -l commands here.
  844. XLDLIBS= -lml -lcl
  845. X
  846. X# miscellaneous OS-dependent stuff
  847. X# linker
  848. XLN= ln
  849. X# file deletion command
  850. XRM= delete quiet
  851. X# library (.lib) file creation command
  852. XAR= lb
  853. X
  854. X
  855. X# source files (independently compilable files)
  856. XSOURCES= jbsmooth.c jcarith.c jccolor.c jcdeflts.c jcexpand.c jchuff.c \
  857. X        jcmain.c jcmaster.c jcmcu.c jcpipe.c jcsample.c jdarith.c jdcolor.c \
  858. X        jddeflts.c jdhuff.c jdmain.c jdmaster.c jdmcu.c jdpipe.c jdsample.c \
  859. X        jerror.c jquant1.c jquant2.c jfwddct.c jrevdct.c jutils.c jmemmgr.c \
  860. X        jrdjfif.c jrdgif.c jrdppm.c jrdrle.c jrdtarga.c jwrjfif.c jwrgif.c \
  861. X        jwrppm.c jwrrle.c jwrtarga.c
  862. X# virtual source files (not present in distribution file)
  863. XVIRTSOURCES= jmemsys.c
  864. X# system-dependent implementations of source files
  865. XSYSDEPFILES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemdos.h \
  866. X        jmemdosa.asm
  867. X# files included by source files
  868. XINCLUDES= jinclude.h jconfig.h jpegdata.h jversion.h jmemsys.h egetopt.c
  869. X# documentation, test, and support files
  870. XDOCS= README SETUP USAGE CHANGELOG cjpeg.1 djpeg.1 architecture codingrules
  871. XMAKEFILES= makefile.ansi makefile.unix makefile.manx makefile.sas \
  872. X        makefile.mc5 makefile.mc6 makcjpeg.lnk makdjpeg.lnk makefile.bcc \
  873. X        makcjpeg.lst makdjpeg.lst makefile.pwc makcjpeg.cf makdjpeg.cf \
  874. X        makljpeg.cf makefile.mms makefile.vms makvms.opt
  875. XOTHERFILES= ansi2knr.c ckconfig.c example.c
  876. XTESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg
  877. XDISTFILES= $(DOCS) $(MAKEFILES) $(SOURCES) $(SYSDEPFILES) $(INCLUDES) \
  878. X        $(OTHERFILES) $(TESTFILES)
  879. X# objectfiles common to cjpeg and djpeg
  880. XCOMOBJECTS= jutils.o jerror.o jmemmgr.o jmemsys.o
  881. X# compression objectfiles
  882. XCLIBOBJECTS= jcmaster.o jcdeflts.o jcarith.o jccolor.o jcexpand.o jchuff.o \
  883. X        jcmcu.o jcpipe.o jcsample.o jfwddct.o jwrjfif.o jrdgif.o jrdppm.o \
  884. X        jrdrle.o jrdtarga.o
  885. XCOBJECTS= jcmain.o $(CLIBOBJECTS) $(COMOBJECTS)
  886. X# decompression objectfiles
  887. XDLIBOBJECTS= jdmaster.o jddeflts.o jbsmooth.o jdarith.o jdcolor.o jdhuff.o \
  888. X        jdmcu.o jdpipe.o jdsample.o jquant1.o jquant2.o jrevdct.o jrdjfif.o \
  889. X        jwrgif.o jwrppm.o jwrrle.o jwrtarga.o
  890. XDOBJECTS= jdmain.o $(DLIBOBJECTS) $(COMOBJECTS)
  891. X# These objectfiles are included in libjpeg.lib
  892. XLIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
  893. X
  894. X
  895. Xall: cjpeg djpeg
  896. X# By default, libjpeg.lib is not built unless you explicitly request it.
  897. X# You can add libjpeg.lib to the line above if you want it built by default.
  898. X
  899. X
  900. Xcjpeg: $(COBJECTS)
  901. X    $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) $(LDLIBS)
  902. X
  903. Xdjpeg: $(DOBJECTS)
  904. X    $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) $(LDLIBS)
  905. X
  906. X# libjpeg.lib is useful if you are including the JPEG software in a larger
  907. X# program; you'd include it in your link, rather than the individual modules.
  908. Xlibjpeg.lib: $(LIBOBJECTS)
  909. X    -$(RM) libjpeg.lib
  910. X    $(AR) libjpeg.lib  $(LIBOBJECTS)
  911. X
  912. Xclean:
  913. X    -$(RM) *.o cjpeg djpeg libjpeg.lib core testout.*
  914. X
  915. Xdistribute:
  916. X    -$(RM) jpegsrc.tar*
  917. X    tar cvf jpegsrc.tar $(DISTFILES)
  918. X    compress -v jpegsrc.tar
  919. X
  920. Xtest: cjpeg djpeg
  921. X    -$(RM) testout.ppm testout.gif testout.jpg
  922. X    djpeg testorig.jpg testout.ppm
  923. X    djpeg -G testorig.jpg testout.gif
  924. X    cjpeg testimg.ppm testout.jpg
  925. X    cmp testimg.ppm testout.ppm
  926. X    cmp testimg.gif testout.gif
  927. X    cmp testimg.jpg testout.jpg
  928. X
  929. X
  930. Xjbsmooth.o : jbsmooth.c jinclude.h jconfig.h jpegdata.h 
  931. Xjcarith.o : jcarith.c jinclude.h jconfig.h jpegdata.h 
  932. Xjccolor.o : jccolor.c jinclude.h jconfig.h jpegdata.h 
  933. Xjcdeflts.o : jcdeflts.c jinclude.h jconfig.h jpegdata.h 
  934. Xjcexpand.o : jcexpand.c jinclude.h jconfig.h jpegdata.h 
  935. Xjchuff.o : jchuff.c jinclude.h jconfig.h jpegdata.h 
  936. Xjcmain.o : jcmain.c jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c 
  937. Xjcmaster.o : jcmaster.c jinclude.h jconfig.h jpegdata.h 
  938. Xjcmcu.o : jcmcu.c jinclude.h jconfig.h jpegdata.h 
  939. Xjcpipe.o : jcpipe.c jinclude.h jconfig.h jpegdata.h 
  940. Xjcsample.o : jcsample.c jinclude.h jconfig.h jpegdata.h 
  941. Xjdarith.o : jdarith.c jinclude.h jconfig.h jpegdata.h 
  942. Xjdcolor.o : jdcolor.c jinclude.h jconfig.h jpegdata.h 
  943. Xjddeflts.o : jddeflts.c jinclude.h jconfig.h jpegdata.h 
  944. Xjdhuff.o : jdhuff.c jinclude.h jconfig.h jpegdata.h 
  945. Xjdmain.o : jdmain.c jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c 
  946. Xjdmaster.o : jdmaster.c jinclude.h jconfig.h jpegdata.h 
  947. Xjdmcu.o : jdmcu.c jinclude.h jconfig.h jpegdata.h 
  948. Xjdpipe.o : jdpipe.c jinclude.h jconfig.h jpegdata.h 
  949. Xjdsample.o : jdsample.c jinclude.h jconfig.h jpegdata.h 
  950. Xjerror.o : jerror.c jinclude.h jconfig.h jpegdata.h 
  951. Xjquant1.o : jquant1.c jinclude.h jconfig.h jpegdata.h 
  952. Xjquant2.o : jquant2.c jinclude.h jconfig.h jpegdata.h 
  953. Xjfwddct.o : jfwddct.c jinclude.h jconfig.h jpegdata.h 
  954. Xjrevdct.o : jrevdct.c jinclude.h jconfig.h jpegdata.h 
  955. Xjutils.o : jutils.c jinclude.h jconfig.h jpegdata.h 
  956. Xjmemmgr.o : jmemmgr.c jinclude.h jconfig.h jpegdata.h jmemsys.h 
  957. Xjrdjfif.o : jrdjfif.c jinclude.h jconfig.h jpegdata.h 
  958. Xjrdgif.o : jrdgif.c jinclude.h jconfig.h jpegdata.h 
  959. Xjrdppm.o : jrdppm.c jinclude.h jconfig.h jpegdata.h 
  960. Xjrdrle.o : jrdrle.c jinclude.h jconfig.h jpegdata.h 
  961. Xjrdtarga.o : jrdtarga.c jinclude.h jconfig.h jpegdata.h 
  962. Xjwrjfif.o : jwrjfif.c jinclude.h jconfig.h jpegdata.h 
  963. Xjwrgif.o : jwrgif.c jinclude.h jconfig.h jpegdata.h 
  964. Xjwrppm.o : jwrppm.c jinclude.h jconfig.h jpegdata.h 
  965. Xjwrrle.o : jwrrle.c jinclude.h jconfig.h jpegdata.h 
  966. Xjwrtarga.o : jwrtarga.c jinclude.h jconfig.h jpegdata.h 
  967. Xjmemsys.o : jmemsys.c jinclude.h jconfig.h jpegdata.h jmemsys.h 
  968. END_OF_FILE
  969.   if test 5948 -ne `wc -c <'makefile.manx'`; then
  970.     echo shar: \"'makefile.manx'\" unpacked with wrong size!
  971.   fi
  972.   # end of 'makefile.manx'
  973. fi
  974. if test -f 'makefile.mc5' -a "${1}" != "-c" ; then 
  975.   echo shar: Will not clobber existing file \"'makefile.mc5'\"
  976. else
  977.   echo shar: Extracting \"'makefile.mc5'\" \(6015 characters\)
  978.   sed "s/^X//" >'makefile.mc5' <<'END_OF_FILE'
  979. X# Makefile for Independent JPEG Group's software
  980. X
  981. X# This makefile is for Microsoft C for MS-DOS, version 5.x.
  982. X
  983. X# Read SETUP instructions before saying "make" !!
  984. X
  985. X# Microsoft's brain-damaged version of make uses nonstandard syntax (a blank
  986. X# line is needed to terminate a command list) and it simply scans the rules
  987. X# in order, rather than doing a true dependency-tree walk.  Furthermore,
  988. X# expanded command lines can't exceed 128 chars (this is a DOS bug, not
  989. X# make's fault); so we can't just name all the objectfiles in the link steps.
  990. X# Instead we shove each objectfile into a library as it is made, and link
  991. X# from the library.  The objectfiles are also kept separately as timestamps.
  992. X
  993. X# You may need to adjust these cc options:
  994. XCFLAGS=  /AS /I. /W3 /Oail /Gs   # NB: /Gs turns off stack oflo checks
  995. XLDFLAGS= /Fm /F 2000             # /F hhhh  sets stack size (in hex)
  996. X# In particular:
  997. X#   Add /DMSDOS if your compiler doesn't automatically #define MSDOS.
  998. X#   Add /DMEM_STATS to enable gathering of memory usage statistics.
  999. X# You might also want to add /G2 if you have an 80286, etc.
  1000. X
  1001. X
  1002. X# source files (independently compilable files)
  1003. XSOURCES= jbsmooth.c jcarith.c jccolor.c jcdeflts.c jcexpand.c jchuff.c \
  1004. X        jcmain.c jcmaster.c jcmcu.c jcpipe.c jcsample.c jdarith.c jdcolor.c \
  1005. X        jddeflts.c jdhuff.c jdmain.c jdmaster.c jdmcu.c jdpipe.c jdsample.c \
  1006. X        jerror.c jquant1.c jquant2.c jfwddct.c jrevdct.c jutils.c jmemmgr.c \
  1007. X        jrdjfif.c jrdgif.c jrdppm.c jrdrle.c jrdtarga.c jwrjfif.c jwrgif.c \
  1008. X        jwrppm.c jwrrle.c jwrtarga.c
  1009. X# virtual source files (not present in distribution file)
  1010. XVIRTSOURCES= jmemsys.c
  1011. X# system-dependent implementations of source files
  1012. XSYSDEPFILES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemdos.h \
  1013. X        jmemdosa.asm
  1014. X# files included by source files
  1015. XINCLUDES= jinclude.h jconfig.h jpegdata.h jversion.h jmemsys.h egetopt.c
  1016. X# documentation, test, and support files
  1017. XDOCS= README SETUP USAGE CHANGELOG cjpeg.1 djpeg.1 architecture codingrules
  1018. XMAKEFILES= makefile.ansi makefile.unix makefile.manx makefile.sas \
  1019. X        makefile.mc5 makefile.mc6 makcjpeg.lnk makdjpeg.lnk makefile.bcc \
  1020. X        makcjpeg.lst makdjpeg.lst makefile.pwc makcjpeg.cf makdjpeg.cf \
  1021. X        makljpeg.cf makefile.mms makefile.vms makvms.opt
  1022. XOTHERFILES= ansi2knr.c ckconfig.c example.c
  1023. XTESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg
  1024. XDISTFILES= $(DOCS) $(MAKEFILES) $(SOURCES) $(SYSDEPFILES) $(INCLUDES) \
  1025. X        $(OTHERFILES) $(TESTFILES)
  1026. X# objectfiles common to cjpeg and djpeg
  1027. XCOMOBJECTS= jutils.obj jerror.obj jmemmgr.obj jmemsys.obj jmemdosa.obj
  1028. X# compression objectfiles
  1029. XCLIBOBJECTS= jcmaster.obj jcdeflts.obj jcarith.obj jccolor.obj jcexpand.obj \
  1030. X        jchuff.obj jcmcu.obj jcpipe.obj jcsample.obj jfwddct.obj \
  1031. X        jwrjfif.obj jrdgif.obj jrdppm.obj jrdrle.obj jrdtarga.obj
  1032. XCOBJECTS= jcmain.obj $(CLIBOBJECTS) $(COMOBJECTS)
  1033. X# decompression objectfiles
  1034. XDLIBOBJECTS= jdmaster.obj jddeflts.obj jbsmooth.obj jdarith.obj jdcolor.obj \
  1035. X        jdhuff.obj jdmcu.obj jdpipe.obj jdsample.obj jquant1.obj \
  1036. X        jquant2.obj jrevdct.obj jrdjfif.obj jwrgif.obj jwrppm.obj \
  1037. X        jwrrle.obj jwrtarga.obj
  1038. XDOBJECTS= jdmain.obj $(DLIBOBJECTS) $(COMOBJECTS)
  1039. X# These objectfiles are included in libjpeg.lib
  1040. XLIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
  1041. X
  1042. X
  1043. X# inference rule used for all compilations except jcmain.c, jdmain.c
  1044. X# notice that objectfile is also inserted into libjpeg.lib
  1045. X.c.obj:
  1046. X    cl $(CFLAGS) /c $*.c
  1047. X    lib libjpeg -+$*.obj;
  1048. X
  1049. X# inference rule for assembly code
  1050. X.asm.obj:
  1051. X    masm /mx $*;
  1052. X    lib libjpeg -+$*.obj;
  1053. X
  1054. X
  1055. Xjbsmooth.obj : jbsmooth.c jinclude.h jconfig.h jpegdata.h
  1056. X
  1057. Xjcarith.obj : jcarith.c jinclude.h jconfig.h jpegdata.h
  1058. X
  1059. Xjccolor.obj : jccolor.c jinclude.h jconfig.h jpegdata.h
  1060. X
  1061. Xjcdeflts.obj : jcdeflts.c jinclude.h jconfig.h jpegdata.h
  1062. X
  1063. Xjcexpand.obj : jcexpand.c jinclude.h jconfig.h jpegdata.h
  1064. X
  1065. Xjchuff.obj : jchuff.c jinclude.h jconfig.h jpegdata.h
  1066. X
  1067. Xjcmain.obj : jcmain.c jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c
  1068. X    cl $(CFLAGS) /c $*.c
  1069. X
  1070. Xjcmaster.obj : jcmaster.c jinclude.h jconfig.h jpegdata.h
  1071. X
  1072. Xjcmcu.obj : jcmcu.c jinclude.h jconfig.h jpegdata.h
  1073. X
  1074. Xjcpipe.obj : jcpipe.c jinclude.h jconfig.h jpegdata.h
  1075. X
  1076. Xjcsample.obj : jcsample.c jinclude.h jconfig.h jpegdata.h
  1077. X
  1078. Xjdarith.obj : jdarith.c jinclude.h jconfig.h jpegdata.h
  1079. X
  1080. Xjdcolor.obj : jdcolor.c jinclude.h jconfig.h jpegdata.h
  1081. X
  1082. Xjddeflts.obj : jddeflts.c jinclude.h jconfig.h jpegdata.h
  1083. X
  1084. Xjdhuff.obj : jdhuff.c jinclude.h jconfig.h jpegdata.h
  1085. X
  1086. Xjdmain.obj : jdmain.c jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c
  1087. X    cl $(CFLAGS) /c $*.c
  1088. X
  1089. Xjdmaster.obj : jdmaster.c jinclude.h jconfig.h jpegdata.h
  1090. X
  1091. Xjdmcu.obj : jdmcu.c jinclude.h jconfig.h jpegdata.h
  1092. X
  1093. Xjdpipe.obj : jdpipe.c jinclude.h jconfig.h jpegdata.h
  1094. X
  1095. Xjdsample.obj : jdsample.c jinclude.h jconfig.h jpegdata.h
  1096. X
  1097. Xjerror.obj : jerror.c jinclude.h jconfig.h jpegdata.h
  1098. X
  1099. Xjquant1.obj : jquant1.c jinclude.h jconfig.h jpegdata.h
  1100. X
  1101. Xjquant2.obj : jquant2.c jinclude.h jconfig.h jpegdata.h
  1102. X
  1103. Xjfwddct.obj : jfwddct.c jinclude.h jconfig.h jpegdata.h
  1104. X
  1105. Xjrevdct.obj : jrevdct.c jinclude.h jconfig.h jpegdata.h
  1106. X
  1107. Xjutils.obj : jutils.c jinclude.h jconfig.h jpegdata.h
  1108. X
  1109. Xjmemmgr.obj : jmemmgr.c jinclude.h jconfig.h jpegdata.h jmemsys.h
  1110. X
  1111. Xjrdjfif.obj : jrdjfif.c jinclude.h jconfig.h jpegdata.h
  1112. X
  1113. Xjrdgif.obj : jrdgif.c jinclude.h jconfig.h jpegdata.h
  1114. X
  1115. Xjrdppm.obj : jrdppm.c jinclude.h jconfig.h jpegdata.h
  1116. X
  1117. Xjrdrle.obj : jrdrle.c jinclude.h jconfig.h jpegdata.h
  1118. X
  1119. Xjrdtarga.obj : jrdtarga.c jinclude.h jconfig.h jpegdata.h
  1120. X
  1121. Xjwrjfif.obj : jwrjfif.c jinclude.h jconfig.h jpegdata.h
  1122. X
  1123. Xjwrgif.obj : jwrgif.c jinclude.h jconfig.h jpegdata.h
  1124. X
  1125. Xjwrppm.obj : jwrppm.c jinclude.h jconfig.h jpegdata.h
  1126. X
  1127. Xjwrrle.obj : jwrrle.c jinclude.h jconfig.h jpegdata.h
  1128. X
  1129. Xjwrtarga.obj : jwrtarga.c jinclude.h jconfig.h jpegdata.h
  1130. X
  1131. Xjmemsys.obj : jmemsys.c jinclude.h jconfig.h jpegdata.h jmemsys.h
  1132. X
  1133. Xjmemdosa.obj : jmemdosa.asm
  1134. X
  1135. X
  1136. Xcjpeg.exe: $(COBJECTS)
  1137. X    cl /Fecjpeg.exe jcmain.obj libjpeg.lib $(LDFLAGS)
  1138. X
  1139. Xdjpeg.exe: $(DOBJECTS)
  1140. X    cl /Fedjpeg.exe jdmain.obj libjpeg.lib $(LDFLAGS)
  1141. END_OF_FILE
  1142.   if test 6015 -ne `wc -c <'makefile.mc5'`; then
  1143.     echo shar: \"'makefile.mc5'\" unpacked with wrong size!
  1144.   fi
  1145.   # end of 'makefile.mc5'
  1146. fi
  1147. if test -f 'testimg.jpg.u' -a "${1}" != "-c" ; then 
  1148.   echo shar: Will not clobber existing file \"'testimg.jpg.u'\"
  1149. else
  1150.   echo shar: Extracting \"'testimg.jpg.u'\" \(6072 characters\)
  1151.   sed "s/^X//" >'testimg.jpg.u' <<'END_OF_FILE'
  1152. Xbegin 666 testimg.jpg
  1153. XM_]C_X  02D9)1@ ! 0   0 !  #_VP!#  @&!@<&!0@'!P<)"0@*#!0-# L+
  1154. XM#!D2$P\4'1H?'AT:'!P@)"XG("(L(QP<*#<I+# Q-#0T'R<Y/3@R/"XS-#+_
  1155. XMVP!# 0D)"0P+#!@-#1@R(1PA,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R
  1156. XM,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C+_P  1" !] 'T# 2(  A$! Q$!_\0 
  1157. XM'P   04! 0$! 0$           $" P0%!@<("0H+_\0 M1   @$# P($ P4%
  1158. XM! 0   %] 0(#  01!1(A,4$&$U%A!R)Q%#*!D:$((T*QP152T? D,V)R@@D*
  1159. XM%A<8&1HE)B<H*2HT-38W.#DZ0T1%1D=(24I35%565UA96F-D969G:&EJ<W1U
  1160. XM=G=X>7J#A(6&AXB)BI*3E)66EYB9FJ*CI*6FIZBIJK*SM+6VM[BYNL+#Q,7&
  1161. XMQ\C)RM+3U-76U]C9VN'BX^3EYN?HZ>KQ\O/T]?;W^/GZ_\0 'P$  P$! 0$!
  1162. XM 0$! 0        $" P0%!@<("0H+_\0 M1$  @$"! 0#! <%! 0  0)W  $"
  1163. XM Q$$!2$Q!A)!40=A<1,B,H$(%$*1H;'!"2,S4O 58G+1"A8D-.$E\1<8&1HF
  1164. XM)R@I*C4V-S@Y.D-$149'2$E*4U155E=865IC9&5F9VAI:G-T=79W>'EZ@H.$
  1165. XMA8:'B(F*DI.4E9:7F)F:HJ.DI::GJ*FJLK.TM;:WN+FZPL/$Q<;'R,G*TM/4
  1166. XMU=;7V-G:XN/DY>;GZ.GJ\O/T]?;W^/GZ_]H # ,!  (1 Q$ /P"1I?N1QJ V
  1167. XM/E4= *E0) K%CESC+>IJ")1;Q%F8F1CR>] .[YWZYP!7%8^L+<;DG<^>?N@=
  1168. XM6J8W4<&WS&)F(.$49('T]*I-+Y &1F1CA5]#_D51N[Z.#]U+,!(_+E?O'V [
  1169. XM5I3I\S,IZ&Q_;5NJLN\H^.CC&3[5,;]HI52>+RE925F+9&?2O/KS48'N$1(Y
  1170. XM7E#@_,_!]  /PK7OM8NI8H())XXIWXQC)'^?\]JZEA4T<TIV9V:3Q;0RN)!D
  1171. XM_,#G\..E)+J,$$'F/*/+'.X<]L]J\VGNIHI8U%PVY^3*&P3P3CCM]/S-5-$T
  1172. XM[4->NC,9Y(K2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*T6=70L[;F,[@V<]?K1_:$
  1250. X5\?!!)K4=0>,56>)-W2L42VGN?__9
  1251. Xend
  1252. END_OF_FILE
  1253.   if test 6072 -ne `wc -c <'testimg.jpg.u'`; then
  1254.     echo shar: \"'testimg.jpg.u'\" unpacked with wrong size!
  1255.   else 
  1256.     echo shar: Uudecoding \"'testimg.jpg'\"
  1257.     cat testimg.jpg.u | uudecode 
  1258.     if [ -f testimg.jpg ]; then 
  1259.        rm testimg.jpg.u
  1260.     fi   
  1261.   fi
  1262.   # end of 'testimg.jpg.u'
  1263. fi
  1264. if test -f 'testorig.jpg.u' -a "${1}" != "-c" ; then 
  1265.   echo shar: Will not clobber existing file \"'testorig.jpg.u'\"
  1266. else
  1267.   echo shar: Extracting \"'testorig.jpg.u'\" \(6077 characters\)
  1268.   sed "s/^X//" >'testorig.jpg.u' <<'END_OF_FILE'
  1269. Xbegin 666 testorig.jpg
  1270. XM_]C_X  02D9)1@ ! 0   0 !  #_VP!#  @&!@<&!0@'!P<)"0@*#!0-# L+
  1271. XM#!D2$P\4'1H?'AT:'!P@)"XG("(L(QP<*#<I+# Q-#0T'R<Y/3@R/"XS-#+_
  1272. XMVP!# 0D)"0P+#!@-#1@R(1PA,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R
  1273. XM,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C+_P  1" !] 'T# 2(  A$! Q$!_\0 
  1274. XM'P   04! 0$! 0$           $" P0%!@<("0H+_\0 M1   @$# P($ P4%
  1275. XM! 0   %] 0(#  01!1(A,4$&$U%A!R)Q%#*!D:$((T*QP152T? D,V)R@@D*
  1276. XM%A<8&1HE)B<H*2HT-38W.#DZ0T1%1D=(24I35%565UA96F-D969G:&EJ<W1U
  1277. XM=G=X>7J#A(6&AXB)BI*3E)66EYB9FJ*CI*6FIZBIJK*SM+6VM[BYNL+#Q,7&
  1278. XMQ\C)RM+3U-76U]C9VN'BX^3EYN?HZ>KQ\O/T]?;W^/GZ_\0 'P$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4>@["FP(PD6/NS@'WID41#\]35BS42:A;\?\ +0$_
  1357. XMG7H25E9'#%W=R[*H,T1[>9_,_P"%;_@1/]#OD/:13^A%8LJ?.F!G&3^M;_@1
  1358. XM=LFI ^D1Y]\FN:;_ ';-);IG5J,9],T8IL;KY8&1D=:-U<:B1*6IYKXAT6+3
  1359. XMKIY+*0M:B3RV0_>B;T/J#V/L:SY0&N+50?X<\#_/I71P@WTEO)-MQ?3R6<R@
  1360. XM<$J1AQZ'G/U%<PAS?1 \[00/R->M*YC3>EB >F?>I(3@[1^'M3< ,I'KBI"H
  1361. XM$^!Q0RTR:W8_:E4_=;CFNIL=(LQ"'>(,QYYKFI(PDMJW=CC]:[&R&85/^R#7
  1362. XM)6;231V4%=V9<M[6V0#RX57'H36G#(D:#CFJ5N 5#'OVJ<?? [5RMLW<4:4&
  1363. XMVZ;:R#!ZD$U%J_@.PUD+*LTL$ZKA3G<OX@U:L@$*XK:CD-)5'%W1P5[[(\:U
  1364. XMOP;K&A9EDA\^V&<S0C( ]QU%8>FR*U\IW#*G-?1T1WC! (/!SWKS'XB^%K#2
  1365. XM!%K.GKY#RRA)(E'RDGN/2NRGB/:>[+<YXRY6DSEY6'FX]"P-;OA/]W9:A*IR
  1366. XM244?DW_UJY4S&2>3([M_.NK\(G=H\S'JUT0?H *516BSJZ%G;<QG<&SGK]:/
  1367. X6[0GCX()-:CH#QBJSQ)NZ5BB6T]S_V3'J
  1368. Xend
  1369. END_OF_FILE
  1370.   if test 6077 -ne `wc -c <'testorig.jpg.u'`; then
  1371.     echo shar: \"'testorig.jpg.u'\" unpacked with wrong size!
  1372.   else 
  1373.     echo shar: Uudecoding \"'testorig.jpg'\"
  1374.     cat testorig.jpg.u | uudecode 
  1375.     if [ -f testorig.jpg ]; then 
  1376.        rm testorig.jpg.u
  1377.     fi   
  1378.   fi
  1379.   # end of 'testorig.jpg.u'
  1380. fi
  1381. echo shar: End of archive 16 \(of 18\).
  1382. cp /dev/null ark16isdone
  1383. MISSING=""
  1384. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ; do
  1385.     if test ! -f ark${I}isdone ; then
  1386.     MISSING="${MISSING} ${I}"
  1387.     fi
  1388. done
  1389. if test "${MISSING}" = "" ; then
  1390.     echo You have unpacked all 18 archives.
  1391.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1392. else
  1393.     echo You still must unpack the following archives:
  1394.     echo "        " ${MISSING}
  1395. fi
  1396. exit 0
  1397. exit 0 # Just in case...
  1398. exit 0 # Just in case...
  1399.