/* Representation of a single sample (pixel element value). *Wefrequentlyallocatelargearraysofthese,soit'simportanttokeep *themsmall.Butifyouhavememorytoburnandaccesstocharorshort *arraysisveryslowonyourhardware,youmightwanttochangethese.
*/
#if BITS_IN_JSAMPLE == 8 /* JSAMPLE should be the smallest type that will hold the values 0..255. *YoucanuseasignedcharbyhavingGETJSAMPLEmaskitwith0xFF.
*/
/* Representation of a DCT frequency coefficient. *Thisshouldbeasignedvalueofatleast16bits;"short"isusuallyOK. *Again,weallocatelargearraysofthese,butyoucanchangetoint *ifyouhavememorytoburnand"short"isreallyslow.
*/
typedefshort JCOEF;
/* Compressed datastreams are represented as arrays of JOCTET. *ThesemustbeEXACTLY8bitswide,atleastoncetheyarewrittento *externalstorage.Notethatwhenusingthestdiodatasource/destination *managers,thisisalsothedatatypepassedtofread/fwrite.
*/
/* These typedefs are used for various table entries and so forth. *Theymustbeatleastaswideasspecified;butmakingthemtoobig *won'tcostahugeamountofmemory,sowedon'tprovidespecial *extractioncodelikewedidforJSAMPLE.(Inotherwords,these *typedefsliveatadifferentpointonthespeed/spacetradeoffcurve.)
*/
/* INT32 must hold at least signed 32-bit values. */
#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ #ifdefined(_LP64) || defined(_WIN32) /* _WIN32 is on all windows platfroms (x86 and x64) */ typedefint INT32; #else typedeflong INT32; #endif #endif
/* Datatype used for image dimensions. The JPEG standard only supports *imagesupto64K*64Kdueto16-bitfieldsinSOFmarkers.Therefore *"unsignedint"issufficientonallmachines.However,ifyouneedto *handlelargerimagesandyoudon'tminddeviatingfromthespec,you *canchangethisdatatype.
*/
typedefunsignedint JDIMENSION;
#ifndef _LP64 #define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ #else #define JPEG_MAX_DIMENSION 65500/* a tad under 64K to prevent overflows */ #endif
/* These macros are used in all function definitions and extern declarations. *Youcouldmodifythemifyouneedtochangefunctionlinkageconventions; *inparticular,you'llneedtodothattomakethelibraryaWindowsDLL. *Anotherapplicationistomakeallfunctionsglobalforusewithdebuggers *orcodeprofilersthatrequireit.
*/
/* a function called through method pointers: */ #define METHODDEF(type) static type /* a function used only in its module: */ #define LOCAL(type) static type /* a function referenced thru EXTERNs: */ #define GLOBAL(type) type /* a reference to a GLOBAL function: */ #defineEXTERN(type) extern type
/* This macro is used to declare a "method", that is, a function pointer. *Wewanttosupplyprototypeparametersifthecompilercancope. *Notethatthearglistparametermustbeparenthesized! *Again,youcancustomizethisifyouneedspeciallinkagekeywords.
*/
#ifdef HAVE_PROTOTYPES #define JMETHOD(type,methodname,arglist) type (*methodname) arglist #else #define JMETHOD(type,methodname,arglist) type (*methodname) () #endif
/* Here is the pseudo-keyword for declaring pointers that must be "far" *on80x86machines.Mostofthespecializedcodingfor80x86ishandled *byjustsaying"FAR*"wheresuchapointerisneeded.Inafewplaces *explicitcodingisneeded;seeusesoftheNEED_FAR_POINTERSsymbol.
*/
#ifndef FAR #ifdef NEED_FAR_POINTERS #define FAR far #else #define FAR #endif #endif
/* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */
/* Capability options common to encoder and decoder: */
#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ #define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ #define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */
/* Encoder capability options: */
#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ #define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ #define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ #define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ /* Note: if you selected 12-bit data precision, it is dangerous to turn off *ENTROPY_OPT_SUPPORTED.ThestandardHuffmantablesareonlygoodfor8-bit *precision,sojchuff.cnormallyusesentropyoptimizationtocompute *usabletablesforhigherprecision.Ifyoudon'twanttodooptimization, *you'llhavetosupplydifferentdefaultHuffmantables. *TheexactsamestatementsapplyforprogressiveJPEG:thedefaulttables *don'tworkforprogressivemode.(Thismaygetfixed,however.)
*/ #define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */
#define RGB_RED 0/* Offset of Red in an RGB scanline element */ #define RGB_GREEN 1/* Offset of Green */ #define RGB_BLUE 2/* Offset of Blue */ #define RGB_PIXELSIZE 3/* JSAMPLEs per RGB scanline element */
/* Definitions for speed-related optimizations. */
/* If your compiler supports inline functions, define INLINE *astheinlinekeyword;otherwisedefineitasempty.
*/
#ifndefINLINE #ifdef __GNUC__ /* for instance, GNU C knows about inline */ #defineINLINE __inline__ #endif #ifndefINLINE #defineINLINE/* default is to define it as empty */ #endif #endif
/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying *two16-bitshortsisfasterthanmultiplyingtwoints.DefineMULTIPLIER *asshortonsuchamachine.MULTIPLIERmustbeatleast16bitswide.
*/
#ifndef MULTIPLIER #define MULTIPLIER int/* type for fastest integer multiply */ #endif
/* FAST_FLOAT should be either float or double, whichever is done faster *byyourcompiler.(Notethatthistypeisonlyusedinthefloatingpoint *DCTroutines,soitonlymattersifyou'vedefinedDCT_FLOAT_SUPPORTED.) *Typically,floatisfasterinANSICcompilers,whiledoubleisfasterin *pre-ANSIcompilers(becausetheyinsistonconvertingtodoubleanyway). *ThecodebelowthereforechoosesfloatifwehaveANSI-styleprototypes.
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.