Repo for the search and displace ingest module that takes odf, docx and pdf and transforms it into .md to be used with search and displace operations
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

219 lines
6.6 KiB

3 years ago
  1. unit imjmorecfg;
  2. { This file contains additional configuration options that customize the
  3. JPEG software for special applications or support machine-dependent
  4. optimizations. Most users will not need to touch this file. }
  5. { Source: jmorecfg.h; Copyright (C) 1991-1996, Thomas G. Lane. }
  6. interface
  7. {$I imjconfig.inc}
  8. type
  9. int = Integer;
  10. uInt = Cardinal;
  11. short = SmallInt;
  12. ushort = Word;
  13. long = LongInt;
  14. type
  15. voidp = pointer;
  16. type
  17. int_ptr = ^int;
  18. size_t = int;
  19. { Define BITS_IN_JSAMPLE as either
  20. 8 for 8-bit sample values (the usual setting)
  21. 12 for 12-bit sample values
  22. Only 8 and 12 are legal data precisions for lossy JPEG according to the
  23. JPEG standard, and the IJG code does not support anything else!
  24. We do not support run-time selection of data precision, sorry. }
  25. {$ifdef BITS_IN_JSAMPLE_IS_8} { use 8 or 12 }
  26. const
  27. BITS_IN_JSAMPLE = 8;
  28. {$else}
  29. const
  30. BITS_IN_JSAMPLE = 12;
  31. {$endif}
  32. { Maximum number of components (color channels) allowed in JPEG image.
  33. To meet the letter of the JPEG spec, set this to 255. However, darn
  34. few applications need more than 4 channels (maybe 5 for CMYK + alpha
  35. mask). We recommend 10 as a reasonable compromise; use 4 if you are
  36. really short on memory. (Each allowed component costs a hundred or so
  37. bytes of storage, whether actually used in an image or not.) }
  38. const
  39. MAX_COMPONENTS = 10; { maximum number of image components }
  40. { Basic data types.
  41. You may need to change these if you have a machine with unusual data
  42. type sizes; for example, "char" not 8 bits, "short" not 16 bits,
  43. or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits,
  44. but it had better be at least 16. }
  45. { Representation of a single sample (pixel element value).
  46. We frequently allocate large arrays of these, so it's important to keep
  47. them small. But if you have memory to burn and access to char or short
  48. arrays is very slow on your hardware, you might want to change these. }
  49. {$ifdef BITS_IN_JSAMPLE_IS_8}
  50. { JSAMPLE should be the smallest type that will hold the values 0..255.
  51. You can use a signed char by having GETJSAMPLE mask it with $FF. }
  52. { CHAR_IS_UNSIGNED }
  53. type
  54. JSAMPLE = byte; { Pascal unsigned char }
  55. GETJSAMPLE = int;
  56. const
  57. MAXJSAMPLE = 255;
  58. CENTERJSAMPLE = 128;
  59. {$endif}
  60. {$ifndef BITS_IN_JSAMPLE_IS_8}
  61. { JSAMPLE should be the smallest type that will hold the values 0..4095.
  62. On nearly all machines "short" will do nicely. }
  63. type
  64. JSAMPLE = short;
  65. GETJSAMPLE = int;
  66. const
  67. MAXJSAMPLE = 4095;
  68. CENTERJSAMPLE = 2048;
  69. {$endif} { BITS_IN_JSAMPLE = 12 }
  70. { Representation of a DCT frequency coefficient.
  71. This should be a signed value of at least 16 bits; "short" is usually OK.
  72. Again, we allocate large arrays of these, but you can change to int
  73. if you have memory to burn and "short" is really slow. }
  74. type
  75. JCOEF = int;
  76. JCOEF_PTR = ^JCOEF;
  77. { Compressed datastreams are represented as arrays of JOCTET.
  78. These must be EXACTLY 8 bits wide, at least once they are written to
  79. external storage. Note that when using the stdio data source/destination
  80. managers, this is also the data type passed to fread/fwrite. }
  81. type
  82. JOCTET = Byte;
  83. jTOctet = 0..(MaxInt div SizeOf(JOCTET))-1;
  84. JOCTET_FIELD = array[jTOctet] of JOCTET;
  85. JOCTET_FIELD_PTR = ^JOCTET_FIELD;
  86. JOCTETPTR = ^JOCTET;
  87. GETJOCTET = JOCTET; { A work around }
  88. { These typedefs are used for various table entries and so forth.
  89. They must be at least as wide as specified; but making them too big
  90. won't cost a huge amount of memory, so we don't provide special
  91. extraction code like we did for JSAMPLE. (In other words, these
  92. typedefs live at a different point on the speed/space tradeoff curve.) }
  93. { UINT8 must hold at least the values 0..255. }
  94. type
  95. UINT8 = Byte;
  96. { UINT16 must hold at least the values 0..65535. }
  97. UINT16 = Word;
  98. { INT16 must hold at least the values -32768..32767. }
  99. INT16 = SmallInt;
  100. { INT32 must hold at least signed 32-bit values. }
  101. INT32 = LongInt;
  102. type
  103. INT32PTR = ^INT32;
  104. { Datatype used for image dimensions. The JPEG standard only supports
  105. images up to 64K*64K due to 16-bit fields in SOF markers. Therefore
  106. "unsigned int" is sufficient on all machines. However, if you need to
  107. handle larger images and you don't mind deviating from the spec, you
  108. can change this datatype. }
  109. type
  110. JDIMENSION = uInt;
  111. const
  112. JPEG_MAX_DIMENSION = 65500; { a tad under 64K to prevent overflows }
  113. { Ordering of RGB data in scanlines passed to or from the application.
  114. If your application wants to deal with data in the order B,G,R, just
  115. change these macros. You can also deal with formats such as R,G,B,X
  116. (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing
  117. the offsets will also change the order in which colormap data is organized.
  118. RESTRICTIONS:
  119. 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
  120. 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
  121. useful if you are using JPEG color spaces other than YCbCr or grayscale.
  122. 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
  123. is not 3 (they don't understand about dummy color components!). So you
  124. can't use color quantization if you change that value. }
  125. {$ifdef RGB_RED_IS_0}
  126. const
  127. RGB_RED = 0; { Offset of Red in an RGB scanline element }
  128. RGB_GREEN = 1; { Offset of Green }
  129. RGB_BLUE = 2; { Offset of Blue }
  130. {$else}
  131. const
  132. RGB_RED = 2; { Offset of Red in an RGB scanline element }
  133. RGB_GREEN = 1; { Offset of Green }
  134. RGB_BLUE = 0; { Offset of Blue }
  135. {$endif}
  136. {$ifdef RGB_PIXELSIZE_IS_3}
  137. const
  138. RGB_PIXELSIZE = 3; { JSAMPLEs per RGB scanline element }
  139. {$else}
  140. const
  141. RGB_PIXELSIZE = ??; { Nomssi: deliberate syntax error. Set this value }
  142. {$endif}
  143. { Definitions for speed-related optimizations. }
  144. { On some machines (notably 68000 series) "int" is 32 bits, but multiplying
  145. two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER
  146. as short on such a machine. MULTIPLIER must be at least 16 bits wide. }
  147. type
  148. MULTIPLIER = int; { type for fastest integer multiply }
  149. { FAST_FLOAT should be either float or double, whichever is done faster
  150. by your compiler. (Note that this type is only used in the floating point
  151. DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
  152. Typically, float is faster in ANSI C compilers, while double is faster in
  153. pre-ANSI compilers (because they insist on converting to double anyway).
  154. The code below therefore chooses float if we have ANSI-style prototypes. }
  155. type
  156. FAST_FLOAT = double; {float}
  157. implementation
  158. end.