blob: d2b499faef13582128d92e0c65b6fb1da48d6adf [file] [log] [blame]
Pierre Ossman2ae181c2009-03-09 13:21:27 +00001// This file generates the include file for the assembly
2// implementations by abusing the C preprocessor.
Pierre Ossman5eb84ff2009-03-09 13:25:30 +00003//
4// Note: Some things are manually defined as they need to
5// be mapped to NASM types.
Pierre Ossman2ae181c2009-03-09 13:21:27 +00006
7;
8; Automatically generated include file from jsimdcfg.inc.h
9;
10
11#define JPEG_INTERNALS
12
13#include "../jpeglib.h"
14#include "../jconfig.h"
15#include "../jmorecfg.h"
16#include "jsimd.h"
17
Pierre Ossman2ae181c2009-03-09 13:21:27 +000018;
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000019; -- jpeglib.h
20;
21
DRC112a0bb2012-06-28 23:25:34 +000022%define _cpp_protection_DCTSIZE DCTSIZE
23%define _cpp_protection_DCTSIZE2 DCTSIZE2
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000024
25;
26; -- jmorecfg.h
27;
28
DRC112a0bb2012-06-28 23:25:34 +000029%define _cpp_protection_RGB_RED RGB_RED
30%define _cpp_protection_RGB_GREEN RGB_GREEN
31%define _cpp_protection_RGB_BLUE RGB_BLUE
32%define _cpp_protection_RGB_PIXELSIZE RGB_PIXELSIZE
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000033
DRC112a0bb2012-06-28 23:25:34 +000034%define _cpp_protection_EXT_RGB_RED EXT_RGB_RED
35%define _cpp_protection_EXT_RGB_GREEN EXT_RGB_GREEN
36%define _cpp_protection_EXT_RGB_BLUE EXT_RGB_BLUE
37%define _cpp_protection_EXT_RGB_PIXELSIZE EXT_RGB_PIXELSIZE
DRCb4570bb2011-09-07 06:31:00 +000038
DRC112a0bb2012-06-28 23:25:34 +000039%define _cpp_protection_EXT_RGBX_RED EXT_RGBX_RED
40%define _cpp_protection_EXT_RGBX_GREEN EXT_RGBX_GREEN
41%define _cpp_protection_EXT_RGBX_BLUE EXT_RGBX_BLUE
42%define _cpp_protection_EXT_RGBX_PIXELSIZE EXT_RGBX_PIXELSIZE
DRCb4570bb2011-09-07 06:31:00 +000043
DRC112a0bb2012-06-28 23:25:34 +000044%define _cpp_protection_EXT_BGR_RED EXT_BGR_RED
45%define _cpp_protection_EXT_BGR_GREEN EXT_BGR_GREEN
46%define _cpp_protection_EXT_BGR_BLUE EXT_BGR_BLUE
47%define _cpp_protection_EXT_BGR_PIXELSIZE EXT_BGR_PIXELSIZE
DRCb4570bb2011-09-07 06:31:00 +000048
DRC112a0bb2012-06-28 23:25:34 +000049%define _cpp_protection_EXT_BGRX_RED EXT_BGRX_RED
50%define _cpp_protection_EXT_BGRX_GREEN EXT_BGRX_GREEN
51%define _cpp_protection_EXT_BGRX_BLUE EXT_BGRX_BLUE
52%define _cpp_protection_EXT_BGRX_PIXELSIZE EXT_BGRX_PIXELSIZE
DRCb4570bb2011-09-07 06:31:00 +000053
DRC112a0bb2012-06-28 23:25:34 +000054%define _cpp_protection_EXT_XBGR_RED EXT_XBGR_RED
55%define _cpp_protection_EXT_XBGR_GREEN EXT_XBGR_GREEN
56%define _cpp_protection_EXT_XBGR_BLUE EXT_XBGR_BLUE
57%define _cpp_protection_EXT_XBGR_PIXELSIZE EXT_XBGR_PIXELSIZE
DRCb4570bb2011-09-07 06:31:00 +000058
DRC112a0bb2012-06-28 23:25:34 +000059%define _cpp_protection_EXT_XRGB_RED EXT_XRGB_RED
60%define _cpp_protection_EXT_XRGB_GREEN EXT_XRGB_GREEN
61%define _cpp_protection_EXT_XRGB_BLUE EXT_XRGB_BLUE
62%define _cpp_protection_EXT_XRGB_PIXELSIZE EXT_XRGB_PIXELSIZE
DRCb4570bb2011-09-07 06:31:00 +000063
DRCc08e8c12011-09-08 23:54:40 +000064%define RGBX_FILLER_0XFF 1
65
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000066; Representation of a single sample (pixel element value).
67; On this SIMD implementation, this must be 'unsigned char'.
68;
69
70%define JSAMPLE byte ; unsigned char
71%define SIZEOF_JSAMPLE SIZEOF_BYTE ; sizeof(JSAMPLE)
72
DRC112a0bb2012-06-28 23:25:34 +000073%define _cpp_protection_CENTERJSAMPLE CENTERJSAMPLE
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000074
75; Representation of a DCT frequency coefficient.
76; On this SIMD implementation, this must be 'short'.
77;
78%define JCOEF word ; short
79%define SIZEOF_JCOEF SIZEOF_WORD ; sizeof(JCOEF)
80
81; Datatype used for image dimensions.
82; On this SIMD implementation, this must be 'unsigned int'.
83;
84%define JDIMENSION dword ; unsigned int
85%define SIZEOF_JDIMENSION SIZEOF_DWORD ; sizeof(JDIMENSION)
86
DRC5033f3e2014-05-18 18:33:44 +000087%define JSAMPROW POINTER ; JSAMPLE * (jpeglib.h)
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000088%define JSAMPARRAY POINTER ; JSAMPROW * (jpeglib.h)
89%define JSAMPIMAGE POINTER ; JSAMPARRAY * (jpeglib.h)
DRC5033f3e2014-05-18 18:33:44 +000090%define JCOEFPTR POINTER ; JCOEF * (jpeglib.h)
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000091%define SIZEOF_JSAMPROW SIZEOF_POINTER ; sizeof(JSAMPROW)
92%define SIZEOF_JSAMPARRAY SIZEOF_POINTER ; sizeof(JSAMPARRAY)
93%define SIZEOF_JSAMPIMAGE SIZEOF_POINTER ; sizeof(JSAMPIMAGE)
94%define SIZEOF_JCOEFPTR SIZEOF_POINTER ; sizeof(JCOEFPTR)
95
96;
97; -- jdct.h
98;
99
100; A forward DCT routine is given a pointer to a work area of type DCTELEM[];
101; the DCT is to be performed in-place in that buffer.
102; To maximize parallelism, Type DCTELEM is changed to short (originally, int).
103;
104%define DCTELEM word ; short
105%define SIZEOF_DCTELEM SIZEOF_WORD ; sizeof(DCTELEM)
106
Pierre Ossman65d03172009-03-09 13:28:10 +0000107%define FAST_FLOAT FP32 ; float
108%define SIZEOF_FAST_FLOAT SIZEOF_FP32 ; sizeof(FAST_FLOAT)
109
Pierre Ossman5eb84ff2009-03-09 13:25:30 +0000110; To maximize parallelism, Type MULTIPLIER is changed to short.
111;
112%define ISLOW_MULT_TYPE word ; must be short
113%define SIZEOF_ISLOW_MULT_TYPE SIZEOF_WORD ; sizeof(ISLOW_MULT_TYPE)
114
115%define IFAST_MULT_TYPE word ; must be short
116%define SIZEOF_IFAST_MULT_TYPE SIZEOF_WORD ; sizeof(IFAST_MULT_TYPE)
117%define IFAST_SCALE_BITS 2 ; fractional bits in scale factors
118
Pierre Ossman65d03172009-03-09 13:28:10 +0000119%define FLOAT_MULT_TYPE FP32 ; must be float
120%define SIZEOF_FLOAT_MULT_TYPE SIZEOF_FP32 ; sizeof(FLOAT_MULT_TYPE)
121
Pierre Ossman5eb84ff2009-03-09 13:25:30 +0000122;
Pierre Ossman2ae181c2009-03-09 13:21:27 +0000123; -- jsimd.h
124;
125
DRC112a0bb2012-06-28 23:25:34 +0000126%define _cpp_protection_JSIMD_NONE JSIMD_NONE
127%define _cpp_protection_JSIMD_MMX JSIMD_MMX
128%define _cpp_protection_JSIMD_3DNOW JSIMD_3DNOW
129%define _cpp_protection_JSIMD_SSE JSIMD_SSE
130%define _cpp_protection_JSIMD_SSE2 JSIMD_SSE2