Unit JmoreCfg |
Classes |
Functions |
Types |
FAST_FLOAT
FILEPTR
GETJOCTET
GETJSAMPLE
int
INT16
INT32
INT32PTR
int_ptr
JCOEF
JCOEF_PTR
JDIMENSION
JOCTET
JOCTETPTR
JOCTET_FIELD
JOCTET_FIELD_PTR
JSAMPLE
jTOctet
long
MULTIPLIER
short
size_t
uInt
UINT16
UINT8
ushort
Constants |
BITS_IN_JSAMPLE
CENTERJSAMPLE
JPEG_MAX_DIMENSION
MAXJSAMPLE
MAX_COMPONENTS
RGB_BLUE
RGB_GREEN
RGB_PIXELSIZE
RGB_RED
Variables |
Functions |
Types |
FAST_FLOAT = doubletype for fastest integer multiply } { FAST_FLOAT should be either float or double, whichever is done faster by your compiler. (Note that this type is only used in the floating point DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) Typically, float is faster in ANSI C compilers, while double is faster in pre-ANSI compilers (because they insist on converting to double anyway). The code below therefore chooses float if we have ANSI-style prototypes.
FILEPTR = ^fileNomssi
GETJOCTET = JOCTET
GETJSAMPLE = intPascal unsigned char
int = IntegerDelphi 2.0
INT16 = intINT16 must hold at least the values -32768..32767.
INT32 = longintINT32 must hold at least signed 32-bit values.
INT32PTR = ^INT32
int_ptr = ^int
JCOEF = intRepresentation of a DCT frequency coefficient. This should be a signed value of at least 16 bits; "short" is usually OK. Again, we allocate large arrays of these, but you can change to int if you have memory to burn and "short" is really slow.
JCOEF_PTR = ^JCOEF
JDIMENSION = uIntDatatype used for image dimensions. The JPEG standard only supports images up to 64K*64K due to 16-bit fields in SOF markers. Therefore "unsigned int" is sufficient on all machines. However, if you need to handle larger images and you don't mind deviating from the spec, you can change this datatype.
JOCTET = ByteCompressed datastreams are represented as arrays of JOCTET. These must be EXACTLY 8 bits wide, at least once they are written to external storage. Note that when using the stdio data source/destination managers, this is also the data type passed to fread/fwrite.
JOCTETPTR = ^JOCTET
JOCTET_FIELD = array[jTOctet] of JOCTET;
JOCTET_FIELD_PTR = ^JOCTET_FIELD
JSAMPLE = bytemaximum number of image components } { Basic data types. You may need to change these if you have a machine with unusual data type sizes; for example, "char" not 8 bits, "short" not 16 bits, or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, but it had better be at least 16. } { Representation of a single sample (pixel element value). We frequently allocate large arrays of these, so it's important to keep them small. But if you have memory to burn and access to char or short arrays is very slow on your hardware, you might want to change these. } { ifdef BITS_IN_JSAMPLE_IS_8} { JSAMPLE should be the smallest type that will hold the values 0..255. You can use a signed char by having GETJSAMPLE mask it with $FF. } { CHAR_IS_UNSIGNED
jTOctet = 0..(MaxInt div SizeOf(JOCTET))-1
long = longint
MULTIPLIER = intNomssi: deliberate syntax error. Set this value } {$endif} { Definitions for speed-related optimizations. } { On some machines (notably 68000 series) "int" is 32 bits, but multiplying two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER as short on such a machine. MULTIPLIER must be at least 16 bits wide.
short = SmallInt
size_t = int
uInt = Cardinal
UINT16 = WordUINT16 must hold at least the values 0..65535.
UINT8 = byteA work around } { These typedefs are used for various table entries and so forth. They must be at least as wide as specified; but making them too big won't cost a huge amount of memory, so we don't provide special extraction code like we did for JSAMPLE. (In other words, these typedefs live at a different point on the speed/space tradeoff curve.) } { UINT8 must hold at least the values 0..255.
ushort = Word
Constants |
Variables |