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