diff options
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/jpeglib_h-source.html | 1170 |
1 files changed, 1170 insertions, 0 deletions
diff --git a/docs/doxygen/nel/jpeglib_h-source.html b/docs/doxygen/nel/jpeglib_h-source.html new file mode 100644 index 00000000..9cf8f30f --- /dev/null +++ b/docs/doxygen/nel/jpeglib_h-source.html @@ -0,0 +1,1170 @@ +<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> +<HTML> +<HEAD> + <TITLE>nevrax.org : docs</TITLE> + <LINK REL=stylesheet TYPE="text/css" HREF="http://www.nevrax.org/inc/css/nevrax.css"> + <link href="doxygen.css" rel="stylesheet" type="text/css"> +</HEAD> +<BODY MARGINHEIGHT="0" MARGINWIDTH="0"> + +<!-- uplinks --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A> </TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A> </TD> + </TR> +</TABLE> + +<!-- banner Nevrax --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%> + <TR><TD BGCOLOR="#000000" BACKGROUND="http://www.nevrax.org/inc/img/black_banner.jpg"><A HREF="http://www.nevrax.org"><IMG SRC="http://www.nevrax.org/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR> +</TABLE> + +<!-- main table --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + + <!------ Begin Box ------> + <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black> + <FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF> + <TABLE cellspacing=0 cellpadding=1 border=0> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="News">News</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Documentation">Documentation</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="CVS Web">CVS</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Bugtracking">Bugs</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="License">License</a></td></tr> + </TABLE> + </TD></TR></TABLE></TD></TR></TABLE> + <!------ End Box ------> + + </TD> + <TD WIDTH=15><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD ALIGN=left valign=top><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + +<!-- title --> +<TABLE background="http://www.nevrax.org/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td> +<A HREF="http://www.nevrax.org/docs/"><img src="http://www.nevrax.org/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A> +</td><td><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT=""> +</td></tr></table> + + +<!-- block --> +<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="http://www.nevrax.org/inc/img/reddots.gif"></TD> + <TD><B>Documentation</B></TD> + <TD ALIGN=RIGHT> </td> +</tr></table> +<!-- Generated by Doxygen 1.2.2 on Tue May 29 22:01:11 2001 --> +<center> +<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindexRef" doxygen="_cgi:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> </center> +<hr><h1>jpeglib.h</h1><a href="jpeglib_h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/* +</font>00002 <font class="comment"> * jpeglib.h +</font>00003 <font class="comment"> * +</font>00004 <font class="comment"> * Copyright (C) 1991-1998, Thomas G. Lane. +</font>00005 <font class="comment"> * This file is part of the Independent JPEG Group's software. +</font>00006 <font class="comment"> * For conditions of distribution and use, see the accompanying README file. +</font>00007 <font class="comment"> * +</font>00008 <font class="comment"> * This file defines the application interface for the JPEG library. +</font>00009 <font class="comment"> * Most applications using the library need only include this file, +</font>00010 <font class="comment"> * and perhaps jerror.h if they want to know the exact error codes. +</font>00011 <font class="comment"> */</font> +00012 +00013 <font class="preprocessor">#ifndef JPEGLIB_H +</font>00014 <font class="preprocessor"></font><font class="preprocessor">#define JPEGLIB_H +</font>00015 <font class="preprocessor"></font> +00016 <font class="comment">/* +</font>00017 <font class="comment"> * First we include the configuration files that record how this +</font>00018 <font class="comment"> * installation of the JPEG library is set up. jconfig.h can be +</font>00019 <font class="comment"> * generated automatically for many systems. jmorecfg.h contains +</font>00020 <font class="comment"> * manual configuration options that most people need not worry about. +</font>00021 <font class="comment"> */</font> +00022 +00023 <font class="preprocessor">#ifndef JCONFIG_INCLUDED </font><font class="comment">/* in case jinclude.h already did */</font> +00024 <font class="preprocessor">#include "<a class="code" href="jconfig_h.html">jconfig.h</a>"</font> <font class="comment">/* widely used configuration options */</font> +00025 <font class="preprocessor">#endif +</font>00026 <font class="preprocessor"></font><font class="preprocessor">#include "<a class="code" href="jmorecfg_h.html">jmorecfg.h</a>"</font> <font class="comment">/* seldom changed options */</font> +00027 +00028 +00029 <font class="comment">/* Version ID for the JPEG library. +</font>00030 <font class="comment"> * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". +</font>00031 <font class="comment"> */</font> +00032 +<a name="l00033"></a><a class="code" href="jpeglib_h.html#a0">00033</a> <font class="preprocessor">#define JPEG_LIB_VERSION 62 </font><font class="comment">/* Version 6b */</font> +00034 +00035 +00036 <font class="comment">/* Various constants determining the sizes of things. +</font>00037 <font class="comment"> * All of these are specified by the JPEG standard, so don't change them +</font>00038 <font class="comment"> * if you want to be compatible. +</font>00039 <font class="comment"> */</font> +00040 +<a name="l00041"></a><a class="code" href="jpeglib_h.html#a1">00041</a> <font class="preprocessor">#define DCTSIZE 8 </font><font class="comment">/* The basic DCT block is 8x8 samples */</font> +<a name="l00042"></a><a class="code" href="jpeglib_h.html#a2">00042</a> <font class="preprocessor">#define DCTSIZE2 64 </font><font class="comment">/* DCTSIZE squared; # of elements in a block */</font> +<a name="l00043"></a><a class="code" href="jpeglib_h.html#a3">00043</a> <font class="preprocessor">#define NUM_QUANT_TBLS 4 </font><font class="comment">/* Quantization tables are numbered 0..3 */</font> +<a name="l00044"></a><a class="code" href="jpeglib_h.html#a4">00044</a> <font class="preprocessor">#define NUM_HUFF_TBLS 4 </font><font class="comment">/* Huffman tables are numbered 0..3 */</font> +<a name="l00045"></a><a class="code" href="jpeglib_h.html#a5">00045</a> <font class="preprocessor">#define NUM_ARITH_TBLS 16 </font><font class="comment">/* Arith-coding tables are numbered 0..15 */</font> +<a name="l00046"></a><a class="code" href="jpeglib_h.html#a6">00046</a> <font class="preprocessor">#define MAX_COMPS_IN_SCAN 4 </font><font class="comment">/* JPEG limit on # of components in one scan */</font> +<a name="l00047"></a><a class="code" href="jpeglib_h.html#a7">00047</a> <font class="preprocessor">#define MAX_SAMP_FACTOR 4 </font><font class="comment">/* JPEG limit on sampling factors */</font> +00048 <font class="comment">/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; +</font>00049 <font class="comment"> * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. +</font>00050 <font class="comment"> * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU +</font>00051 <font class="comment"> * to handle it. We even let you do this from the jconfig.h file. However, +</font>00052 <font class="comment"> * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe +</font>00053 <font class="comment"> * sometimes emits noncompliant files doesn't mean you should too. +</font>00054 <font class="comment"> */</font> +<a name="l00055"></a><a class="code" href="jpeglib_h.html#a8">00055</a> <font class="preprocessor">#define C_MAX_BLOCKS_IN_MCU 10 </font><font class="comment">/* compressor's limit on blocks per MCU */</font> +00056 <font class="preprocessor">#ifndef D_MAX_BLOCKS_IN_MCU +</font><a name="l00057"></a><a class="code" href="jpeglib_h.html#a9">00057</a> <font class="preprocessor"></font><font class="preprocessor">#define D_MAX_BLOCKS_IN_MCU 10 </font><font class="comment">/* decompressor's limit on blocks per MCU */</font> +00058 <font class="preprocessor">#endif +</font>00059 <font class="preprocessor"></font> +00060 +00061 <font class="comment">/* Data structures for images (arrays of samples and of DCT coefficients). +</font>00062 <font class="comment"> * On 80x86 machines, the image arrays are too big for near pointers, +</font>00063 <font class="comment"> * but the pointer arrays can fit in near memory. +</font>00064 <font class="comment"> */</font> +00065 +<a name="l00066"></a><a class="code" href="jpeglib_h.html#a32">00066</a> <font class="keyword">typedef</font> JSAMPLE <a class="code" href="class_jpeg_marker_struct.html">FAR</a> *JSAMPROW; <font class="comment">/* ptr to one image row of pixel samples. */</font> +<a name="l00067"></a><a class="code" href="jpeglib_h.html#a33">00067</a> <font class="keyword">typedef</font> JSAMPROW *JSAMPARRAY; <font class="comment">/* ptr to some rows (a 2-D sample array) */</font> +<a name="l00068"></a><a class="code" href="jpeglib_h.html#a34">00068</a> <font class="keyword">typedef</font> JSAMPARRAY *JSAMPIMAGE; <font class="comment">/* a 3-D sample array: top index is color */</font> +00069 +<a name="l00070"></a><a class="code" href="jpeglib_h.html#a35">00070</a> <font class="keyword">typedef</font> JCOEF JBLOCK[DCTSIZE2]; <font class="comment">/* one block of coefficients */</font> +<a name="l00071"></a><a class="code" href="jpeglib_h.html#a36">00071</a> <font class="keyword">typedef</font> JBLOCK <a class="code" href="class_jpeg_marker_struct.html">FAR</a> *JBLOCKROW; <font class="comment">/* pointer to one row of coefficient blocks */</font> +<a name="l00072"></a><a class="code" href="jpeglib_h.html#a37">00072</a> <font class="keyword">typedef</font> JBLOCKROW *JBLOCKARRAY; <font class="comment">/* a 2-D array of coefficient blocks */</font> +<a name="l00073"></a><a class="code" href="jpeglib_h.html#a38">00073</a> <font class="keyword">typedef</font> JBLOCKARRAY *JBLOCKIMAGE; <font class="comment">/* a 3-D array of coefficient blocks */</font> +00074 +<a name="l00075"></a><a class="code" href="jpeglib_h.html#a39">00075</a> <font class="keyword">typedef</font> JCOEF <a class="code" href="class_jpeg_marker_struct.html">FAR</a> *JCOEFPTR; <font class="comment">/* useful in a couple of places */</font> +00076 +00077 +00078 <font class="comment">/* Types for JPEG compression parameters and working tables. */</font> +00079 +00080 +00081 <font class="comment">/* DCT coefficient quantization tables. */</font> +00082 +<a name="l00083"></a><a class="code" href="class_JQUANT_TBL.html">00083</a> <font class="keyword">typedef</font> <font class="keyword">struct </font>{ +00084 <font class="comment">/* This array gives the coefficient quantizers in natural array order +</font>00085 <font class="comment"> * (not the zigzag order in which they are stored in a JPEG DQT marker). +</font>00086 <font class="comment"> * CAUTION: IJG versions prior to v6a kept this array in zigzag order. +</font>00087 <font class="comment"> */</font> +<a name="l00088"></a><a class="code" href="class_JQUANT_TBL.html#m0">00088</a> UINT16 quantval[DCTSIZE2]; <font class="comment">/* quantization step for each coefficient */</font> +00089 <font class="comment">/* This field is used only during compression. It's initialized FALSE when +</font>00090 <font class="comment"> * the table is created, and set TRUE when it's been output to the file. +</font>00091 <font class="comment"> * You could suppress output of a table by setting this to TRUE. +</font>00092 <font class="comment"> * (See jpeg_suppress_tables for an example.) +</font>00093 <font class="comment"> */</font> +<a name="l00094"></a><a class="code" href="class_JQUANT_TBL.html#m1">00094</a> boolean sent_table; <font class="comment">/* TRUE when table has been output */</font> +00095 } <a class="code" href="class_JQUANT_TBL.html">JQUANT_TBL</a>; +00096 +00097 +00098 <font class="comment">/* Huffman coding tables. */</font> +00099 +<a name="l00100"></a><a class="code" href="class_JHUFF_TBL.html">00100</a> <font class="keyword">typedef</font> <font class="keyword">struct </font>{ +00101 <font class="comment">/* These two fields directly represent the contents of a JPEG DHT marker */</font> +<a name="l00102"></a><a class="code" href="class_JHUFF_TBL.html#m0">00102</a> UINT8 bits[17]; <font class="comment">/* bits[k] = # of symbols with codes of */</font> +00103 <font class="comment">/* length k bits; bits[0] is unused */</font> +<a name="l00104"></a><a class="code" href="class_JHUFF_TBL.html#m1">00104</a> UINT8 huffval[256]; <font class="comment">/* The symbols, in order of incr code length */</font> +00105 <font class="comment">/* This field is used only during compression. It's initialized FALSE when +</font>00106 <font class="comment"> * the table is created, and set TRUE when it's been output to the file. +</font>00107 <font class="comment"> * You could suppress output of a table by setting this to TRUE. +</font>00108 <font class="comment"> * (See jpeg_suppress_tables for an example.) +</font>00109 <font class="comment"> */</font> +<a name="l00110"></a><a class="code" href="class_JHUFF_TBL.html#m2">00110</a> boolean sent_table; <font class="comment">/* TRUE when table has been output */</font> +00111 } <a class="code" href="class_JHUFF_TBL.html">JHUFF_TBL</a>; +00112 +00113 +00114 <font class="comment">/* Basic info about one component (color channel). */</font> +00115 +<a name="l00116"></a><a class="code" href="class_jpeg_component_info.html">00116</a> <font class="keyword">typedef</font> <font class="keyword">struct </font>{ +00117 <font class="comment">/* These values are fixed over the whole image. */</font> +00118 <font class="comment">/* For compression, they must be supplied by parameter setup; */</font> +00119 <font class="comment">/* for decompression, they are read from the SOF marker. */</font> +<a name="l00120"></a><a class="code" href="class_jpeg_component_info.html#m0">00120</a> <font class="keywordtype">int</font> component_id; <font class="comment">/* identifier for this component (0..255) */</font> +<a name="l00121"></a><a class="code" href="class_jpeg_component_info.html#m1">00121</a> <font class="keywordtype">int</font> component_index; <font class="comment">/* its index in SOF or cinfo->comp_info[] */</font> +<a name="l00122"></a><a class="code" href="class_jpeg_component_info.html#m2">00122</a> <font class="keywordtype">int</font> h_samp_factor; <font class="comment">/* horizontal sampling factor (1..4) */</font> +<a name="l00123"></a><a class="code" href="class_jpeg_component_info.html#m3">00123</a> <font class="keywordtype">int</font> v_samp_factor; <font class="comment">/* vertical sampling factor (1..4) */</font> +<a name="l00124"></a><a class="code" href="class_jpeg_component_info.html#m4">00124</a> <font class="keywordtype">int</font> quant_tbl_no; <font class="comment">/* quantization table selector (0..3) */</font> +00125 <font class="comment">/* These values may vary between scans. */</font> +00126 <font class="comment">/* For compression, they must be supplied by parameter setup; */</font> +00127 <font class="comment">/* for decompression, they are read from the SOS marker. */</font> +00128 <font class="comment">/* The decompressor output side may not use these variables. */</font> +<a name="l00129"></a><a class="code" href="class_jpeg_component_info.html#m5">00129</a> <font class="keywordtype">int</font> dc_tbl_no; <font class="comment">/* DC entropy table selector (0..3) */</font> +<a name="l00130"></a><a class="code" href="class_jpeg_component_info.html#m6">00130</a> <font class="keywordtype">int</font> ac_tbl_no; <font class="comment">/* AC entropy table selector (0..3) */</font> +00131 +00132 <font class="comment">/* Remaining fields should be treated as private by applications. */</font> +00133 +00134 <font class="comment">/* These values are computed during compression or decompression startup: */</font> +00135 <font class="comment">/* Component's size in DCT blocks. +</font>00136 <font class="comment"> * Any dummy blocks added to complete an MCU are not counted; therefore +</font>00137 <font class="comment"> * these values do not depend on whether a scan is interleaved or not. +</font>00138 <font class="comment"> */</font> +<a name="l00139"></a><a class="code" href="class_jpeg_component_info.html#m7">00139</a> JDIMENSION width_in_blocks; +<a name="l00140"></a><a class="code" href="class_jpeg_component_info.html#m8">00140</a> JDIMENSION height_in_blocks; +00141 <font class="comment">/* Size of a DCT block in samples. Always DCTSIZE for compression. +</font>00142 <font class="comment"> * For decompression this is the size of the output from one DCT block, +</font>00143 <font class="comment"> * reflecting any scaling we choose to apply during the IDCT step. +</font>00144 <font class="comment"> * Values of 1,2,4,8 are likely to be supported. Note that different +</font>00145 <font class="comment"> * components may receive different IDCT scalings. +</font>00146 <font class="comment"> */</font> +<a name="l00147"></a><a class="code" href="class_jpeg_component_info.html#m9">00147</a> <font class="keywordtype">int</font> DCT_scaled_size; +00148 <font class="comment">/* The downsampled dimensions are the component's actual, unpadded number +</font>00149 <font class="comment"> * of samples at the main buffer (preprocessing/compression interface), thus +</font>00150 <font class="comment"> * downsampled_width = ceil(image_width * Hi/Hmax) +</font>00151 <font class="comment"> * and similarly for height. For decompression, IDCT scaling is included, so +</font>00152 <font class="comment"> * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE) +</font>00153 <font class="comment"> */</font> +<a name="l00154"></a><a class="code" href="class_jpeg_component_info.html#m10">00154</a> JDIMENSION downsampled_width; <font class="comment">/* actual width in samples */</font> +<a name="l00155"></a><a class="code" href="class_jpeg_component_info.html#m11">00155</a> JDIMENSION downsampled_height; <font class="comment">/* actual height in samples */</font> +00156 <font class="comment">/* This flag is used only for decompression. In cases where some of the +</font>00157 <font class="comment"> * components will be ignored (eg grayscale output from YCbCr image), +</font>00158 <font class="comment"> * we can skip most computations for the unused components. +</font>00159 <font class="comment"> */</font> +<a name="l00160"></a><a class="code" href="class_jpeg_component_info.html#m12">00160</a> boolean component_needed; <font class="comment">/* do we need the value of this component? */</font> +00161 +00162 <font class="comment">/* These values are computed before starting a scan of the component. */</font> +00163 <font class="comment">/* The decompressor output side may not use these variables. */</font> +<a name="l00164"></a><a class="code" href="class_jpeg_component_info.html#m13">00164</a> <font class="keywordtype">int</font> MCU_width; <font class="comment">/* number of blocks per MCU, horizontally */</font> +<a name="l00165"></a><a class="code" href="class_jpeg_component_info.html#m14">00165</a> <font class="keywordtype">int</font> MCU_height; <font class="comment">/* number of blocks per MCU, vertically */</font> +<a name="l00166"></a><a class="code" href="class_jpeg_component_info.html#m15">00166</a> <font class="keywordtype">int</font> MCU_blocks; <font class="comment">/* MCU_width * MCU_height */</font> +<a name="l00167"></a><a class="code" href="class_jpeg_component_info.html#m16">00167</a> <font class="keywordtype">int</font> MCU_sample_width; <font class="comment">/* MCU width in samples, MCU_width*DCT_scaled_size */</font> +<a name="l00168"></a><a class="code" href="class_jpeg_component_info.html#m17">00168</a> <font class="keywordtype">int</font> last_col_width; <font class="comment">/* # of non-dummy blocks across in last MCU */</font> +<a name="l00169"></a><a class="code" href="class_jpeg_component_info.html#m18">00169</a> <font class="keywordtype">int</font> last_row_height; <font class="comment">/* # of non-dummy blocks down in last MCU */</font> +00170 +00171 <font class="comment">/* Saved quantization table for component; NULL if none yet saved. +</font>00172 <font class="comment"> * See jdinput.c comments about the need for this information. +</font>00173 <font class="comment"> * This field is currently used only for decompression. +</font>00174 <font class="comment"> */</font> +<a name="l00175"></a><a class="code" href="class_jpeg_component_info.html#m19">00175</a> <a class="code" href="class_JQUANT_TBL.html">JQUANT_TBL</a> * quant_table; +00176 +00177 <font class="comment">/* Private per-component storage for DCT or IDCT subsystem. */</font> +<a name="l00178"></a><a class="code" href="class_jpeg_component_info.html#m20">00178</a> <font class="keywordtype">void</font> * dct_table; +00179 } <a class="code" href="class_jpeg_component_info.html">jpeg_component_info</a>; +00180 +00181 +00182 <font class="comment">/* The script for encoding a multiple-scan file is an array of these: */</font> +00183 +<a name="l00184"></a><a class="code" href="class_jpeg_scan_info.html">00184</a> <font class="keyword">typedef</font> <font class="keyword">struct </font>{ +<a name="l00185"></a><a class="code" href="class_jpeg_scan_info.html#m0">00185</a> <font class="keywordtype">int</font> comps_in_scan; <font class="comment">/* number of components encoded in this scan */</font> +<a name="l00186"></a><a class="code" href="class_jpeg_scan_info.html#m1">00186</a> <font class="keywordtype">int</font> component_index[MAX_COMPS_IN_SCAN]; <font class="comment">/* their SOF/comp_info[] indexes */</font> +<a name="l00187"></a><a class="code" href="class_jpeg_scan_info.html#m2">00187</a> <font class="keywordtype">int</font> Ss, Se; <font class="comment">/* progressive JPEG spectral selection parms */</font> +<a name="l00188"></a><a class="code" href="class_jpeg_scan_info.html#m5">00188</a> <font class="keywordtype">int</font> Ah, Al; <font class="comment">/* progressive JPEG successive approx. parms */</font> +00189 } <a class="code" href="class_jpeg_scan_info.html">jpeg_scan_info</a>; +00190 +00191 <font class="comment">/* The decompressor can save APPn and COM markers in a list of these: */</font> +00192 +<a name="l00193"></a><a class="code" href="jpeglib_h.html#a40">00193</a> <font class="keyword">typedef</font> <font class="keyword">struct </font><a class="code" href="class_jpeg_marker_struct.html">jpeg_marker_struct</a> <a class="code" href="class_jpeg_marker_struct.html">FAR</a> * <a class="code" href="class_jpeg_marker_struct.html">jpeg_saved_marker_ptr</a>; +00194 +<a name="l00195"></a><a class="code" href="class_jpeg_marker_struct.html">00195</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_marker_struct.html">jpeg_marker_struct</a> { +<a name="l00196"></a><a class="code" href="class_jpeg_marker_struct.html#m0">00196</a> <a class="code" href="class_jpeg_marker_struct.html">jpeg_saved_marker_ptr</a> next; <font class="comment">/* next in list, or NULL */</font> +<a name="l00197"></a><a class="code" href="class_jpeg_marker_struct.html#m1">00197</a> UINT8 marker; <font class="comment">/* marker code: JPEG_COM, or JPEG_APP0+n */</font> +<a name="l00198"></a><a class="code" href="class_jpeg_marker_struct.html#m2">00198</a> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> original_length; <font class="comment">/* # bytes of data in the file */</font> +<a name="l00199"></a><a class="code" href="class_jpeg_marker_struct.html#m3">00199</a> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> data_length; <font class="comment">/* # bytes of data saved at data[] */</font> +<a name="l00200"></a><a class="code" href="class_jpeg_marker_struct.html#m4">00200</a> JOCTET <a class="code" href="class_jpeg_marker_struct.html">FAR</a> * data; <font class="comment">/* the data contained in the marker */</font> +00201 <font class="comment">/* the marker length word is not counted in data_length or original_length */</font> +00202 }; +00203 +00204 <font class="comment">/* Known color spaces. */</font> +00205 +<a name="l00206"></a><a class="code" href="jpeglib_h.html#a65">00206</a> <font class="keyword">typedef</font> <font class="keyword">enum</font> { +00207 JCS_UNKNOWN, <font class="comment">/* error/unspecified */</font> +00208 JCS_GRAYSCALE, <font class="comment">/* monochrome */</font> +00209 JCS_RGB, <font class="comment">/* red/green/blue */</font> +00210 JCS_YCbCr, <font class="comment">/* Y/Cb/Cr (also known as YUV) */</font> +00211 JCS_CMYK, <font class="comment">/* C/M/Y/K */</font> +00212 JCS_YCCK <font class="comment">/* Y/Cb/Cr/K */</font> +00213 } J_COLOR_SPACE; +00214 +00215 <font class="comment">/* DCT/IDCT algorithm options. */</font> +00216 +<a name="l00217"></a><a class="code" href="jpeglib_h.html#a66">00217</a> <font class="keyword">typedef</font> <font class="keyword">enum</font> { +00218 JDCT_ISLOW, <font class="comment">/* slow but accurate integer algorithm */</font> +00219 JDCT_IFAST, <font class="comment">/* faster, less accurate integer method */</font> +00220 JDCT_FLOAT <font class="comment">/* floating-point: accurate, fast on fast HW */</font> +00221 } J_DCT_METHOD; +00222 +00223 <font class="preprocessor">#ifndef JDCT_DEFAULT </font><font class="comment">/* may be overridden in jconfig.h */</font> +<a name="l00224"></a><a class="code" href="jpeglib_h.html#a10">00224</a> <font class="preprocessor">#define JDCT_DEFAULT JDCT_ISLOW +</font>00225 <font class="preprocessor"></font><font class="preprocessor">#endif +</font>00226 <font class="preprocessor"></font><font class="preprocessor">#ifndef JDCT_FASTEST </font><font class="comment">/* may be overridden in jconfig.h */</font> +<a name="l00227"></a><a class="code" href="jpeglib_h.html#a11">00227</a> <font class="preprocessor">#define JDCT_FASTEST JDCT_IFAST +</font>00228 <font class="preprocessor"></font><font class="preprocessor">#endif +</font>00229 <font class="preprocessor"></font> +00230 <font class="comment">/* Dithering options for decompression. */</font> +00231 +<a name="l00232"></a><a class="code" href="jpeglib_h.html#a67">00232</a> <font class="keyword">typedef</font> <font class="keyword">enum</font> { +00233 JDITHER_NONE, <font class="comment">/* no dithering */</font> +00234 JDITHER_ORDERED, <font class="comment">/* simple ordered dither */</font> +00235 JDITHER_FS <font class="comment">/* Floyd-Steinberg error diffusion dither */</font> +00236 } J_DITHER_MODE; +00237 +00238 +00239 <font class="comment">/* Common fields between JPEG compression and decompression master structs. */</font> +00240 +<a name="l00241"></a><a class="code" href="jpeglib_h.html#a12">00241</a> <font class="preprocessor">#define jpeg_common_fields \ +</font>00242 <font class="preprocessor"> struct jpeg_error_mgr * err; </font><font class="comment">/* Error handler module */</font>\ +00243 struct jpeg_memory_mgr * mem; <font class="comment">/* Memory manager module */</font>\ +00244 struct jpeg_progress_mgr * progress; <font class="comment">/* Progress monitor, or NULL if none */</font>\ +00245 void * client_data; <font class="comment">/* Available for use by application */</font>\ +00246 boolean is_decompressor; <font class="comment">/* So common code can tell which is which */</font>\ +00247 int global_state <font class="comment">/* For checking call sequence validity */</font> +00248 +00249 <font class="comment">/* Routines that are to be used by both halves of the library are declared +</font>00250 <font class="comment"> * to receive a pointer to this structure. There are no actual instances of +</font>00251 <font class="comment"> * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. +</font>00252 <font class="comment"> */</font> +<a name="l00253"></a><a class="code" href="class_jpeg_common_struct.html">00253</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_common_struct.html">jpeg_common_struct</a> { +<a name="l00254"></a><a class="code" href="class_jpeg_common_struct.html#m0">00254</a> jpeg_common_fields; <font class="comment">/* Fields common to both master struct types */</font> +00255 <font class="comment">/* Additional fields follow in an actual jpeg_compress_struct or +</font>00256 <font class="comment"> * jpeg_decompress_struct. All three structs must agree on these +</font>00257 <font class="comment"> * initial fields! (This would be a lot cleaner in C++.) +</font>00258 <font class="comment"> */</font> +00259 }; +00260 +<a name="l00261"></a><a class="code" href="jpeglib_h.html#a41">00261</a> <font class="keyword">typedef</font> <font class="keyword">struct </font><a class="code" href="class_jpeg_common_struct.html">jpeg_common_struct</a> * <a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a>; +<a name="l00262"></a><a class="code" href="jpeglib_h.html#a42">00262</a> <font class="keyword">typedef</font> <font class="keyword">struct </font><a class="code" href="class_jpeg_compress_struct.html">jpeg_compress_struct</a> * <a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a>; +<a name="l00263"></a><a class="code" href="jpeglib_h.html#a43">00263</a> <font class="keyword">typedef</font> <font class="keyword">struct </font><a class="code" href="class_jpeg_decompress_struct.html">jpeg_decompress_struct</a> * <a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a>; +00264 +00265 +00266 <font class="comment">/* Master record for a compression instance */</font> +00267 +<a name="l00268"></a><a class="code" href="class_jpeg_compress_struct.html">00268</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_compress_struct.html">jpeg_compress_struct</a> { +<a name="l00269"></a><a class="code" href="class_jpeg_compress_struct.html#m0">00269</a> jpeg_common_fields; <font class="comment">/* Fields shared with jpeg_decompress_struct */</font> +00270 +00271 <font class="comment">/* Destination for compressed data */</font> +<a name="l00272"></a><a class="code" href="class_jpeg_compress_struct.html#m1">00272</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_destination_mgr.html">jpeg_destination_mgr</a> * dest; +00273 +00274 <font class="comment">/* Description of source image --- these fields must be filled in by +</font>00275 <font class="comment"> * outer application before starting compression. in_color_space must +</font>00276 <font class="comment"> * be correct before you can even call jpeg_set_defaults(). +</font>00277 <font class="comment"> */</font> +00278 +<a name="l00279"></a><a class="code" href="class_jpeg_compress_struct.html#m2">00279</a> JDIMENSION image_width; <font class="comment">/* input image width */</font> +<a name="l00280"></a><a class="code" href="class_jpeg_compress_struct.html#m3">00280</a> JDIMENSION image_height; <font class="comment">/* input image height */</font> +<a name="l00281"></a><a class="code" href="class_jpeg_compress_struct.html#m4">00281</a> <font class="keywordtype">int</font> input_components; <font class="comment">/* # of color components in input image */</font> +<a name="l00282"></a><a class="code" href="class_jpeg_compress_struct.html#m5">00282</a> J_COLOR_SPACE in_color_space; <font class="comment">/* colorspace of input image */</font> +00283 +<a name="l00284"></a><a class="code" href="class_jpeg_compress_struct.html#m6">00284</a> <font class="keywordtype">double</font> input_gamma; <font class="comment">/* image gamma of input image */</font> +00285 +00286 <font class="comment">/* Compression parameters --- these fields must be set before calling +</font>00287 <font class="comment"> * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to +</font>00288 <font class="comment"> * initialize everything to reasonable defaults, then changing anything +</font>00289 <font class="comment"> * the application specifically wants to change. That way you won't get +</font>00290 <font class="comment"> * burnt when new parameters are added. Also note that there are several +</font>00291 <font class="comment"> * helper routines to simplify changing parameters. +</font>00292 <font class="comment"> */</font> +00293 +<a name="l00294"></a><a class="code" href="class_jpeg_compress_struct.html#m7">00294</a> <font class="keywordtype">int</font> data_precision; <font class="comment">/* bits of precision in image data */</font> +00295 +<a name="l00296"></a><a class="code" href="class_jpeg_compress_struct.html#m8">00296</a> <font class="keywordtype">int</font> num_components; <font class="comment">/* # of color components in JPEG image */</font> +<a name="l00297"></a><a class="code" href="class_jpeg_compress_struct.html#m9">00297</a> J_COLOR_SPACE jpeg_color_space; <font class="comment">/* colorspace of JPEG image */</font> +00298 +<a name="l00299"></a><a class="code" href="class_jpeg_compress_struct.html#m10">00299</a> <a class="code" href="class_jpeg_component_info.html">jpeg_component_info</a> * comp_info; +00300 <font class="comment">/* comp_info[i] describes component that appears i'th in SOF */</font> +00301 +<a name="l00302"></a><a class="code" href="class_jpeg_compress_struct.html#m11">00302</a> <a class="code" href="class_JQUANT_TBL.html">JQUANT_TBL</a> * quant_tbl_ptrs[NUM_QUANT_TBLS]; +00303 <font class="comment">/* ptrs to coefficient quantization tables, or NULL if not defined */</font> +00304 +<a name="l00305"></a><a class="code" href="class_jpeg_compress_struct.html#m12">00305</a> <a class="code" href="class_JHUFF_TBL.html">JHUFF_TBL</a> * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; +<a name="l00306"></a><a class="code" href="class_jpeg_compress_struct.html#m13">00306</a> <a class="code" href="class_JHUFF_TBL.html">JHUFF_TBL</a> * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; +00307 <font class="comment">/* ptrs to Huffman coding tables, or NULL if not defined */</font> +00308 +<a name="l00309"></a><a class="code" href="class_jpeg_compress_struct.html#m14">00309</a> UINT8 arith_dc_L[NUM_ARITH_TBLS]; <font class="comment">/* L values for DC arith-coding tables */</font> +<a name="l00310"></a><a class="code" href="class_jpeg_compress_struct.html#m15">00310</a> UINT8 arith_dc_U[NUM_ARITH_TBLS]; <font class="comment">/* U values for DC arith-coding tables */</font> +<a name="l00311"></a><a class="code" href="class_jpeg_compress_struct.html#m16">00311</a> UINT8 arith_ac_K[NUM_ARITH_TBLS]; <font class="comment">/* Kx values for AC arith-coding tables */</font> +00312 +<a name="l00313"></a><a class="code" href="class_jpeg_compress_struct.html#m17">00313</a> <font class="keywordtype">int</font> num_scans; <font class="comment">/* # of entries in scan_info array */</font> +<a name="l00314"></a><a class="code" href="class_jpeg_compress_struct.html#m18">00314</a> <font class="keyword">const</font> <a class="code" href="class_jpeg_scan_info.html">jpeg_scan_info</a> * scan_info; <font class="comment">/* script for multi-scan file, or NULL */</font> +00315 <font class="comment">/* The default value of scan_info is NULL, which causes a single-scan +</font>00316 <font class="comment"> * sequential JPEG file to be emitted. To create a multi-scan file, +</font>00317 <font class="comment"> * set num_scans and scan_info to point to an array of scan definitions. +</font>00318 <font class="comment"> */</font> +00319 +<a name="l00320"></a><a class="code" href="class_jpeg_compress_struct.html#m19">00320</a> boolean raw_data_in; <font class="comment">/* TRUE=caller supplies downsampled data */</font> +<a name="l00321"></a><a class="code" href="class_jpeg_compress_struct.html#m20">00321</a> boolean arith_code; <font class="comment">/* TRUE=arithmetic coding, FALSE=Huffman */</font> +<a name="l00322"></a><a class="code" href="class_jpeg_compress_struct.html#m21">00322</a> boolean optimize_coding; <font class="comment">/* TRUE=optimize entropy encoding parms */</font> +<a name="l00323"></a><a class="code" href="class_jpeg_compress_struct.html#m22">00323</a> boolean CCIR601_sampling; <font class="comment">/* TRUE=first samples are cosited */</font> +<a name="l00324"></a><a class="code" href="class_jpeg_compress_struct.html#m23">00324</a> <font class="keywordtype">int</font> smoothing_factor; <font class="comment">/* 1..100, or 0 for no input smoothing */</font> +<a name="l00325"></a><a class="code" href="class_jpeg_compress_struct.html#m24">00325</a> J_DCT_METHOD dct_method; <font class="comment">/* DCT algorithm selector */</font> +00326 +00327 <font class="comment">/* The restart interval can be specified in absolute MCUs by setting +</font>00328 <font class="comment"> * restart_interval, or in MCU rows by setting restart_in_rows +</font>00329 <font class="comment"> * (in which case the correct restart_interval will be figured +</font>00330 <font class="comment"> * for each scan). +</font>00331 <font class="comment"> */</font> +<a name="l00332"></a><a class="code" href="class_jpeg_compress_struct.html#m25">00332</a> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> restart_interval; <font class="comment">/* MCUs per restart, or 0 for no restart */</font> +<a name="l00333"></a><a class="code" href="class_jpeg_compress_struct.html#m26">00333</a> <font class="keywordtype">int</font> restart_in_rows; <font class="comment">/* if > 0, MCU rows per restart interval */</font> +00334 +00335 <font class="comment">/* Parameters controlling emission of special markers. */</font> +00336 +<a name="l00337"></a><a class="code" href="class_jpeg_compress_struct.html#m27">00337</a> boolean write_JFIF_header; <font class="comment">/* should a JFIF marker be written? */</font> +<a name="l00338"></a><a class="code" href="class_jpeg_compress_struct.html#m28">00338</a> UINT8 JFIF_major_version; <font class="comment">/* What to write for the JFIF version number */</font> +<a name="l00339"></a><a class="code" href="class_jpeg_compress_struct.html#m29">00339</a> UINT8 JFIF_minor_version; +00340 <font class="comment">/* These three values are not used by the JPEG code, merely copied */</font> +00341 <font class="comment">/* into the JFIF APP0 marker. density_unit can be 0 for unknown, */</font> +00342 <font class="comment">/* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */</font> +00343 <font class="comment">/* ratio is defined by X_density/Y_density even when density_unit=0. */</font> +<a name="l00344"></a><a class="code" href="class_jpeg_compress_struct.html#m30">00344</a> UINT8 density_unit; <font class="comment">/* JFIF code for pixel size units */</font> +<a name="l00345"></a><a class="code" href="class_jpeg_compress_struct.html#m31">00345</a> UINT16 X_density; <font class="comment">/* Horizontal pixel density */</font> +<a name="l00346"></a><a class="code" href="class_jpeg_compress_struct.html#m32">00346</a> UINT16 Y_density; <font class="comment">/* Vertical pixel density */</font> +<a name="l00347"></a><a class="code" href="class_jpeg_compress_struct.html#m33">00347</a> boolean write_Adobe_marker; <font class="comment">/* should an Adobe marker be written? */</font> +00348 +00349 <font class="comment">/* State variable: index of next scanline to be written to +</font>00350 <font class="comment"> * jpeg_write_scanlines(). Application may use this to control its +</font>00351 <font class="comment"> * processing loop, e.g., "while (next_scanline < image_height)". +</font>00352 <font class="comment"> */</font> +00353 +<a name="l00354"></a><a class="code" href="class_jpeg_compress_struct.html#m34">00354</a> JDIMENSION next_scanline; <font class="comment">/* 0 .. image_height-1 */</font> +00355 +00356 <font class="comment">/* Remaining fields are known throughout compressor, but generally +</font>00357 <font class="comment"> * should not be touched by a surrounding application. +</font>00358 <font class="comment"> */</font> +00359 +00360 <font class="comment">/* +</font>00361 <font class="comment"> * These fields are computed during compression startup +</font>00362 <font class="comment"> */</font> +<a name="l00363"></a><a class="code" href="class_jpeg_compress_struct.html#m35">00363</a> boolean progressive_mode; <font class="comment">/* TRUE if scan script uses progressive mode */</font> +<a name="l00364"></a><a class="code" href="class_jpeg_compress_struct.html#m36">00364</a> <font class="keywordtype">int</font> max_h_samp_factor; <font class="comment">/* largest h_samp_factor */</font> +<a name="l00365"></a><a class="code" href="class_jpeg_compress_struct.html#m37">00365</a> <font class="keywordtype">int</font> max_v_samp_factor; <font class="comment">/* largest v_samp_factor */</font> +00366 +<a name="l00367"></a><a class="code" href="class_jpeg_compress_struct.html#m38">00367</a> JDIMENSION total_iMCU_rows; <font class="comment">/* # of iMCU rows to be input to coef ctlr */</font> +00368 <font class="comment">/* The coefficient controller receives data in units of MCU rows as defined +</font>00369 <font class="comment"> * for fully interleaved scans (whether the JPEG file is interleaved or not). +</font>00370 <font class="comment"> * There are v_samp_factor * DCTSIZE sample rows of each component in an +</font>00371 <font class="comment"> * "iMCU" (interleaved MCU) row. +</font>00372 <font class="comment"> */</font> +00373 +00374 <font class="comment">/* +</font>00375 <font class="comment"> * These fields are valid during any one scan. +</font>00376 <font class="comment"> * They describe the components and MCUs actually appearing in the scan. +</font>00377 <font class="comment"> */</font> +<a name="l00378"></a><a class="code" href="class_jpeg_compress_struct.html#m39">00378</a> <font class="keywordtype">int</font> comps_in_scan; <font class="comment">/* # of JPEG components in this scan */</font> +<a name="l00379"></a><a class="code" href="class_jpeg_compress_struct.html#m40">00379</a> <a class="code" href="class_jpeg_component_info.html">jpeg_component_info</a> * cur_comp_info[MAX_COMPS_IN_SCAN]; +00380 <font class="comment">/* *cur_comp_info[i] describes component that appears i'th in SOS */</font> +00381 +<a name="l00382"></a><a class="code" href="class_jpeg_compress_struct.html#m41">00382</a> JDIMENSION MCUs_per_row; <font class="comment">/* # of MCUs across the image */</font> +<a name="l00383"></a><a class="code" href="class_jpeg_compress_struct.html#m42">00383</a> JDIMENSION MCU_rows_in_scan; <font class="comment">/* # of MCU rows in the image */</font> +00384 +<a name="l00385"></a><a class="code" href="class_jpeg_compress_struct.html#m43">00385</a> <font class="keywordtype">int</font> blocks_in_MCU; <font class="comment">/* # of DCT blocks per MCU */</font> +<a name="l00386"></a><a class="code" href="class_jpeg_compress_struct.html#m44">00386</a> <font class="keywordtype">int</font> MCU_membership[C_MAX_BLOCKS_IN_MCU]; +00387 <font class="comment">/* MCU_membership[i] is index in cur_comp_info of component owning */</font> +00388 <font class="comment">/* i'th block in an MCU */</font> +00389 +<a name="l00390"></a><a class="code" href="class_jpeg_compress_struct.html#m45">00390</a> <font class="keywordtype">int</font> Ss, Se, Ah, Al; <font class="comment">/* progressive JPEG parameters for scan */</font> +00391 +00392 <font class="comment">/* +</font>00393 <font class="comment"> * Links to compression subobjects (methods and private variables of modules) +</font>00394 <font class="comment"> */</font> +<a name="l00395"></a><a class="code" href="class_jpeg_compress_struct.html#m49">00395</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_comp_master.html">jpeg_comp_master</a> * master; +<a name="l00396"></a><a class="code" href="class_jpeg_compress_struct.html#m50">00396</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_c_main_controller.html">jpeg_c_main_controller</a> * main; +<a name="l00397"></a><a class="code" href="class_jpeg_compress_struct.html#m51">00397</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_c_prep_controller.html">jpeg_c_prep_controller</a> * prep; +<a name="l00398"></a><a class="code" href="class_jpeg_compress_struct.html#m52">00398</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_c_coef_controller.html">jpeg_c_coef_controller</a> * coef; +<a name="l00399"></a><a class="code" href="class_jpeg_compress_struct.html#m53">00399</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_marker_writer.html">jpeg_marker_writer</a> * marker; +<a name="l00400"></a><a class="code" href="class_jpeg_compress_struct.html#m54">00400</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_color_converter.html">jpeg_color_converter</a> * cconvert; +<a name="l00401"></a><a class="code" href="class_jpeg_compress_struct.html#m55">00401</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_downsampler.html">jpeg_downsampler</a> * downsample; +<a name="l00402"></a><a class="code" href="class_jpeg_compress_struct.html#m56">00402</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_forward_dct.html">jpeg_forward_dct</a> * fdct; +<a name="l00403"></a><a class="code" href="class_jpeg_compress_struct.html#m57">00403</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_entropy_encoder.html">jpeg_entropy_encoder</a> * entropy; +<a name="l00404"></a><a class="code" href="class_jpeg_compress_struct.html#m58">00404</a> <a class="code" href="class_jpeg_scan_info.html">jpeg_scan_info</a> * script_space; <font class="comment">/* workspace for jpeg_simple_progression */</font> +<a name="l00405"></a><a class="code" href="class_jpeg_compress_struct.html#m59">00405</a> <font class="keywordtype">int</font> script_space_size; +00406 }; +00407 +00408 +00409 <font class="comment">/* Master record for a decompression instance */</font> +00410 +<a name="l00411"></a><a class="code" href="class_jpeg_decompress_struct.html">00411</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_decompress_struct.html">jpeg_decompress_struct</a> { +<a name="l00412"></a><a class="code" href="class_jpeg_decompress_struct.html#m0">00412</a> jpeg_common_fields; <font class="comment">/* Fields shared with jpeg_compress_struct */</font> +00413 +00414 <font class="comment">/* Source of compressed data */</font> +<a name="l00415"></a><a class="code" href="class_jpeg_decompress_struct.html#m1">00415</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_source_mgr.html">jpeg_source_mgr</a> * src; +00416 +00417 <font class="comment">/* Basic description of image --- filled in by jpeg_read_header(). */</font> +00418 <font class="comment">/* Application may inspect these values to decide how to process image. */</font> +00419 +<a name="l00420"></a><a class="code" href="class_jpeg_decompress_struct.html#m2">00420</a> JDIMENSION image_width; <font class="comment">/* nominal image width (from SOF marker) */</font> +<a name="l00421"></a><a class="code" href="class_jpeg_decompress_struct.html#m3">00421</a> JDIMENSION image_height; <font class="comment">/* nominal image height */</font> +<a name="l00422"></a><a class="code" href="class_jpeg_decompress_struct.html#m4">00422</a> <font class="keywordtype">int</font> num_components; <font class="comment">/* # of color components in JPEG image */</font> +<a name="l00423"></a><a class="code" href="class_jpeg_decompress_struct.html#m5">00423</a> J_COLOR_SPACE jpeg_color_space; <font class="comment">/* colorspace of JPEG image */</font> +00424 +00425 <font class="comment">/* Decompression processing parameters --- these fields must be set before +</font>00426 <font class="comment"> * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes +</font>00427 <font class="comment"> * them to default values. +</font>00428 <font class="comment"> */</font> +00429 +<a name="l00430"></a><a class="code" href="class_jpeg_decompress_struct.html#m6">00430</a> J_COLOR_SPACE out_color_space; <font class="comment">/* colorspace for output */</font> +00431 +<a name="l00432"></a><a class="code" href="class_jpeg_decompress_struct.html#m7">00432</a> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> scale_num, scale_denom; <font class="comment">/* fraction by which to scale image */</font> +00433 +<a name="l00434"></a><a class="code" href="class_jpeg_decompress_struct.html#m9">00434</a> <font class="keywordtype">double</font> output_gamma; <font class="comment">/* image gamma wanted in output */</font> +00435 +<a name="l00436"></a><a class="code" href="class_jpeg_decompress_struct.html#m10">00436</a> boolean buffered_image; <font class="comment">/* TRUE=multiple output passes */</font> +<a name="l00437"></a><a class="code" href="class_jpeg_decompress_struct.html#m11">00437</a> boolean raw_data_out; <font class="comment">/* TRUE=downsampled data wanted */</font> +00438 +<a name="l00439"></a><a class="code" href="class_jpeg_decompress_struct.html#m12">00439</a> J_DCT_METHOD dct_method; <font class="comment">/* IDCT algorithm selector */</font> +<a name="l00440"></a><a class="code" href="class_jpeg_decompress_struct.html#m13">00440</a> boolean do_fancy_upsampling; <font class="comment">/* TRUE=apply fancy upsampling */</font> +<a name="l00441"></a><a class="code" href="class_jpeg_decompress_struct.html#m14">00441</a> boolean do_block_smoothing; <font class="comment">/* TRUE=apply interblock smoothing */</font> +00442 +<a name="l00443"></a><a class="code" href="class_jpeg_decompress_struct.html#m15">00443</a> boolean quantize_colors; <font class="comment">/* TRUE=colormapped output wanted */</font> +00444 <font class="comment">/* the following are ignored if not quantize_colors: */</font> +<a name="l00445"></a><a class="code" href="class_jpeg_decompress_struct.html#m16">00445</a> J_DITHER_MODE dither_mode; <font class="comment">/* type of color dithering to use */</font> +<a name="l00446"></a><a class="code" href="class_jpeg_decompress_struct.html#m17">00446</a> boolean two_pass_quantize; <font class="comment">/* TRUE=use two-pass color quantization */</font> +<a name="l00447"></a><a class="code" href="class_jpeg_decompress_struct.html#m18">00447</a> <font class="keywordtype">int</font> desired_number_of_colors; <font class="comment">/* max # colors to use in created colormap */</font> +00448 <font class="comment">/* these are significant only in buffered-image mode: */</font> +<a name="l00449"></a><a class="code" href="class_jpeg_decompress_struct.html#m19">00449</a> boolean enable_1pass_quant; <font class="comment">/* enable future use of 1-pass quantizer */</font> +<a name="l00450"></a><a class="code" href="class_jpeg_decompress_struct.html#m20">00450</a> boolean enable_external_quant;<font class="comment">/* enable future use of external colormap */</font> +<a name="l00451"></a><a class="code" href="class_jpeg_decompress_struct.html#m21">00451</a> boolean enable_2pass_quant; <font class="comment">/* enable future use of 2-pass quantizer */</font> +00452 +00453 <font class="comment">/* Description of actual output image that will be returned to application. +</font>00454 <font class="comment"> * These fields are computed by jpeg_start_decompress(). +</font>00455 <font class="comment"> * You can also use jpeg_calc_output_dimensions() to determine these values +</font>00456 <font class="comment"> * in advance of calling jpeg_start_decompress(). +</font>00457 <font class="comment"> */</font> +00458 +<a name="l00459"></a><a class="code" href="class_jpeg_decompress_struct.html#m22">00459</a> JDIMENSION output_width; <font class="comment">/* scaled image width */</font> +<a name="l00460"></a><a class="code" href="class_jpeg_decompress_struct.html#m23">00460</a> JDIMENSION output_height; <font class="comment">/* scaled image height */</font> +<a name="l00461"></a><a class="code" href="class_jpeg_decompress_struct.html#m24">00461</a> <font class="keywordtype">int</font> out_color_components; <font class="comment">/* # of color components in out_color_space */</font> +<a name="l00462"></a><a class="code" href="class_jpeg_decompress_struct.html#m25">00462</a> <font class="keywordtype">int</font> output_components; <font class="comment">/* # of color components returned */</font> +00463 <font class="comment">/* output_components is 1 (a colormap index) when quantizing colors; +</font>00464 <font class="comment"> * otherwise it equals out_color_components. +</font>00465 <font class="comment"> */</font> +<a name="l00466"></a><a class="code" href="class_jpeg_decompress_struct.html#m26">00466</a> <font class="keywordtype">int</font> rec_outbuf_height; <font class="comment">/* min recommended height of scanline buffer */</font> +00467 <font class="comment">/* If the buffer passed to jpeg_read_scanlines() is less than this many rows +</font>00468 <font class="comment"> * high, space and time will be wasted due to unnecessary data copying. +</font>00469 <font class="comment"> * Usually rec_outbuf_height will be 1 or 2, at most 4. +</font>00470 <font class="comment"> */</font> +00471 +00472 <font class="comment">/* When quantizing colors, the output colormap is described by these fields. +</font>00473 <font class="comment"> * The application can supply a colormap by setting colormap non-NULL before +</font>00474 <font class="comment"> * calling jpeg_start_decompress; otherwise a colormap is created during +</font>00475 <font class="comment"> * jpeg_start_decompress or jpeg_start_output. +</font>00476 <font class="comment"> * The map has out_color_components rows and actual_number_of_colors columns. +</font>00477 <font class="comment"> */</font> +<a name="l00478"></a><a class="code" href="class_jpeg_decompress_struct.html#m27">00478</a> <font class="keywordtype">int</font> actual_number_of_colors; <font class="comment">/* number of entries in use */</font> +<a name="l00479"></a><a class="code" href="class_jpeg_decompress_struct.html#m28">00479</a> JSAMPARRAY colormap; <font class="comment">/* The color map as a 2-D pixel array */</font> +00480 +00481 <font class="comment">/* State variables: these variables indicate the progress of decompression. +</font>00482 <font class="comment"> * The application may examine these but must not modify them. +</font>00483 <font class="comment"> */</font> +00484 +00485 <font class="comment">/* Row index of next scanline to be read from jpeg_read_scanlines(). +</font>00486 <font class="comment"> * Application may use this to control its processing loop, e.g., +</font>00487 <font class="comment"> * "while (output_scanline < output_height)". +</font>00488 <font class="comment"> */</font> +<a name="l00489"></a><a class="code" href="class_jpeg_decompress_struct.html#m29">00489</a> JDIMENSION output_scanline; <font class="comment">/* 0 .. output_height-1 */</font> +00490 +00491 <font class="comment">/* Current input scan number and number of iMCU rows completed in scan. +</font>00492 <font class="comment"> * These indicate the progress of the decompressor input side. +</font>00493 <font class="comment"> */</font> +<a name="l00494"></a><a class="code" href="class_jpeg_decompress_struct.html#m30">00494</a> <font class="keywordtype">int</font> input_scan_number; <font class="comment">/* Number of SOS markers seen so far */</font> +<a name="l00495"></a><a class="code" href="class_jpeg_decompress_struct.html#m31">00495</a> JDIMENSION input_iMCU_row; <font class="comment">/* Number of iMCU rows completed */</font> +00496 +00497 <font class="comment">/* The "output scan number" is the notional scan being displayed by the +</font>00498 <font class="comment"> * output side. The decompressor will not allow output scan/row number +</font>00499 <font class="comment"> * to get ahead of input scan/row, but it can fall arbitrarily far behind. +</font>00500 <font class="comment"> */</font> +<a name="l00501"></a><a class="code" href="class_jpeg_decompress_struct.html#m32">00501</a> <font class="keywordtype">int</font> output_scan_number; <font class="comment">/* Nominal scan number being displayed */</font> +<a name="l00502"></a><a class="code" href="class_jpeg_decompress_struct.html#m33">00502</a> JDIMENSION output_iMCU_row; <font class="comment">/* Number of iMCU rows read */</font> +00503 +00504 <font class="comment">/* Current progression status. coef_bits[c][i] indicates the precision +</font>00505 <font class="comment"> * with which component c's DCT coefficient i (in zigzag order) is known. +</font>00506 <font class="comment"> * It is -1 when no data has yet been received, otherwise it is the point +</font>00507 <font class="comment"> * transform (shift) value for the most recent scan of the coefficient +</font>00508 <font class="comment"> * (thus, 0 at completion of the progression). +</font>00509 <font class="comment"> * This pointer is NULL when reading a non-progressive file. +</font>00510 <font class="comment"> */</font> +<a name="l00511"></a><a class="code" href="class_jpeg_decompress_struct.html#m34">00511</a> int (*coef_bits)[DCTSIZE2]; <font class="comment">/* -1 or current Al value for each coef */</font> +00512 +00513 <font class="comment">/* Internal JPEG parameters --- the application usually need not look at +</font>00514 <font class="comment"> * these fields. Note that the decompressor output side may not use +</font>00515 <font class="comment"> * any parameters that can change between scans. +</font>00516 <font class="comment"> */</font> +00517 +00518 <font class="comment">/* Quantization and Huffman tables are carried forward across input +</font>00519 <font class="comment"> * datastreams when processing abbreviated JPEG datastreams. +</font>00520 <font class="comment"> */</font> +00521 +<a name="l00522"></a><a class="code" href="class_jpeg_decompress_struct.html#m35">00522</a> <a class="code" href="class_JQUANT_TBL.html">JQUANT_TBL</a> * quant_tbl_ptrs[NUM_QUANT_TBLS]; +00523 <font class="comment">/* ptrs to coefficient quantization tables, or NULL if not defined */</font> +00524 +<a name="l00525"></a><a class="code" href="class_jpeg_decompress_struct.html#m36">00525</a> <a class="code" href="class_JHUFF_TBL.html">JHUFF_TBL</a> * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; +<a name="l00526"></a><a class="code" href="class_jpeg_decompress_struct.html#m37">00526</a> <a class="code" href="class_JHUFF_TBL.html">JHUFF_TBL</a> * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; +00527 <font class="comment">/* ptrs to Huffman coding tables, or NULL if not defined */</font> +00528 +00529 <font class="comment">/* These parameters are never carried across datastreams, since they +</font>00530 <font class="comment"> * are given in SOF/SOS markers or defined to be reset by SOI. +</font>00531 <font class="comment"> */</font> +00532 +<a name="l00533"></a><a class="code" href="class_jpeg_decompress_struct.html#m38">00533</a> <font class="keywordtype">int</font> data_precision; <font class="comment">/* bits of precision in image data */</font> +00534 +<a name="l00535"></a><a class="code" href="class_jpeg_decompress_struct.html#m39">00535</a> <a class="code" href="class_jpeg_component_info.html">jpeg_component_info</a> * comp_info; +00536 <font class="comment">/* comp_info[i] describes component that appears i'th in SOF */</font> +00537 +<a name="l00538"></a><a class="code" href="class_jpeg_decompress_struct.html#m40">00538</a> boolean progressive_mode; <font class="comment">/* TRUE if SOFn specifies progressive mode */</font> +<a name="l00539"></a><a class="code" href="class_jpeg_decompress_struct.html#m41">00539</a> boolean arith_code; <font class="comment">/* TRUE=arithmetic coding, FALSE=Huffman */</font> +00540 +<a name="l00541"></a><a class="code" href="class_jpeg_decompress_struct.html#m42">00541</a> UINT8 arith_dc_L[NUM_ARITH_TBLS]; <font class="comment">/* L values for DC arith-coding tables */</font> +<a name="l00542"></a><a class="code" href="class_jpeg_decompress_struct.html#m43">00542</a> UINT8 arith_dc_U[NUM_ARITH_TBLS]; <font class="comment">/* U values for DC arith-coding tables */</font> +<a name="l00543"></a><a class="code" href="class_jpeg_decompress_struct.html#m44">00543</a> UINT8 arith_ac_K[NUM_ARITH_TBLS]; <font class="comment">/* Kx values for AC arith-coding tables */</font> +00544 +<a name="l00545"></a><a class="code" href="class_jpeg_decompress_struct.html#m45">00545</a> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> restart_interval; <font class="comment">/* MCUs per restart interval, or 0 for no restart */</font> +00546 +00547 <font class="comment">/* These fields record data obtained from optional markers recognized by +</font>00548 <font class="comment"> * the JPEG library. +</font>00549 <font class="comment"> */</font> +<a name="l00550"></a><a class="code" href="class_jpeg_decompress_struct.html#m46">00550</a> boolean saw_JFIF_marker; <font class="comment">/* TRUE iff a JFIF APP0 marker was found */</font> +00551 <font class="comment">/* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */</font> +<a name="l00552"></a><a class="code" href="class_jpeg_decompress_struct.html#m47">00552</a> UINT8 JFIF_major_version; <font class="comment">/* JFIF version number */</font> +<a name="l00553"></a><a class="code" href="class_jpeg_decompress_struct.html#m48">00553</a> UINT8 JFIF_minor_version; +<a name="l00554"></a><a class="code" href="class_jpeg_decompress_struct.html#m49">00554</a> UINT8 density_unit; <font class="comment">/* JFIF code for pixel size units */</font> +<a name="l00555"></a><a class="code" href="class_jpeg_decompress_struct.html#m50">00555</a> UINT16 X_density; <font class="comment">/* Horizontal pixel density */</font> +<a name="l00556"></a><a class="code" href="class_jpeg_decompress_struct.html#m51">00556</a> UINT16 Y_density; <font class="comment">/* Vertical pixel density */</font> +<a name="l00557"></a><a class="code" href="class_jpeg_decompress_struct.html#m52">00557</a> boolean saw_Adobe_marker; <font class="comment">/* TRUE iff an Adobe APP14 marker was found */</font> +<a name="l00558"></a><a class="code" href="class_jpeg_decompress_struct.html#m53">00558</a> UINT8 Adobe_transform; <font class="comment">/* Color transform code from Adobe marker */</font> +00559 +<a name="l00560"></a><a class="code" href="class_jpeg_decompress_struct.html#m54">00560</a> boolean CCIR601_sampling; <font class="comment">/* TRUE=first samples are cosited */</font> +00561 +00562 <font class="comment">/* Aside from the specific data retained from APPn markers known to the +</font>00563 <font class="comment"> * library, the uninterpreted contents of any or all APPn and COM markers +</font>00564 <font class="comment"> * can be saved in a list for examination by the application. +</font>00565 <font class="comment"> */</font> +<a name="l00566"></a><a class="code" href="class_jpeg_decompress_struct.html#m55">00566</a> <a class="code" href="class_jpeg_marker_struct.html">jpeg_saved_marker_ptr</a> marker_list; <font class="comment">/* Head of list of saved markers */</font> +00567 +00568 <font class="comment">/* Remaining fields are known throughout decompressor, but generally +</font>00569 <font class="comment"> * should not be touched by a surrounding application. +</font>00570 <font class="comment"> */</font> +00571 +00572 <font class="comment">/* +</font>00573 <font class="comment"> * These fields are computed during decompression startup +</font>00574 <font class="comment"> */</font> +<a name="l00575"></a><a class="code" href="class_jpeg_decompress_struct.html#m56">00575</a> <font class="keywordtype">int</font> max_h_samp_factor; <font class="comment">/* largest h_samp_factor */</font> +<a name="l00576"></a><a class="code" href="class_jpeg_decompress_struct.html#m57">00576</a> <font class="keywordtype">int</font> max_v_samp_factor; <font class="comment">/* largest v_samp_factor */</font> +00577 +<a name="l00578"></a><a class="code" href="class_jpeg_decompress_struct.html#m58">00578</a> <font class="keywordtype">int</font> min_DCT_scaled_size; <font class="comment">/* smallest DCT_scaled_size of any component */</font> +00579 +<a name="l00580"></a><a class="code" href="class_jpeg_decompress_struct.html#m59">00580</a> JDIMENSION total_iMCU_rows; <font class="comment">/* # of iMCU rows in image */</font> +00581 <font class="comment">/* The coefficient controller's input and output progress is measured in +</font>00582 <font class="comment"> * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows +</font>00583 <font class="comment"> * in fully interleaved JPEG scans, but are used whether the scan is +</font>00584 <font class="comment"> * interleaved or not. We define an iMCU row as v_samp_factor DCT block +</font>00585 <font class="comment"> * rows of each component. Therefore, the IDCT output contains +</font>00586 <font class="comment"> * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row. +</font>00587 <font class="comment"> */</font> +00588 +<a name="l00589"></a><a class="code" href="class_jpeg_decompress_struct.html#m60">00589</a> JSAMPLE * sample_range_limit; <font class="comment">/* table for fast range-limiting */</font> +00590 +00591 <font class="comment">/* +</font>00592 <font class="comment"> * These fields are valid during any one scan. +</font>00593 <font class="comment"> * They describe the components and MCUs actually appearing in the scan. +</font>00594 <font class="comment"> * Note that the decompressor output side must not use these fields. +</font>00595 <font class="comment"> */</font> +<a name="l00596"></a><a class="code" href="class_jpeg_decompress_struct.html#m61">00596</a> <font class="keywordtype">int</font> comps_in_scan; <font class="comment">/* # of JPEG components in this scan */</font> +<a name="l00597"></a><a class="code" href="class_jpeg_decompress_struct.html#m62">00597</a> <a class="code" href="class_jpeg_component_info.html">jpeg_component_info</a> * cur_comp_info[MAX_COMPS_IN_SCAN]; +00598 <font class="comment">/* *cur_comp_info[i] describes component that appears i'th in SOS */</font> +00599 +<a name="l00600"></a><a class="code" href="class_jpeg_decompress_struct.html#m63">00600</a> JDIMENSION MCUs_per_row; <font class="comment">/* # of MCUs across the image */</font> +<a name="l00601"></a><a class="code" href="class_jpeg_decompress_struct.html#m64">00601</a> JDIMENSION MCU_rows_in_scan; <font class="comment">/* # of MCU rows in the image */</font> +00602 +<a name="l00603"></a><a class="code" href="class_jpeg_decompress_struct.html#m65">00603</a> <font class="keywordtype">int</font> blocks_in_MCU; <font class="comment">/* # of DCT blocks per MCU */</font> +<a name="l00604"></a><a class="code" href="class_jpeg_decompress_struct.html#m66">00604</a> <font class="keywordtype">int</font> MCU_membership[D_MAX_BLOCKS_IN_MCU]; +00605 <font class="comment">/* MCU_membership[i] is index in cur_comp_info of component owning */</font> +00606 <font class="comment">/* i'th block in an MCU */</font> +00607 +<a name="l00608"></a><a class="code" href="class_jpeg_decompress_struct.html#m67">00608</a> <font class="keywordtype">int</font> Ss, Se, Ah, Al; <font class="comment">/* progressive JPEG parameters for scan */</font> +00609 +00610 <font class="comment">/* This field is shared between entropy decoder and marker parser. +</font>00611 <font class="comment"> * It is either zero or the code of a JPEG marker that has been +</font>00612 <font class="comment"> * read from the data source, but has not yet been processed. +</font>00613 <font class="comment"> */</font> +<a name="l00614"></a><a class="code" href="class_jpeg_decompress_struct.html#m71">00614</a> <font class="keywordtype">int</font> unread_marker; +00615 +00616 <font class="comment">/* +</font>00617 <font class="comment"> * Links to decompression subobjects (methods, private variables of modules) +</font>00618 <font class="comment"> */</font> +<a name="l00619"></a><a class="code" href="class_jpeg_decompress_struct.html#m72">00619</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_decomp_master.html">jpeg_decomp_master</a> * master; +<a name="l00620"></a><a class="code" href="class_jpeg_decompress_struct.html#m73">00620</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_d_main_controller.html">jpeg_d_main_controller</a> * main; +<a name="l00621"></a><a class="code" href="class_jpeg_decompress_struct.html#m74">00621</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_d_coef_controller.html">jpeg_d_coef_controller</a> * coef; +<a name="l00622"></a><a class="code" href="class_jpeg_decompress_struct.html#m75">00622</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_d_post_controller.html">jpeg_d_post_controller</a> * post; +<a name="l00623"></a><a class="code" href="class_jpeg_decompress_struct.html#m76">00623</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_input_controller.html">jpeg_input_controller</a> * inputctl; +<a name="l00624"></a><a class="code" href="class_jpeg_decompress_struct.html#m77">00624</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_marker_reader.html">jpeg_marker_reader</a> * marker; +<a name="l00625"></a><a class="code" href="class_jpeg_decompress_struct.html#m78">00625</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_entropy_decoder.html">jpeg_entropy_decoder</a> * entropy; +<a name="l00626"></a><a class="code" href="class_jpeg_decompress_struct.html#m79">00626</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_inverse_dct.html">jpeg_inverse_dct</a> * idct; +<a name="l00627"></a><a class="code" href="class_jpeg_decompress_struct.html#m80">00627</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_upsampler.html">jpeg_upsampler</a> * upsample; +<a name="l00628"></a><a class="code" href="class_jpeg_decompress_struct.html#m81">00628</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_color_deconverter.html">jpeg_color_deconverter</a> * cconvert; +<a name="l00629"></a><a class="code" href="class_jpeg_decompress_struct.html#m82">00629</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_color_quantizer.html">jpeg_color_quantizer</a> * cquantize; +00630 }; +00631 +00632 +00633 <font class="comment">/* "Object" declarations for JPEG modules that may be supplied or called +</font>00634 <font class="comment"> * directly by the surrounding application. +</font>00635 <font class="comment"> * As with all objects in the JPEG library, these structs only define the +</font>00636 <font class="comment"> * publicly visible methods and state variables of a module. Additional +</font>00637 <font class="comment"> * private fields may exist after the public ones. +</font>00638 <font class="comment"> */</font> +00639 +00640 +00641 <font class="comment">/* Error handler object */</font> +00642 +<a name="l00643"></a><a class="code" href="class_jpeg_error_mgr.html">00643</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_error_mgr.html">jpeg_error_mgr</a> { +00644 <font class="comment">/* Error exit handler: does not return to caller */</font> +00645 <a class="code" href="class_jpeg_error_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, error_exit, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo)); +00646 <font class="comment">/* Conditionally emit a trace or warning message */</font> +00647 <a class="code" href="class_jpeg_error_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, emit_message, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo, <font class="keywordtype">int</font> msg_level)); +00648 <font class="comment">/* Routine that actually outputs a trace or error message */</font> +00649 <a class="code" href="class_jpeg_error_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, output_message, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo)); +00650 <font class="comment">/* Format a message string for the most recent JPEG error or message */</font> +00651 <a class="code" href="class_jpeg_error_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, format_message, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo, <font class="keywordtype">char</font> * buffer)); +<a name="l00652"></a><a class="code" href="jpeglib_h.html#a13">00652</a> <font class="preprocessor">#define JMSG_LENGTH_MAX 200 </font><font class="comment">/* recommended size of format_message buffer */</font> +00653 <font class="comment">/* Reset error state variables at start of a new image */</font> +00654 <a class="code" href="class_jpeg_error_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, reset_error_mgr, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo)); +00655 +00656 <font class="comment">/* The message ID code and any parameters are saved here. +</font>00657 <font class="comment"> * A message can have one string parameter or up to 8 int parameters. +</font>00658 <font class="comment"> */</font> +<a name="l00659"></a><a class="code" href="class_jpeg_error_mgr.html#m0">00659</a> <font class="keywordtype">int</font> msg_code; +<a name="l00660"></a><a class="code" href="jpeglib_h.html#a14">00660</a> <font class="preprocessor">#define JMSG_STR_PARM_MAX 80 +</font>00661 <font class="preprocessor"></font> <font class="keyword">union </font>{ +<a name="l00662"></a><a class="code" href="class_jpeg_error_mgr.html#m1">00662</a> <font class="keywordtype">int</font> i[8]; +<a name="l00663"></a><a class="code" href="class_jpeg_error_mgr.html#m2">00663</a> <font class="keywordtype">char</font> s[JMSG_STR_PARM_MAX]; +00664 } msg_parm; +00665 +00666 <font class="comment">/* Standard state variables for error facility */</font> +00667 +<a name="l00668"></a><a class="code" href="class_jpeg_error_mgr.html#m4">00668</a> <font class="keywordtype">int</font> trace_level; <font class="comment">/* max msg_level that will be displayed */</font> +00669 +00670 <font class="comment">/* For recoverable corrupt-data errors, we emit a warning message, +</font>00671 <font class="comment"> * but keep going unless emit_message chooses to abort. emit_message +</font>00672 <font class="comment"> * should count warnings in num_warnings. The surrounding application +</font>00673 <font class="comment"> * can check for bad data by seeing if num_warnings is nonzero at the +</font>00674 <font class="comment"> * end of processing. +</font>00675 <font class="comment"> */</font> +<a name="l00676"></a><a class="code" href="class_jpeg_error_mgr.html#m5">00676</a> <font class="keywordtype">long</font> num_warnings; <font class="comment">/* number of corrupt-data warnings */</font> +00677 +00678 <font class="comment">/* These fields point to the table(s) of error message strings. +</font>00679 <font class="comment"> * An application can change the table pointer to switch to a different +</font>00680 <font class="comment"> * message list (typically, to change the language in which errors are +</font>00681 <font class="comment"> * reported). Some applications may wish to add additional error codes +</font>00682 <font class="comment"> * that will be handled by the JPEG library error mechanism; the second +</font>00683 <font class="comment"> * table pointer is used for this purpose. +</font>00684 <font class="comment"> * +</font>00685 <font class="comment"> * First table includes all errors generated by JPEG library itself. +</font>00686 <font class="comment"> * Error code 0 is reserved for a "no such error string" message. +</font>00687 <font class="comment"> */</font> +<a name="l00688"></a><a class="code" href="class_jpeg_error_mgr.html#m6">00688</a> <font class="keyword">const</font> <font class="keywordtype">char</font> * <font class="keyword">const</font> * jpeg_message_table; <font class="comment">/* Library errors */</font> +<a name="l00689"></a><a class="code" href="class_jpeg_error_mgr.html#m7">00689</a> <font class="keywordtype">int</font> last_jpeg_message; <font class="comment">/* Table contains strings 0..last_jpeg_message */</font> +00690 <font class="comment">/* Second table can be added by application (see cjpeg/djpeg for example). +</font>00691 <font class="comment"> * It contains strings numbered first_addon_message..last_addon_message. +</font>00692 <font class="comment"> */</font> +<a name="l00693"></a><a class="code" href="class_jpeg_error_mgr.html#m8">00693</a> <font class="keyword">const</font> <font class="keywordtype">char</font> * <font class="keyword">const</font> * addon_message_table; <font class="comment">/* Non-library errors */</font> +<a name="l00694"></a><a class="code" href="class_jpeg_error_mgr.html#m9">00694</a> <font class="keywordtype">int</font> first_addon_message; <font class="comment">/* code for first string in addon table */</font> +<a name="l00695"></a><a class="code" href="class_jpeg_error_mgr.html#m10">00695</a> <font class="keywordtype">int</font> last_addon_message; <font class="comment">/* code for last string in addon table */</font> +00696 }; +00697 +00698 +00699 <font class="comment">/* Progress monitor object */</font> +00700 +<a name="l00701"></a><a class="code" href="class_jpeg_progress_mgr.html">00701</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_progress_mgr.html">jpeg_progress_mgr</a> { +00702 <a class="code" href="class_jpeg_progress_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, progress_monitor, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo)); +00703 +<a name="l00704"></a><a class="code" href="class_jpeg_progress_mgr.html#m0">00704</a> <font class="keywordtype">long</font> pass_counter; <font class="comment">/* work units completed in this pass */</font> +<a name="l00705"></a><a class="code" href="class_jpeg_progress_mgr.html#m1">00705</a> <font class="keywordtype">long</font> pass_limit; <font class="comment">/* total number of work units in this pass */</font> +<a name="l00706"></a><a class="code" href="class_jpeg_progress_mgr.html#m2">00706</a> <font class="keywordtype">int</font> completed_passes; <font class="comment">/* passes completed so far */</font> +<a name="l00707"></a><a class="code" href="class_jpeg_progress_mgr.html#m3">00707</a> <font class="keywordtype">int</font> total_passes; <font class="comment">/* total number of passes expected */</font> +00708 }; +00709 +00710 +00711 <font class="comment">/* Data destination object for compression */</font> +00712 +<a name="l00713"></a><a class="code" href="class_jpeg_destination_mgr.html">00713</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_destination_mgr.html">jpeg_destination_mgr</a> { +<a name="l00714"></a><a class="code" href="class_jpeg_destination_mgr.html#m0">00714</a> JOCTET * next_output_byte; <font class="comment">/* => next byte to write in buffer */</font> +<a name="l00715"></a><a class="code" href="class_jpeg_destination_mgr.html#m1">00715</a> size_t free_in_buffer; <font class="comment">/* # of byte spaces remaining in buffer */</font> +00716 +00717 <a class="code" href="class_jpeg_destination_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, init_destination, (<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo)); +00718 <a class="code" href="class_jpeg_destination_mgr.html#a0">JMETHOD</a>(boolean, empty_output_buffer, (<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo)); +00719 <a class="code" href="class_jpeg_destination_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, term_destination, (<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo)); +00720 }; +00721 +00722 +00723 <font class="comment">/* Data source object for decompression */</font> +00724 +<a name="l00725"></a><a class="code" href="class_jpeg_source_mgr.html">00725</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_source_mgr.html">jpeg_source_mgr</a> { +<a name="l00726"></a><a class="code" href="class_jpeg_source_mgr.html#m0">00726</a> <font class="keyword">const</font> JOCTET * next_input_byte; <font class="comment">/* => next byte to read from buffer */</font> +<a name="l00727"></a><a class="code" href="class_jpeg_source_mgr.html#m1">00727</a> size_t bytes_in_buffer; <font class="comment">/* # of bytes remaining in buffer */</font> +00728 +00729 <a class="code" href="class_jpeg_source_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, init_source, (<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +00730 <a class="code" href="class_jpeg_source_mgr.html#a0">JMETHOD</a>(boolean, fill_input_buffer, (<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +00731 <a class="code" href="class_jpeg_source_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, skip_input_data, (<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo, <font class="keywordtype">long</font> num_bytes)); +00732 <a class="code" href="class_jpeg_source_mgr.html#a0">JMETHOD</a>(boolean, resync_to_restart, (<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo, <font class="keywordtype">int</font> desired)); +00733 <a class="code" href="class_jpeg_source_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, term_source, (<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +00734 }; +00735 +00736 +00737 <font class="comment">/* Memory manager object. +</font>00738 <font class="comment"> * Allocates "small" objects (a few K total), "large" objects (tens of K), +</font>00739 <font class="comment"> * and "really big" objects (virtual arrays with backing store if needed). +</font>00740 <font class="comment"> * The memory manager does not allow individual objects to be freed; rather, +</font>00741 <font class="comment"> * each created object is assigned to a pool, and whole pools can be freed +</font>00742 <font class="comment"> * at once. This is faster and more convenient than remembering exactly what +</font>00743 <font class="comment"> * to free, especially where malloc()/free() are not too speedy. +</font>00744 <font class="comment"> * NB: alloc routines never return NULL. They exit to error_exit if not +</font>00745 <font class="comment"> * successful. +</font>00746 <font class="comment"> */</font> +00747 +<a name="l00748"></a><a class="code" href="jpeglib_h.html#a15">00748</a> <font class="preprocessor">#define JPOOL_PERMANENT 0 </font><font class="comment">/* lasts until master record is destroyed */</font> +<a name="l00749"></a><a class="code" href="jpeglib_h.html#a16">00749</a> <font class="preprocessor">#define JPOOL_IMAGE 1 </font><font class="comment">/* lasts until done with image/datastream */</font> +<a name="l00750"></a><a class="code" href="jpeglib_h.html#a17">00750</a> <font class="preprocessor">#define JPOOL_NUMPOOLS 2 +</font>00751 <font class="preprocessor"></font> +<a name="l00752"></a><a class="code" href="jpeglib_h.html#a44">00752</a> <font class="keyword">typedef</font> <font class="keyword">struct </font><a class="code" href="class_jvirt_sarray_control.html">jvirt_sarray_control</a> * <a class="code" href="class_jvirt_sarray_control.html">jvirt_sarray_ptr</a>; +<a name="l00753"></a><a class="code" href="jpeglib_h.html#a45">00753</a> <font class="keyword">typedef</font> <font class="keyword">struct </font><a class="code" href="class_jvirt_barray_control.html">jvirt_barray_control</a> * <a class="code" href="class_jvirt_barray_control.html">jvirt_barray_ptr</a>; +00754 +00755 +<a name="l00756"></a><a class="code" href="class_jpeg_memory_mgr.html">00756</a> <font class="keyword">struct </font><a class="code" href="class_jpeg_memory_mgr.html">jpeg_memory_mgr</a> { +00757 <font class="comment">/* Method pointers */</font> +00758 <a class="code" href="class_jpeg_memory_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font> *, alloc_small, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo, <font class="keywordtype">int</font> pool_id, +00759 size_t sizeofobject)); +00760 <a class="code" href="class_jpeg_memory_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font> <a class="code" href="class_jpeg_marker_struct.html">FAR</a> *, alloc_large, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo, <font class="keywordtype">int</font> pool_id, +00761 size_t sizeofobject)); +00762 <a class="code" href="class_jpeg_memory_mgr.html#a0">JMETHOD</a>(JSAMPARRAY, alloc_sarray, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo, <font class="keywordtype">int</font> pool_id, +00763 JDIMENSION samplesperrow, +00764 JDIMENSION numrows)); +00765 <a class="code" href="class_jpeg_memory_mgr.html#a0">JMETHOD</a>(JBLOCKARRAY, alloc_barray, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo, <font class="keywordtype">int</font> pool_id, +00766 JDIMENSION blocksperrow, +00767 JDIMENSION numrows)); +00768 <a class="code" href="class_jpeg_memory_mgr.html#a0">JMETHOD</a>(<a class="code" href="class_jvirt_sarray_control.html">jvirt_sarray_ptr</a>, request_virt_sarray, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo, +00769 <font class="keywordtype">int</font> pool_id, +00770 boolean pre_zero, +00771 JDIMENSION samplesperrow, +00772 JDIMENSION numrows, +00773 JDIMENSION maxaccess)); +00774 <a class="code" href="class_jpeg_memory_mgr.html#a0">JMETHOD</a>(<a class="code" href="class_jvirt_barray_control.html">jvirt_barray_ptr</a>, request_virt_barray, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo, +00775 <font class="keywordtype">int</font> pool_id, +00776 boolean pre_zero, +00777 JDIMENSION blocksperrow, +00778 JDIMENSION numrows, +00779 JDIMENSION maxaccess)); +00780 <a class="code" href="class_jpeg_memory_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, realize_virt_arrays, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo)); +00781 <a class="code" href="class_jpeg_memory_mgr.html#a0">JMETHOD</a>(JSAMPARRAY, access_virt_sarray, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo, +00782 <a class="code" href="class_jvirt_sarray_control.html">jvirt_sarray_ptr</a> ptr, +00783 JDIMENSION start_row, +00784 JDIMENSION num_rows, +00785 boolean writable)); +00786 <a class="code" href="class_jpeg_memory_mgr.html#a0">JMETHOD</a>(JBLOCKARRAY, access_virt_barray, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo, +00787 <a class="code" href="class_jvirt_barray_control.html">jvirt_barray_ptr</a> ptr, +00788 JDIMENSION start_row, +00789 JDIMENSION num_rows, +00790 boolean writable)); +00791 <a class="code" href="class_jpeg_memory_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, free_pool, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo, <font class="keywordtype">int</font> pool_id)); +00792 <a class="code" href="class_jpeg_memory_mgr.html#a0">JMETHOD</a>(<font class="keywordtype">void</font>, self_destruct, (<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo)); +00793 +00794 <font class="comment">/* Limit on memory allocation for this JPEG object. (Note that this is +</font>00795 <font class="comment"> * merely advisory, not a guaranteed maximum; it only affects the space +</font>00796 <font class="comment"> * used for virtual-array buffers.) May be changed by outer application +</font>00797 <font class="comment"> * after creating the JPEG object. +</font>00798 <font class="comment"> */</font> +<a name="l00799"></a><a class="code" href="class_jpeg_memory_mgr.html#m0">00799</a> <font class="keywordtype">long</font> max_memory_to_use; +00800 +00801 <font class="comment">/* Maximum allocation request accepted by alloc_large. */</font> +<a name="l00802"></a><a class="code" href="class_jpeg_memory_mgr.html#m1">00802</a> <font class="keywordtype">long</font> max_alloc_chunk; +00803 }; +00804 +00805 +00806 <font class="comment">/* Routine signature for application-supplied marker processing methods. +</font>00807 <font class="comment"> * Need not pass marker code since it is stored in cinfo->unread_marker. +</font>00808 <font class="comment"> */</font> +00809 <font class="keyword">typedef</font> <a class="code" href="jmorecfg_h.html#a11">JMETHOD</a>(boolean, jpeg_marker_parser_method, (<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +00810 +00811 +00812 <font class="comment">/* Declarations for routines called by application. +</font>00813 <font class="comment"> * The JPP macro hides prototype parameters from compilers that can't cope. +</font>00814 <font class="comment"> * Note JPP requires double parentheses. +</font>00815 <font class="comment"> */</font> +00816 +00817 <font class="preprocessor">#ifdef HAVE_PROTOTYPES +</font>00818 <font class="preprocessor"></font><font class="preprocessor">#define JPP(arglist) arglist +</font>00819 <font class="preprocessor"></font><font class="preprocessor">#else +</font><a name="l00820"></a><a class="code" href="jpeglib_h.html#a18">00820</a> <font class="preprocessor"></font><font class="preprocessor">#define JPP(arglist) () +</font>00821 <font class="preprocessor"></font><font class="preprocessor">#endif +</font>00822 <font class="preprocessor"></font> +00823 +00824 <font class="comment">/* Short forms of external names for systems with brain-damaged linkers. +</font>00825 <font class="comment"> * We shorten external names to be unique in the first six letters, which +</font>00826 <font class="comment"> * is good enough for all known systems. +</font>00827 <font class="comment"> * (If your compiler itself needs names to be unique in less than 15 +</font>00828 <font class="comment"> * characters, you are out of luck. Get a better compiler.) +</font>00829 <font class="comment"> */</font> +00830 +00831 <font class="preprocessor">#ifdef NEED_SHORT_EXTERNAL_NAMES +</font>00832 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_std_error jStdError +</font>00833 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_CreateCompress jCreaCompress +</font>00834 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_CreateDecompress jCreaDecompress +</font>00835 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_destroy_compress jDestCompress +</font>00836 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_destroy_decompress jDestDecompress +</font>00837 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_stdio_dest jStdDest +</font>00838 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_stdio_src jStdSrc +</font>00839 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_set_defaults jSetDefaults +</font>00840 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_set_colorspace jSetColorspace +</font>00841 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_default_colorspace jDefColorspace +</font>00842 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_set_quality jSetQuality +</font>00843 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_set_linear_quality jSetLQuality +</font>00844 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_add_quant_table jAddQuantTable +</font>00845 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_quality_scaling jQualityScaling +</font>00846 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_simple_progression jSimProgress +</font>00847 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_suppress_tables jSuppressTables +</font>00848 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_alloc_quant_table jAlcQTable +</font>00849 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_alloc_huff_table jAlcHTable +</font>00850 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_start_compress jStrtCompress +</font>00851 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_write_scanlines jWrtScanlines +</font>00852 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_finish_compress jFinCompress +</font>00853 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_write_raw_data jWrtRawData +</font>00854 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_write_marker jWrtMarker +</font>00855 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_write_m_header jWrtMHeader +</font>00856 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_write_m_byte jWrtMByte +</font>00857 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_write_tables jWrtTables +</font>00858 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_read_header jReadHeader +</font>00859 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_start_decompress jStrtDecompress +</font>00860 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_read_scanlines jReadScanlines +</font>00861 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_finish_decompress jFinDecompress +</font>00862 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_read_raw_data jReadRawData +</font>00863 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_has_multiple_scans jHasMultScn +</font>00864 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_start_output jStrtOutput +</font>00865 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_finish_output jFinOutput +</font>00866 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_input_complete jInComplete +</font>00867 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_new_colormap jNewCMap +</font>00868 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_consume_input jConsumeInput +</font>00869 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_calc_output_dimensions jCalcDimensions +</font>00870 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_save_markers jSaveMarkers +</font>00871 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_set_marker_processor jSetMarker +</font>00872 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_read_coefficients jReadCoefs +</font>00873 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_write_coefficients jWrtCoefs +</font>00874 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_copy_critical_parameters jCopyCrit +</font>00875 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_abort_compress jAbrtCompress +</font>00876 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_abort_decompress jAbrtDecompress +</font>00877 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_abort jAbort +</font>00878 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_destroy jDestroy +</font>00879 <font class="preprocessor"></font><font class="preprocessor">#define jpeg_resync_to_restart jResyncRestart +</font>00880 <font class="preprocessor"></font><font class="preprocessor">#endif </font><font class="comment">/* NEED_SHORT_EXTERNAL_NAMES */</font> +00881 +00882 +00883 <font class="comment">/* Default error-management setup */</font> +00884 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keyword">struct</font> <a class="code" href="class_jpeg_error_mgr.html">jpeg_error_mgr</a> *) jpeg_std_error +00885 <a class="code" href="jpeglib_h.html#a18">JPP</a>((<font class="keyword">struct</font> <a class="code" href="class_jpeg_error_mgr.html">jpeg_error_mgr</a> * err)); +00886 +00887 <font class="comment">/* Initialization of JPEG compression objects. +</font>00888 <font class="comment"> * jpeg_create_compress() and jpeg_create_decompress() are the exported +</font>00889 <font class="comment"> * names that applications should call. These expand to calls on +</font>00890 <font class="comment"> * jpeg_CreateCompress and jpeg_CreateDecompress with additional information +</font>00891 <font class="comment"> * passed for version mismatch checking. +</font>00892 <font class="comment"> * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. +</font>00893 <font class="comment"> */</font> +<a name="l00894"></a><a class="code" href="jpeglib_h.html#a19">00894</a> <font class="preprocessor">#define jpeg_create_compress(cinfo) \ +</font>00895 <font class="preprocessor"> jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ +</font>00896 <font class="preprocessor"> (size_t) sizeof(struct jpeg_compress_struct)) +</font><a name="l00897"></a><a class="code" href="jpeglib_h.html#a20">00897</a> <font class="preprocessor"></font><font class="preprocessor">#define jpeg_create_decompress(cinfo) \ +</font>00898 <font class="preprocessor"> jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ +</font>00899 <font class="preprocessor"> (size_t) sizeof(struct jpeg_decompress_struct)) +</font>00900 <font class="preprocessor"></font><a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_CreateCompress <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, +00901 <font class="keywordtype">int</font> version, size_t structsize)); +00902 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_CreateDecompress <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo, +00903 <font class="keywordtype">int</font> version, size_t structsize)); +00904 <font class="comment">/* Destruction of JPEG compression objects */</font> +00905 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_destroy_compress <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo)); +00906 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_destroy_decompress <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +00907 +00908 <font class="comment">/* Standard data source and destination managers: stdio streams. */</font> +00909 <font class="comment">/* Caller is responsible for opening the file before and closing after. */</font> +00910 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_stdio_dest <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, FILE * outfile)); +00911 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_stdio_src <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo, FILE * infile)); +00912 +00913 <font class="comment">/* Default parameter setup for compression */</font> +00914 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_set_defaults <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo)); +00915 <font class="comment">/* Compression parameter setup aids */</font> +00916 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_set_colorspace <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, +00917 J_COLOR_SPACE colorspace)); +00918 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_default_colorspace <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo)); +00919 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_set_quality <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, <font class="keywordtype">int</font> quality, +00920 boolean force_baseline)); +00921 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_set_linear_quality <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, +00922 <font class="keywordtype">int</font> scale_factor, +00923 boolean force_baseline)); +00924 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_add_quant_table <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, <font class="keywordtype">int</font> which_tbl, +00925 <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> *basic_table, +00926 <font class="keywordtype">int</font> scale_factor, +00927 boolean force_baseline)); +00928 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">int</font>) jpeg_quality_scaling <a class="code" href="jpeglib_h.html#a18">JPP</a>((<font class="keywordtype">int</font> quality)); +00929 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_simple_progression <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo)); +00930 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_suppress_tables <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, +00931 boolean suppress)); +00932 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<a class="code" href="class_JQUANT_TBL.html">JQUANT_TBL</a> *) jpeg_alloc_quant_table <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo)); +00933 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<a class="code" href="class_JHUFF_TBL.html">JHUFF_TBL</a> *) jpeg_alloc_huff_table <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo)); +00934 +00935 <font class="comment">/* Main entry points for compression */</font> +00936 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_start_compress <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, +00937 boolean write_all_tables)); +00938 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(JDIMENSION) jpeg_write_scanlines <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, +00939 JSAMPARRAY scanlines, +00940 JDIMENSION num_lines)); +00941 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_finish_compress <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo)); +00942 +00943 <font class="comment">/* Replaces jpeg_write_scanlines when writing raw downsampled data. */</font> +00944 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(JDIMENSION) jpeg_write_raw_data <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, +00945 JSAMPIMAGE data, +00946 JDIMENSION num_lines)); +00947 +00948 <font class="comment">/* Write a special marker. See libjpeg.doc concerning safe usage. */</font> +00949 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_write_marker +00950 <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, <font class="keywordtype">int</font> marker, +00951 <font class="keyword">const</font> JOCTET * dataptr, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> datalen)); +00952 <font class="comment">/* Same, but piecemeal. */</font> +00953 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_write_m_header +00954 <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, <font class="keywordtype">int</font> marker, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> datalen)); +00955 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_write_m_byte +00956 <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, <font class="keywordtype">int</font> val)); +00957 +00958 <font class="comment">/* Alternate compression function: just write an abbreviated table file */</font> +00959 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_write_tables <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo)); +00960 +00961 <font class="comment">/* Decompression startup: read start of JPEG datastream to see what's there */</font> +00962 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">int</font>) jpeg_read_header <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo, +00963 boolean require_image)); +00964 <font class="comment">/* Return value is one of: */</font> +<a name="l00965"></a><a class="code" href="jpeglib_h.html#a21">00965</a> <font class="preprocessor">#define JPEG_SUSPENDED 0 </font><font class="comment">/* Suspended due to lack of input data */</font> +<a name="l00966"></a><a class="code" href="jpeglib_h.html#a22">00966</a> <font class="preprocessor">#define JPEG_HEADER_OK 1 </font><font class="comment">/* Found valid image datastream */</font> +<a name="l00967"></a><a class="code" href="jpeglib_h.html#a23">00967</a> <font class="preprocessor">#define JPEG_HEADER_TABLES_ONLY 2 </font><font class="comment">/* Found valid table-specs-only datastream */</font> +00968 <font class="comment">/* If you pass require_image = TRUE (normal case), you need not check for +</font>00969 <font class="comment"> * a TABLES_ONLY return code; an abbreviated file will cause an error exit. +</font>00970 <font class="comment"> * JPEG_SUSPENDED is only possible if you use a data source module that can +</font>00971 <font class="comment"> * give a suspension return (the stdio source module doesn't). +</font>00972 <font class="comment"> */</font> +00973 +00974 <font class="comment">/* Main entry points for decompression */</font> +00975 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(boolean) jpeg_start_decompress <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +00976 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(JDIMENSION) jpeg_read_scanlines <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo, +00977 JSAMPARRAY scanlines, +00978 JDIMENSION max_lines)); +00979 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(boolean) jpeg_finish_decompress <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +00980 +00981 <font class="comment">/* Replaces jpeg_read_scanlines when reading raw downsampled data. */</font> +00982 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(JDIMENSION) jpeg_read_raw_data <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo, +00983 JSAMPIMAGE data, +00984 JDIMENSION max_lines)); +00985 +00986 <font class="comment">/* Additional entry points for buffered-image mode. */</font> +00987 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(boolean) jpeg_has_multiple_scans <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +00988 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(boolean) jpeg_start_output <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo, +00989 <font class="keywordtype">int</font> scan_number)); +00990 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(boolean) jpeg_finish_output <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +00991 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(boolean) jpeg_input_complete <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +00992 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_new_colormap <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +00993 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">int</font>) jpeg_consume_input <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +00994 <font class="comment">/* Return value is one of: */</font> +00995 <font class="comment">/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */</font> +<a name="l00996"></a><a class="code" href="jpeglib_h.html#a24">00996</a> <font class="preprocessor">#define JPEG_REACHED_SOS 1 </font><font class="comment">/* Reached start of new scan */</font> +<a name="l00997"></a><a class="code" href="jpeglib_h.html#a25">00997</a> <font class="preprocessor">#define JPEG_REACHED_EOI 2 </font><font class="comment">/* Reached end of image */</font> +<a name="l00998"></a><a class="code" href="jpeglib_h.html#a26">00998</a> <font class="preprocessor">#define JPEG_ROW_COMPLETED 3 </font><font class="comment">/* Completed one iMCU row */</font> +<a name="l00999"></a><a class="code" href="jpeglib_h.html#a27">00999</a> <font class="preprocessor">#define JPEG_SCAN_COMPLETED 4 </font><font class="comment">/* Completed last iMCU row of a scan */</font> +01000 +01001 <font class="comment">/* Precalculate output dimensions for current decompression parameters. */</font> +01002 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_calc_output_dimensions <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +01003 +01004 <font class="comment">/* Control saving of COM and APPn markers into marker_list. */</font> +01005 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_save_markers +01006 <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo, <font class="keywordtype">int</font> marker_code, +01007 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> length_limit)); +01008 +01009 <font class="comment">/* Install a special processing method for COM or APPn markers. */</font> +01010 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_set_marker_processor +01011 <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo, <font class="keywordtype">int</font> marker_code, +01012 jpeg_marker_parser_method routine)); +01013 +01014 <font class="comment">/* Read or write raw DCT coefficients --- useful for lossless transcoding. */</font> +01015 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<a class="code" href="class_jvirt_barray_control.html">jvirt_barray_ptr</a> *) jpeg_read_coefficients <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +01016 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_write_coefficients <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo, +01017 <a class="code" href="class_jvirt_barray_control.html">jvirt_barray_ptr</a> * coef_arrays)); +01018 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_copy_critical_parameters <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> srcinfo, +01019 <a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> dstinfo)); +01020 +01021 <font class="comment">/* If you choose to abort compression or decompression before completing +</font>01022 <font class="comment"> * jpeg_finish_(de)compress, then you need to clean up to release memory, +</font>01023 <font class="comment"> * temporary files, etc. You can just call jpeg_destroy_(de)compress +</font>01024 <font class="comment"> * if you're done with the JPEG object, but if you want to clean it up and +</font>01025 <font class="comment"> * reuse it, call this: +</font>01026 <font class="comment"> */</font> +01027 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_abort_compress <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_compress_struct.html">j_compress_ptr</a> cinfo)); +01028 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_abort_decompress <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo)); +01029 +01030 <font class="comment">/* Generic versions of jpeg_abort and jpeg_destroy that work on either +</font>01031 <font class="comment"> * flavor of JPEG object. These may be more convenient in some places. +</font>01032 <font class="comment"> */</font> +01033 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_abort <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo)); +01034 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(<font class="keywordtype">void</font>) jpeg_destroy <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_common_struct.html">j_common_ptr</a> cinfo)); +01035 +01036 <font class="comment">/* Default restart-marker-resync procedure for use by data source modules */</font> +01037 <a class="code" href="jmorecfg_h.html#a10">EXTERN</a>(boolean) jpeg_resync_to_restart <a class="code" href="jpeglib_h.html#a18">JPP</a>((<a class="code" href="class_jpeg_decompress_struct.html">j_decompress_ptr</a> cinfo, +01038 <font class="keywordtype">int</font> desired)); +01039 +01040 +01041 <font class="comment">/* These marker codes are exported since applications and data source modules +</font>01042 <font class="comment"> * are likely to want to use them. +</font>01043 <font class="comment"> */</font> +01044 +<a name="l01045"></a><a class="code" href="jpeglib_h.html#a28">01045</a> <font class="preprocessor">#define JPEG_RST0 0xD0 </font><font class="comment">/* RST0 marker code */</font> +<a name="l01046"></a><a class="code" href="jpeglib_h.html#a29">01046</a> <font class="preprocessor">#define JPEG_EOI 0xD9 </font><font class="comment">/* EOI marker code */</font> +<a name="l01047"></a><a class="code" href="jpeglib_h.html#a30">01047</a> <font class="preprocessor">#define JPEG_APP0 0xE0 </font><font class="comment">/* APP0 marker code */</font> +<a name="l01048"></a><a class="code" href="jpeglib_h.html#a31">01048</a> <font class="preprocessor">#define JPEG_COM 0xFE </font><font class="comment">/* COM marker code */</font> +01049 +01050 +01051 <font class="comment">/* If we have a brain-damaged compiler that emits warnings (or worse, errors) +</font>01052 <font class="comment"> * for structure definitions that are never filled in, keep it quiet by +</font>01053 <font class="comment"> * supplying dummy definitions for the various substructures. +</font>01054 <font class="comment"> */</font> +01055 +01056 <font class="preprocessor">#ifdef INCOMPLETE_TYPES_BROKEN +</font>01057 <font class="preprocessor"></font><font class="preprocessor">#ifndef JPEG_INTERNALS </font><font class="comment">/* will be defined in jpegint.h */</font> +01058 <font class="keyword">struct </font><a class="code" href="class_jvirt_sarray_control.html">jvirt_sarray_control</a> { <font class="keywordtype">long</font> dummy; }; +01059 <font class="keyword">struct </font><a class="code" href="class_jvirt_barray_control.html">jvirt_barray_control</a> { <font class="keywordtype">long</font> dummy; }; +01060 <font class="keyword">struct </font><a class="code" href="class_jpeg_comp_master.html">jpeg_comp_master</a> { <font class="keywordtype">long</font> dummy; }; +01061 <font class="keyword">struct </font><a class="code" href="class_jpeg_c_main_controller.html">jpeg_c_main_controller</a> { <font class="keywordtype">long</font> dummy; }; +01062 <font class="keyword">struct </font><a class="code" href="class_jpeg_c_prep_controller.html">jpeg_c_prep_controller</a> { <font class="keywordtype">long</font> dummy; }; +01063 <font class="keyword">struct </font><a class="code" href="class_jpeg_c_coef_controller.html">jpeg_c_coef_controller</a> { <font class="keywordtype">long</font> dummy; }; +01064 <font class="keyword">struct </font><a class="code" href="class_jpeg_marker_writer.html">jpeg_marker_writer</a> { <font class="keywordtype">long</font> dummy; }; +01065 <font class="keyword">struct </font><a class="code" href="class_jpeg_color_converter.html">jpeg_color_converter</a> { <font class="keywordtype">long</font> dummy; }; +01066 <font class="keyword">struct </font><a class="code" href="class_jpeg_downsampler.html">jpeg_downsampler</a> { <font class="keywordtype">long</font> dummy; }; +01067 <font class="keyword">struct </font><a class="code" href="class_jpeg_forward_dct.html">jpeg_forward_dct</a> { <font class="keywordtype">long</font> dummy; }; +01068 <font class="keyword">struct </font><a class="code" href="class_jpeg_entropy_encoder.html">jpeg_entropy_encoder</a> { <font class="keywordtype">long</font> dummy; }; +01069 <font class="keyword">struct </font><a class="code" href="class_jpeg_decomp_master.html">jpeg_decomp_master</a> { <font class="keywordtype">long</font> dummy; }; +01070 <font class="keyword">struct </font><a class="code" href="class_jpeg_d_main_controller.html">jpeg_d_main_controller</a> { <font class="keywordtype">long</font> dummy; }; +01071 <font class="keyword">struct </font><a class="code" href="class_jpeg_d_coef_controller.html">jpeg_d_coef_controller</a> { <font class="keywordtype">long</font> dummy; }; +01072 <font class="keyword">struct </font><a class="code" href="class_jpeg_d_post_controller.html">jpeg_d_post_controller</a> { <font class="keywordtype">long</font> dummy; }; +01073 <font class="keyword">struct </font><a class="code" href="class_jpeg_input_controller.html">jpeg_input_controller</a> { <font class="keywordtype">long</font> dummy; }; +01074 <font class="keyword">struct </font><a class="code" href="class_jpeg_marker_reader.html">jpeg_marker_reader</a> { <font class="keywordtype">long</font> dummy; }; +01075 <font class="keyword">struct </font><a class="code" href="class_jpeg_entropy_decoder.html">jpeg_entropy_decoder</a> { <font class="keywordtype">long</font> dummy; }; +01076 <font class="keyword">struct </font><a class="code" href="class_jpeg_inverse_dct.html">jpeg_inverse_dct</a> { <font class="keywordtype">long</font> dummy; }; +01077 <font class="keyword">struct </font><a class="code" href="class_jpeg_upsampler.html">jpeg_upsampler</a> { <font class="keywordtype">long</font> dummy; }; +01078 <font class="keyword">struct </font><a class="code" href="class_jpeg_color_deconverter.html">jpeg_color_deconverter</a> { <font class="keywordtype">long</font> dummy; }; +01079 <font class="keyword">struct </font><a class="code" href="class_jpeg_color_quantizer.html">jpeg_color_quantizer</a> { <font class="keywordtype">long</font> dummy; }; +01080 <font class="preprocessor">#endif </font><font class="comment">/* JPEG_INTERNALS */</font> +01081 <font class="preprocessor">#endif </font><font class="comment">/* INCOMPLETE_TYPES_BROKEN */</font> +01082 +01083 +01084 <font class="comment">/* +</font>01085 <font class="comment"> * The JPEG library modules define JPEG_INTERNALS before including this file. +</font>01086 <font class="comment"> * The internal structure declarations are read only when that is true. +</font>01087 <font class="comment"> * Applications using the library should not include jpegint.h, but may wish +</font>01088 <font class="comment"> * to include jerror.h. +</font>01089 <font class="comment"> */</font> +01090 +01091 <font class="preprocessor">#ifdef JPEG_INTERNALS +</font>01092 <font class="preprocessor"></font><font class="preprocessor">#include "<a class="code" href="jpegint_h.html">jpegint.h</a>"</font> <font class="comment">/* fetch private declarations */</font> +01093 <font class="preprocessor">#include "<a class="code" href="jerror_h.html">jerror.h</a>"</font> <font class="comment">/* fetch error codes too */</font> +01094 <font class="preprocessor">#endif +</font>01095 <font class="preprocessor"></font> +01096 <font class="preprocessor">#endif </font><font class="comment">/* JPEGLIB_H */</font> +</div></pre> + +<!-- footer --> +<BR><FONT Size=+5> </FONT> +</TD> +<TD WIDTH=15><IMG SRC=http://www.nevrax.org/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD> +</TR> +</TABLE> +</BODY> +</HTML> |