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.

109 lines
3.7 KiB

3 years ago
  1. unit imjdct;
  2. { Orignal: jdct.h; Copyright (C) 1994-1996, Thomas G. Lane. }
  3. { This include file contains common declarations for the forward and
  4. inverse DCT modules. These declarations are private to the DCT managers
  5. (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms.
  6. The individual DCT algorithms are kept in separate files to ease
  7. machine-dependent tuning (e.g., assembly coding). }
  8. interface
  9. {$I imjconfig.inc}
  10. uses
  11. imjmorecfg;
  12. { A forward DCT routine is given a pointer to a work area of type DCTELEM[];
  13. the DCT is to be performed in-place in that buffer. Type DCTELEM is int
  14. for 8-bit samples, INT32 for 12-bit samples. (NOTE: Floating-point DCT
  15. implementations use an array of type FAST_FLOAT, instead.)
  16. The DCT inputs are expected to be signed (range +-CENTERJSAMPLE).
  17. The DCT outputs are returned scaled up by a factor of 8; they therefore
  18. have a range of +-8K for 8-bit data, +-128K for 12-bit data. This
  19. convention improves accuracy in integer implementations and saves some
  20. work in floating-point ones.
  21. Quantization of the output coefficients is done by jcdctmgr.c. }
  22. {$ifdef BITS_IN_JSAMPLE_IS_8}
  23. type
  24. DCTELEM = int; { 16 or 32 bits is fine }
  25. {$else}
  26. type { must have 32 bits }
  27. DCTELEM = INT32;
  28. {$endif}
  29. type
  30. jTDctElem = 0..(MaxInt div SizeOf(DCTELEM))-1;
  31. DCTELEM_FIELD = array[jTDctElem] of DCTELEM;
  32. DCTELEM_FIELD_PTR = ^DCTELEM_FIELD;
  33. DCTELEMPTR = ^DCTELEM;
  34. type
  35. forward_DCT_method_ptr = procedure(var data : array of DCTELEM);
  36. float_DCT_method_ptr = procedure(var data : array of FAST_FLOAT);
  37. { An inverse DCT routine is given a pointer to the input JBLOCK and a pointer
  38. to an output sample array. The routine must dequantize the input data as
  39. well as perform the IDCT; for dequantization, it uses the multiplier table
  40. pointed to by compptr->dct_table. The output data is to be placed into the
  41. sample array starting at a specified column. (Any row offset needed will
  42. be applied to the array pointer before it is passed to the IDCT code.)
  43. Note that the number of samples emitted by the IDCT routine is
  44. DCT_scaled_size * DCT_scaled_size. }
  45. { typedef inverse_DCT_method_ptr is declared in jpegint.h }
  46. { Each IDCT routine has its own ideas about the best dct_table element type. }
  47. type
  48. ISLOW_MULT_TYPE = MULTIPLIER; { short or int, whichever is faster }
  49. {$ifdef BITS_IN_JSAMPLE_IS_8}
  50. type
  51. IFAST_MULT_TYPE = MULTIPLIER; { 16 bits is OK, use short if faster }
  52. const
  53. IFAST_SCALE_BITS = 2; { fractional bits in scale factors }
  54. {$else}
  55. type
  56. IFAST_MULT_TYPE = INT32; { need 32 bits for scaled quantizers }
  57. const
  58. IFAST_SCALE_BITS = 13; { fractional bits in scale factors }
  59. {$endif}
  60. type
  61. FLOAT_MULT_TYPE = FAST_FLOAT; { preferred floating type }
  62. const
  63. RANGE_MASK = (MAXJSAMPLE * 4 + 3); { 2 bits wider than legal samples }
  64. type
  65. jTMultType = 0..(MaxInt div SizeOf(ISLOW_MULT_TYPE))-1;
  66. ISLOW_MULT_TYPE_FIELD = array[jTMultType] of ISLOW_MULT_TYPE;
  67. ISLOW_MULT_TYPE_FIELD_PTR = ^ISLOW_MULT_TYPE_FIELD;
  68. ISLOW_MULT_TYPE_PTR = ^ISLOW_MULT_TYPE;
  69. jTFloatType = 0..(MaxInt div SizeOf(FLOAT_MULT_TYPE))-1;
  70. FLOAT_MULT_TYPE_FIELD = array[jTFloatType] of FLOAT_MULT_TYPE;
  71. FLOAT_MULT_TYPE_FIELD_PTR = ^FLOAT_MULT_TYPE_FIELD;
  72. FLOAT_MULT_TYPE_PTR = ^FLOAT_MULT_TYPE;
  73. jTFastType = 0..(MaxInt div SizeOf(IFAST_MULT_TYPE))-1;
  74. IFAST_MULT_TYPE_FIELD = array[jTFastType] of IFAST_MULT_TYPE;
  75. IFAST_MULT_TYPE_FIELD_PTR = ^IFAST_MULT_TYPE_FIELD;
  76. IFAST_MULT_TYPE_PTR = ^IFAST_MULT_TYPE;
  77. type
  78. jTFastFloat = 0..(MaxInt div SizeOf(FAST_FLOAT))-1;
  79. FAST_FLOAT_FIELD = array[jTFastFloat] of FAST_FLOAT;
  80. FAST_FLOAT_FIELD_PTR = ^FAST_FLOAT_FIELD;
  81. FAST_FLOAT_PTR = ^FAST_FLOAT;
  82. implementation
  83. end.