diff options
Diffstat (limited to 'all_pairs/source/cjpeg_transupp')
| -rw-r--r-- | all_pairs/source/cjpeg_transupp/ChangeLog.txt | 36 | ||||
| -rw-r--r-- | all_pairs/source/cjpeg_transupp/README | 417 | ||||
| -rw-r--r-- | all_pairs/source/cjpeg_transupp/cjpeg_transupp.c | 718 | ||||
| -rw-r--r-- | all_pairs/source/cjpeg_transupp/jpeglib.h | 757 |
4 files changed, 1928 insertions, 0 deletions
diff --git a/all_pairs/source/cjpeg_transupp/ChangeLog.txt b/all_pairs/source/cjpeg_transupp/ChangeLog.txt new file mode 100644 index 0000000..df4383c --- /dev/null +++ b/all_pairs/source/cjpeg_transupp/ChangeLog.txt | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | File: cjpeg_transupp.c | ||
| 2 | Original provenience: MediaBench II benchmark suite, | ||
| 3 | http://euler.slu.edu/~fritts/mediabench (mirror) | ||
| 4 | |||
| 5 | 2015-11-03: | ||
| 6 | - Removed original header comment, replaced by TACLeBench header. | ||
| 7 | - Removed unnecessary preprocessor macros. | ||
| 8 | - Removed unnecessary code parts, simplified header files and include | ||
| 9 | relationships. | ||
| 10 | - Added prefix "cjpeg_transupp" to all global symbols. | ||
| 11 | - Added explicit forward declarations of functions. | ||
| 12 | - Replaced initialization code by TACLeBench-compliant initialization code. | ||
| 13 | - Added new function cjpeg_transupp_return producing a checksum as return value. | ||
| 14 | - Added new function cjpeg_transupp_main according to TACLeBench guidelines. | ||
| 15 | cjpeg_transupp_main is annotated as entry-point for timing analysis. | ||
| 16 | - Applied code formatting according to the following rules | ||
| 17 | - Lines shall not be wider than 80 characters; whenever possible, appropriate | ||
| 18 | line breaks shall be inserted to keep lines below 80 characters | ||
| 19 | - Indentation is done using whitespaces only, no tabs. Code is indented by | ||
| 20 | two whitespaces | ||
| 21 | - Two empty lines are put between any two functions | ||
| 22 | - In non-empty lists or index expressions, opening '(' and '[' are followed by | ||
| 23 | one whitespace, closing ')' and ']' are preceded by one whitespace | ||
| 24 | - In comma- or colon-separated argument lists, one whitespace is put after | ||
| 25 | each comma/colon | ||
| 26 | - Names of functions and global variables all start with a benchmark-specific | ||
| 27 | prefix (here: bs_) followed by lowercase letter (e.g., bs_square) | ||
| 28 | - For pointer types, one whitespace is put before the '*' | ||
| 29 | - Operators within expressions shall be preceded and followed by one | ||
| 30 | whitespace | ||
| 31 | - Code of then- and else-parts of if-then-else statements shall be put in | ||
| 32 | separate lines, not in the same lines as the if-condition or the keyword | ||
| 33 | "else" | ||
| 34 | - Opening braces '{' denoting the beginning of code for some if-else or loop | ||
| 35 | body shall be put at the end of the same line where the keywords "if", | ||
| 36 | "else", "for", "while" etc. occur | ||
diff --git a/all_pairs/source/cjpeg_transupp/README b/all_pairs/source/cjpeg_transupp/README new file mode 100644 index 0000000..8dba954 --- /dev/null +++ b/all_pairs/source/cjpeg_transupp/README | |||
| @@ -0,0 +1,417 @@ | |||
| 1 | The Independent JPEG Group's JPEG software | ||
| 2 | ========================================== | ||
| 3 | |||
| 4 | README for release 6a of 7-Feb-96 | ||
| 5 | ================================= | ||
| 6 | |||
| 7 | This distribution contains the sixth public release of the Independent JPEG | ||
| 8 | Group's free JPEG software. You are welcome to redistribute this software and | ||
| 9 | to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. | ||
| 10 | |||
| 11 | Serious users of this software (particularly those incorporating it into | ||
| 12 | larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to | ||
| 13 | our electronic mailing list. Mailing list members are notified of updates | ||
| 14 | and have a chance to participate in technical discussions, etc. | ||
| 15 | |||
| 16 | This software is the work of Tom Lane, Philip Gladstone, Luis Ortiz, Jim | ||
| 17 | Boucher, Lee Crocker, Julian Minguillon, George Phillips, Davide Rossi, | ||
| 18 | Ge' Weijers, and other members of the Independent JPEG Group. | ||
| 19 | |||
| 20 | IJG is not affiliated with the official ISO JPEG standards committee. | ||
| 21 | |||
| 22 | |||
| 23 | DOCUMENTATION ROADMAP | ||
| 24 | ===================== | ||
| 25 | |||
| 26 | This file contains the following sections: | ||
| 27 | |||
| 28 | OVERVIEW General description of JPEG and the IJG software. | ||
| 29 | LEGAL ISSUES Copyright, lack of warranty, terms of distribution. | ||
| 30 | REFERENCES Where to learn more about JPEG. | ||
| 31 | ARCHIVE LOCATIONS Where to find newer versions of this software. | ||
| 32 | RELATED SOFTWARE Other stuff you should get. | ||
| 33 | FILE FORMAT WARS Software *not* to get. | ||
| 34 | TO DO Plans for future IJG releases. | ||
| 35 | |||
| 36 | Other documentation files in the distribution are: | ||
| 37 | |||
| 38 | User documentation: | ||
| 39 | install.doc How to configure and install the IJG software. | ||
| 40 | usage.doc Usage instructions for cjpeg, djpeg, jpegtran, | ||
| 41 | rdjpgcom, and wrjpgcom. | ||
| 42 | *.1 Unix-style man pages for programs (same info as usage.doc). | ||
| 43 | wizard.doc Advanced usage instructions for JPEG wizards only. | ||
| 44 | change.log Version-to-version change highlights. | ||
| 45 | Programmer and internal documentation: | ||
| 46 | libjpeg.doc How to use the JPEG library in your own programs. | ||
| 47 | example.c Sample code for calling the JPEG library. | ||
| 48 | structure.doc Overview of the JPEG library's internal structure. | ||
| 49 | filelist.doc Road map of IJG files. | ||
| 50 | coderules.doc Coding style rules --- please read if you contribute code. | ||
| 51 | |||
| 52 | Please read at least the files install.doc and usage.doc. Useful information | ||
| 53 | can also be found in the JPEG FAQ (Frequently Asked Questions) article. See | ||
| 54 | ARCHIVE LOCATIONS below to find out where to obtain the FAQ article. | ||
| 55 | |||
| 56 | If you want to understand how the JPEG code works, we suggest reading one or | ||
| 57 | more of the REFERENCES, then looking at the documentation files (in roughly | ||
| 58 | the order listed) before diving into the code. | ||
| 59 | |||
| 60 | |||
| 61 | OVERVIEW | ||
| 62 | ======== | ||
| 63 | |||
| 64 | This package contains C software to implement JPEG image compression and | ||
| 65 | decompression. JPEG (pronounced "jay-peg") is a standardized compression | ||
| 66 | method for full-color and gray-scale images. JPEG is intended for compressing | ||
| 67 | "real-world" scenes; line drawings, cartoons and other non-realistic images | ||
| 68 | are not its strong suit. JPEG is lossy, meaning that the output image is not | ||
| 69 | exactly identical to the input image. Hence you must not use JPEG if you | ||
| 70 | have to have identical output bits. However, on typical photographic images, | ||
| 71 | very good compression levels can be obtained with no visible change, and | ||
| 72 | remarkably high compression levels are possible if you can tolerate a | ||
| 73 | low-quality image. For more details, see the references, or just experiment | ||
| 74 | with various compression settings. | ||
| 75 | |||
| 76 | This software implements JPEG baseline, extended-sequential, and progressive | ||
| 77 | compression processes. Provision is made for supporting all variants of these | ||
| 78 | processes, although some uncommon parameter settings aren't implemented yet. | ||
| 79 | For legal reasons, we are not distributing code for the arithmetic-coding | ||
| 80 | variants of JPEG; see LEGAL ISSUES. We have made no provision for supporting | ||
| 81 | the hierarchical or lossless processes defined in the standard. | ||
| 82 | |||
| 83 | We provide a set of library routines for reading and writing JPEG image files, | ||
| 84 | plus two sample applications "cjpeg" and "djpeg", which use the library to | ||
| 85 | perform conversion between JPEG and some other popular image file formats. | ||
| 86 | The library is intended to be reused in other applications. | ||
| 87 | |||
| 88 | In order to support file conversion and viewing software, we have included | ||
| 89 | considerable functionality beyond the bare JPEG coding/decoding capability; | ||
| 90 | for example, the color quantization modules are not strictly part of JPEG | ||
| 91 | decoding, but they are essential for output to colormapped file formats or | ||
| 92 | colormapped displays. These extra functions can be compiled out of the | ||
| 93 | library if not required for a particular application. We have also included | ||
| 94 | "jpegtran", a utility for lossless transcoding between different JPEG | ||
| 95 | processes, and "rdjpgcom" and "wrjpgcom", two simple applications for | ||
| 96 | inserting and extracting textual comments in JFIF files. | ||
| 97 | |||
| 98 | The emphasis in designing this software has been on achieving portability and | ||
| 99 | flexibility, while also making it fast enough to be useful. In particular, | ||
| 100 | the software is not intended to be read as a tutorial on JPEG. (See the | ||
| 101 | REFERENCES section for introductory material.) Rather, it is intended to | ||
| 102 | be reliable, portable, industrial-strength code. We do not claim to have | ||
| 103 | achieved that goal in every aspect of the software, but we strive for it. | ||
| 104 | |||
| 105 | We welcome the use of this software as a component of commercial products. | ||
| 106 | No royalty is required, but we do ask for an acknowledgement in product | ||
| 107 | documentation, as described under LEGAL ISSUES. | ||
| 108 | |||
| 109 | Lossless image transformation routines. These routines work on DCT coefficient | ||
| 110 | arrays and thus do not require any lossy decompression or recompression of the | ||
| 111 | image. Thanks to Guido Vollbeding for the initial design and code of this | ||
| 112 | feature. | ||
| 113 | |||
| 114 | Horizontal flipping is done in-place, using a single top-to-bottom pass through | ||
| 115 | the virtual source array. It will thus be much the fastest option for images | ||
| 116 | larger than main memory. | ||
| 117 | |||
| 118 | The other routines require a set of destination virtual arrays, so they need | ||
| 119 | twice as much memory as jpegtran normally does. The destination arrays are | ||
| 120 | always written in normal scan order (top to bottom) because the virtual array | ||
| 121 | manager expects this. The source arrays will be scanned in the corresponding | ||
| 122 | order, which means multiple passes through the source arrays for most of the | ||
| 123 | transforms. That could result in much thrashing if the image is larger than main | ||
| 124 | memory. | ||
| 125 | |||
| 126 | Some notes about the operating environment of the individual transform routines: | ||
| 127 | 1. Both the source and destination virtual arrays are allocated from the source | ||
| 128 | JPEG object, and therefore should be manipulated by calling the source's | ||
| 129 | memory manager. | ||
| 130 | 2. The destination's component count should be used. It may be smaller than the | ||
| 131 | source's when forcing to grayscale. | ||
| 132 | 3. Likewise the destination's sampling factors should be used. When forcing to | ||
| 133 | grayscale the destination's sampling factors will be all 1, and we may as | ||
| 134 | well take that as the effective iMCU size. | ||
| 135 | 4. When "trim" is in effect, the destination's dimensions will be the trimmed | ||
| 136 | values but the source's will be untrimmed. | ||
| 137 | 5. All the routines assume that the source and destination buffers are padded | ||
| 138 | out to a full iMCU boundary. This is true, although for the source buffer it | ||
| 139 | is an undocumented property of jdcoefct.c. | ||
| 140 | Notes 2,3,4 boil down to this: generally we should use the destination's | ||
| 141 | dimensions and ignore the source's. | ||
| 142 | |||
| 143 | |||
| 144 | LEGAL ISSUES | ||
