jsimdcfg.inc.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. * This file generates the include file for the assembly
  3. * implementations by abusing the C preprocessor.
  4. *
  5. * Note: Some things are manually defined as they need to
  6. * be mapped to NASM types.
  7. */
  8. ;
  9. ; Automatically generated include file from jsimdcfg.inc.h
  10. ;
  11. #define JPEG_INTERNALS
  12. #include "../src/jpeglib.h"
  13. #include "../jconfig.h"
  14. #include "../src/jmorecfg.h"
  15. #include "jsimd.h"
  16. ;
  17. ; -- jpeglib.h
  18. ;
  19. %define _cpp_protection_DCTSIZE DCTSIZE
  20. %define _cpp_protection_DCTSIZE2 DCTSIZE2
  21. ;
  22. ; -- jmorecfg.h
  23. ;
  24. %define _cpp_protection_RGB_RED RGB_RED
  25. %define _cpp_protection_RGB_GREEN RGB_GREEN
  26. %define _cpp_protection_RGB_BLUE RGB_BLUE
  27. %define _cpp_protection_RGB_PIXELSIZE RGB_PIXELSIZE
  28. %define _cpp_protection_EXT_RGB_RED EXT_RGB_RED
  29. %define _cpp_protection_EXT_RGB_GREEN EXT_RGB_GREEN
  30. %define _cpp_protection_EXT_RGB_BLUE EXT_RGB_BLUE
  31. %define _cpp_protection_EXT_RGB_PIXELSIZE EXT_RGB_PIXELSIZE
  32. %define _cpp_protection_EXT_RGBX_RED EXT_RGBX_RED
  33. %define _cpp_protection_EXT_RGBX_GREEN EXT_RGBX_GREEN
  34. %define _cpp_protection_EXT_RGBX_BLUE EXT_RGBX_BLUE
  35. %define _cpp_protection_EXT_RGBX_PIXELSIZE EXT_RGBX_PIXELSIZE
  36. %define _cpp_protection_EXT_BGR_RED EXT_BGR_RED
  37. %define _cpp_protection_EXT_BGR_GREEN EXT_BGR_GREEN
  38. %define _cpp_protection_EXT_BGR_BLUE EXT_BGR_BLUE
  39. %define _cpp_protection_EXT_BGR_PIXELSIZE EXT_BGR_PIXELSIZE
  40. %define _cpp_protection_EXT_BGRX_RED EXT_BGRX_RED
  41. %define _cpp_protection_EXT_BGRX_GREEN EXT_BGRX_GREEN
  42. %define _cpp_protection_EXT_BGRX_BLUE EXT_BGRX_BLUE
  43. %define _cpp_protection_EXT_BGRX_PIXELSIZE EXT_BGRX_PIXELSIZE
  44. %define _cpp_protection_EXT_XBGR_RED EXT_XBGR_RED
  45. %define _cpp_protection_EXT_XBGR_GREEN EXT_XBGR_GREEN
  46. %define _cpp_protection_EXT_XBGR_BLUE EXT_XBGR_BLUE
  47. %define _cpp_protection_EXT_XBGR_PIXELSIZE EXT_XBGR_PIXELSIZE
  48. %define _cpp_protection_EXT_XRGB_RED EXT_XRGB_RED
  49. %define _cpp_protection_EXT_XRGB_GREEN EXT_XRGB_GREEN
  50. %define _cpp_protection_EXT_XRGB_BLUE EXT_XRGB_BLUE
  51. %define _cpp_protection_EXT_XRGB_PIXELSIZE EXT_XRGB_PIXELSIZE
  52. %define RGBX_FILLER_0XFF 1
  53. ; Representation of a single sample (pixel element value).
  54. ; On this SIMD implementation, this must be 'unsigned char'.
  55. ;
  56. %define JSAMPLE byte ; unsigned char
  57. %define SIZEOF_JSAMPLE SIZEOF_BYTE ; sizeof(JSAMPLE)
  58. %define _cpp_protection_CENTERJSAMPLE CENTERJSAMPLE
  59. ; Representation of a DCT frequency coefficient.
  60. ; On this SIMD implementation, this must be 'short'.
  61. ;
  62. %define JCOEF word ; short
  63. %define SIZEOF_JCOEF SIZEOF_WORD ; sizeof(JCOEF)
  64. ; Datatype used for image dimensions.
  65. ; On this SIMD implementation, this must be 'unsigned int'.
  66. ;
  67. %define JDIMENSION dword ; unsigned int
  68. %define SIZEOF_JDIMENSION SIZEOF_DWORD ; sizeof(JDIMENSION)
  69. %define JSAMPROW POINTER ; JSAMPLE * (jpeglib.h)
  70. %define JSAMPARRAY POINTER ; JSAMPROW * (jpeglib.h)
  71. %define JSAMPIMAGE POINTER ; JSAMPARRAY * (jpeglib.h)
  72. %define JCOEFPTR POINTER ; JCOEF * (jpeglib.h)
  73. %define SIZEOF_JSAMPROW SIZEOF_POINTER ; sizeof(JSAMPROW)
  74. %define SIZEOF_JSAMPARRAY SIZEOF_POINTER ; sizeof(JSAMPARRAY)
  75. %define SIZEOF_JSAMPIMAGE SIZEOF_POINTER ; sizeof(JSAMPIMAGE)
  76. %define SIZEOF_JCOEFPTR SIZEOF_POINTER ; sizeof(JCOEFPTR)
  77. ;
  78. ; -- jdct.h
  79. ;
  80. ; A forward DCT routine is given a pointer to a work area of type DCTELEM[];
  81. ; the DCT is to be performed in-place in that buffer.
  82. ; To maximize parallelism, Type DCTELEM is changed to short (originally, int).
  83. ;
  84. %define DCTELEM word ; short
  85. %define SIZEOF_DCTELEM SIZEOF_WORD ; sizeof(DCTELEM)
  86. %define FAST_FLOAT FP32 ; float
  87. %define SIZEOF_FAST_FLOAT SIZEOF_FP32 ; sizeof(FAST_FLOAT)
  88. ; To maximize parallelism, Type MULTIPLIER is changed to short.
  89. ;
  90. %define ISLOW_MULT_TYPE word ; must be short
  91. %define SIZEOF_ISLOW_MULT_TYPE SIZEOF_WORD ; sizeof(ISLOW_MULT_TYPE)
  92. %define IFAST_MULT_TYPE word ; must be short
  93. %define SIZEOF_IFAST_MULT_TYPE SIZEOF_WORD ; sizeof(IFAST_MULT_TYPE)
  94. %define IFAST_SCALE_BITS 2 ; fractional bits in scale factors
  95. %define FLOAT_MULT_TYPE FP32 ; must be float
  96. %define SIZEOF_FLOAT_MULT_TYPE SIZEOF_FP32 ; sizeof(FLOAT_MULT_TYPE)
  97. ;
  98. ; -- jsimd.h
  99. ;
  100. %define _cpp_protection_JSIMD_NONE JSIMD_NONE
  101. %define _cpp_protection_JSIMD_MMX JSIMD_MMX
  102. %define _cpp_protection_JSIMD_3DNOW JSIMD_3DNOW
  103. %define _cpp_protection_JSIMD_SSE JSIMD_SSE
  104. %define _cpp_protection_JSIMD_SSE2 JSIMD_SSE2
  105. %define _cpp_protection_JSIMD_AVX2 JSIMD_AVX2