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