1 /* 2 Header definitions for the x86 routines for the HERMES library 3 Copyright (c) 1998 Christian Nentwich (brn@eleet.mcb.at) 4 This source code is licensed under the GNU LGPL 5 6 Please refer to the file COPYING.LIB contained in the distribution for 7 licensing conditions 8 */ 9 10 #ifndef __HERMES_HEAD_X86__ 11 #define __HERMES_HEAD_X86__ 12 13 14 #ifdef X86_ASSEMBLER 15 16 /* If you can't stand IFDEFS, then close your eyes now, please :) */ 17 18 /* Ok, we start with normal function definitions */ 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 24 void STACKCALL ConvertX86(HermesConverterInterface *); 25 void STACKCALL ClearX86_32(HermesClearInterface *); 26 void STACKCALL ClearX86_24(HermesClearInterface *); 27 void STACKCALL ClearX86_16(HermesClearInterface *); 28 void STACKCALL ClearX86_8(HermesClearInterface *); 29 30 int STACKCALL Hermes_X86_CPU(); 31 32 void ConvertX86p32_32BGR888(); 33 void ConvertX86p32_32RGBA888(); 34 void ConvertX86p32_32BGRA888(); 35 void ConvertX86p32_24RGB888(); 36 void ConvertX86p32_24BGR888(); 37 void ConvertX86p32_16RGB565(); 38 void ConvertX86p32_16BGR565(); 39 void ConvertX86p32_16RGB555(); 40 void ConvertX86p32_16BGR555(); 41 void ConvertX86p32_8RGB332(); 42 43 void ConvertX86p16_32RGB888(); 44 void ConvertX86p16_32BGR888(); 45 void ConvertX86p16_32RGBA888(); 46 void ConvertX86p16_32BGRA888(); 47 void ConvertX86p16_24RGB888(); 48 void ConvertX86p16_24BGR888(); 49 void ConvertX86p16_16BGR565(); 50 void ConvertX86p16_16RGB555(); 51 void ConvertX86p16_16BGR555(); 52 void ConvertX86p16_8RGB332(); 53 54 void CopyX86p_4byte(); 55 void CopyX86p_3byte(); 56 void CopyX86p_2byte(); 57 void CopyX86p_1byte(); 58 59 void ConvertX86pI8_32(); 60 void ConvertX86pI8_24(); 61 void ConvertX86pI8_16(); 62 63 extern int ConvertX86p16_32RGB888_LUT_X86[512]; 64 extern int ConvertX86p16_32BGR888_LUT_X86[512]; 65 extern int ConvertX86p16_32RGBA888_LUT_X86[512]; 66 extern int ConvertX86p16_32BGRA888_LUT_X86[512]; 67 68 #ifdef __cplusplus 69 } 70 #endif 71 72 73 74 75 /* Now fix up the ELF underscore problem */ 76 77 #if (defined(__ELF__) && defined(__GNUC__)) || defined(__SUNPRO_C) 78 #ifdef __cplusplus 79 extern "C" { 80 #endif 81 82 extern int _Hermes_X86_CPU(); 83 84 extern void _ConvertX86(HermesConverterInterface *); 85 86 extern void _ConvertX86p32_32BGR888(); 87 extern void _ConvertX86p32_32RGBA888(); 88 extern void _ConvertX86p32_32BGRA888(); 89 extern void _ConvertX86p32_24RGB888(); 90 extern void _ConvertX86p32_24BGR888(); 91 extern void _ConvertX86p32_16RGB565(); 92 extern void _ConvertX86p32_16BGR565(); 93 extern void _ConvertX86p32_16RGB555(); 94 extern void _ConvertX86p32_16BGR555(); 95 extern void _ConvertX86p32_8RGB332(); 96 97 extern void _ConvertX86p16_16BGR565(); 98 extern void _ConvertX86p16_16RGB555(); 99 extern void _ConvertX86p16_16BGR555(); 100 extern void _ConvertX86p16_8RGB332(); 101 102 103 #define Hermes_X86_CPU _Hermes_X86_CPU 104 105 #define ConvertX86 _ConvertX86 106 107 #define ConvertX86p32_32BGR888 _ConvertX86p32_32BGR888 108 #define ConvertX86p32_32RGBA888 _ConvertX86p32_32RGBA888 109 #define ConvertX86p32_32BGRA888 _ConvertX86p32_32BGRA888 110 #define ConvertX86p32_24RGB888 _ConvertX86p32_24RGB888 111 #define ConvertX86p32_24BGR888 _ConvertX86p32_24BGR888 112 #define ConvertX86p32_16RGB565 _ConvertX86p32_16RGB565 113 #define ConvertX86p32_16BGR565 _ConvertX86p32_16BGR565 114 #define ConvertX86p32_16RGB555 _ConvertX86p32_16RGB555 115 #define ConvertX86p32_16BGR555 _ConvertX86p32_16BGR555 116 #define ConvertX86p32_8RGB332 _ConvertX86p32_8RGB332 117 118 #define ConvertX86p16_16BGR565 _ConvertX86p16_16BGR565 119 #define ConvertX86p16_16RGB555 _ConvertX86p16_16RGB555 120 #define ConvertX86p16_16BGR555 _ConvertX86p16_16BGR555 121 #define ConvertX86p16_8RGB332 _ConvertX86p16_8RGB332 122 123 124 #ifdef __cplusplus 125 } 126 #endif 127 128 #endif /* ELF & GNU */ 129 130 131 132 /* Make it run with WATCOM C */ 133 #ifdef __WATCOMC__ 134 #pragma warning 601 9 135 136 #pragma aux Hermes_X86_CPU "_*" 137 138 #pragma aux ConvertX86 "_*" modify [EAX EBX ECX EDX ESI EDI] 139 #pragma aux ClearX86_32 "_*" modify [EAX EBX ECX EDX ESI EDI] 140 #pragma aux ClearX86_24 "_*" modify [EAX EBX ECX EDX ESI EDI] 141 #pragma aux ClearX86_16 "_*" modify [EAX EBX ECX EDX ESI EDI] 142 #pragma aux ClearX86_8 "_*" modify [EAX EBX ECX EDX ESI EDI] 143 144 #pragma aux ConvertX86p32_32BGR888 "_*" 145 #pragma aux ConvertX86p32_32RGBA888 "_*" 146 #pragma aux ConvertX86p32_32BGRA888 "_*" 147 #pragma aux ConvertX86p32_24RGB888 "_*" 148 #pragma aux ConvertX86p32_24BGR888 "_*" 149 #pragma aux ConvertX86p32_16RGB565 "_*" 150 #pragma aux ConvertX86p32_16BGR565 "_*" 151 #pragma aux ConvertX86p32_16RGB555 "_*" 152 #pragma aux ConvertX86p32_16BGR555 "_*" 153 #pragma aux ConvertX86p32_8RGB332 "_*" 154 155 #pragma aux ConvertX86p16_32RGB888 "_*" 156 #pragma aux ConvertX86p16_32BGR888 "_*" 157 #pragma aux ConvertX86p16_32RGBA888 "_*" 158 #pragma aux ConvertX86p16_32BGRA888 "_*" 159 #pragma aux ConvertX86p16_24RGB888 "_*" 160 #pragma aux ConvertX86p16_24BGR888 "_*" 161 #pragma aux ConvertX86p16_16BGR565 "_*" 162 #pragma aux ConvertX86p16_16RGB555 "_*" 163 #pragma aux ConvertX86p16_16BGR555 "_*" 164 #pragma aux ConvertX86p16_8RGB332 "_*" 165 166 #pragma aux CopyX86p_4byte "_*" 167 #pragma aux CopyX86p_3byte "_*" 168 #pragma aux CopyX86p_2byte "_*" 169 #pragma aux CopyX86p_1byte "_*" 170 171 #pragma aux ConvertX86pI8_32 "_*" 172 #pragma aux ConvertX86pI8_24 "_*" 173 #pragma aux ConvertX86pI8_16 "_*" 174 175 #pragma aux ConvertX86p16_32RGB888_LUT_X86 "_*" 176 #pragma aux ConvertX86p16_32BGR888_LUT_X86 "_*" 177 #pragma aux ConvertX86p16_32RGBA888_LUT_X86 "_*" 178 #pragma aux ConvertX86p16_32BGRA888_LUT_X86 "_*" 179 180 #endif /* __WATCOMC__ */ 181 182 183 #endif /* X86_ASSEMBLER */ 184 185 186 #endif 187