summaryrefslogtreecommitdiffstats
path: root/all_pairs/source/cjpeg_transupp
diff options
context:
space:
mode:
Diffstat (limited to 'all_pairs/source/cjpeg_transupp')
-rw-r--r--all_pairs/source/cjpeg_transupp/ChangeLog.txt36
-rw-r--r--all_pairs/source/cjpeg_transupp/README417
-rw-r--r--all_pairs/source/cjpeg_transupp/cjpeg_transupp.c718
-rw-r--r--all_pairs/source/cjpeg_transupp/jpeglib.h757
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 @@
1File: cjpeg_transupp.c
2Original provenience: MediaBench II benchmark suite,
3 http://euler.slu.edu/~fritts/mediabench (mirror)
4
52015-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 @@
1The Independent JPEG Group's JPEG software
2==========================================
3
4README for release 6a of 7-Feb-96
5=================================
6
7This distribution contains the sixth public release of the Independent JPEG
8Group's free JPEG software. You are welcome to redistribute this software and
9to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
10
11Serious users of this software (particularly those incorporating it into
12larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to
13our electronic mailing list. Mailing list members are notified of updates
14and have a chance to participate in technical discussions, etc.
15
16This software is the work of Tom Lane, Philip Gladstone, Luis Ortiz, Jim
17Boucher, Lee Crocker, Julian Minguillon, George Phillips, Davide Rossi,
18Ge' Weijers, and other members of the Independent JPEG Group.
19
20IJG is not affiliated with the official ISO JPEG standards committee.
21
22
23DOCUMENTATION ROADMAP
24=====================
25
26This file contains the following sections:
27
28OVERVIEW General description of JPEG and the IJG software.
29LEGAL ISSUES Copyright, lack of warranty, terms of distribution.
30REFERENCES Where to learn more about JPEG.
31ARCHIVE LOCATIONS Where to find newer versions of this software.
32RELATED SOFTWARE Other stuff you should get.
33FILE FORMAT WARS Software *not* to get.
34TO DO Plans for future IJG releases.
35
36Other documentation files in the distribution are:
37
38User 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.
45Programmer 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
52Please read at least the files install.doc and usage.doc. Useful information
53can also be found in the JPEG FAQ (Frequently Asked Questions) article. See
54ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
55
56If you want to understand how the JPEG code works, we suggest reading one or
57more of the REFERENCES, then looking at the documentation files (in roughly
58the order listed) before diving into the code.
59
60
61OVERVIEW
62========
63
64This package contains C software to implement JPEG image compression and
65decompression. JPEG (pronounced "jay-peg") is a standardized compression
66method for full-color and gray-scale images. JPEG is intended for compressing
67"real-world" scenes; line drawings, cartoons and other non-realistic images
68are not its strong suit. JPEG is lossy, meaning that the output image is not
69exactly identical to the input image. Hence you must not use JPEG if you
70have to have identical output bits. However, on typical photographic images,
71very good compression levels can be obtained with no visible change, and
72remarkably high compression levels are possible if you can tolerate a
73low-quality image. For more details, see the references, or just experiment
74with various compression settings.
75
76This software implements JPEG baseline, extended-sequential, and progressive
77compression processes. Provision is made for supporting all variants of these
78processes, although some uncommon parameter settings aren't implemented yet.
79For legal reasons, we are not distributing code for the arithmetic-coding
80variants of JPEG; see LEGAL ISSUES. We have made no provision for supporting
81the hierarchical or lossless processes defined in the standard.
82
83We provide a set of library routines for reading and writing JPEG image files,
84plus two sample applications "cjpeg" and "djpeg", which use the library to
85perform conversion between JPEG and some other popular image file formats.
86The library is intended to be reused in other applications.
87
88In order to support file conversion and viewing software, we have included
89considerable functionality beyond the bare JPEG coding/decoding capability;
90for example, the color quantization modules are not strictly part of JPEG
91decoding, but they are essential for output to colormapped file formats or
92colormapped displays. These extra functions can be compiled out of the
93library if not required for a particular application. We have also included
94"jpegtran", a utility for lossless transcoding between different JPEG
95processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
96inserting and extracting textual comments in JFIF files.
97
98The emphasis in designing this software has been on achieving portability and
99flexibility, while also making it fast enough to be useful. In particular,
100the software is not intended to be read as a tutorial on JPEG. (See the
101REFERENCES section for introductory material.) Rather, it is intended to
102be reliable, portable, industrial-strength code. We do not claim to have
103achieved that goal in every aspect of the software, but we strive for it.
104
105We welcome the use of this software as a component of commercial products.
106No royalty is required, but we do ask for an acknowledgement in product
107documentation, as described under LEGAL ISSUES.
108
109Lossless image transformation routines. These routines work on DCT coefficient
110arrays and thus do not require any lossy decompression or recompression of the
111image. Thanks to Guido Vollbeding for the initial design and code of this
112feature.
113
114Horizontal flipping is done in-place, using a single top-to-bottom pass through
115the virtual source array. It will thus be much the fastest option for images
116larger than main memory.
117
118The other routines require a set of destination virtual arrays, so they need
119twice as much memory as jpegtran normally does. The destination arrays are
120always written in normal scan order (top to bottom) because the virtual array
121manager expects this. The source arrays will be scanned in the corresponding
122order, which means multiple passes through the source arrays for most of the
123transforms. That could result in much thrashing if the image is larger than main
124memory.
125
126Some notes about the operating environment of the individual transform routines:
1271. 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.
1302. The destination's component count should be used. It may be smaller than the
131 source's when forcing to grayscale.
1323. 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.
1354. When "trim" is in effect, the destination's dimensions will be the trimmed
136 values but the source's will be untrimmed.
1375. 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.
140Notes 2,3,4 boil down to this: generally we should use the destination's
141dimensions and ignore the source's.
142
143
144LEGAL ISSUES