comparison postproc/swscale.c @ 12301:b80f95e24c96

attribute_used patch by (matthieu castet <castet.matthieu at free dot fr>)
author michael
date Mon, 26 Apr 2004 19:38:17 +0000
parents 2ef24558b732
children b5c106b694e4
comparison
equal deleted inserted replaced
12300:95ea9f5f6f14 12301:b80f95e24c96
147 #define ABS(a) ((a) > 0 ? (a) : (-(a))) 147 #define ABS(a) ((a) > 0 ? (a) : (-(a)))
148 #define MIN(a,b) ((a) > (b) ? (b) : (a)) 148 #define MIN(a,b) ((a) > (b) ? (b) : (a))
149 #define MAX(a,b) ((a) < (b) ? (b) : (a)) 149 #define MAX(a,b) ((a) < (b) ? (b) : (a))
150 150
151 #ifdef ARCH_X86 151 #ifdef ARCH_X86
152 static uint64_t __attribute__((aligned(8))) bF8= 0xF8F8F8F8F8F8F8F8LL; 152 static uint64_t attribute_used __attribute__((aligned(8))) bF8= 0xF8F8F8F8F8F8F8F8LL;
153 static uint64_t __attribute__((aligned(8))) bFC= 0xFCFCFCFCFCFCFCFCLL; 153 static uint64_t attribute_used __attribute__((aligned(8))) bFC= 0xFCFCFCFCFCFCFCFCLL;
154 static uint64_t __attribute__((aligned(8))) w10= 0x0010001000100010LL; 154 static uint64_t __attribute__((aligned(8))) w10= 0x0010001000100010LL;
155 static uint64_t __attribute__((aligned(8))) w02= 0x0002000200020002LL; 155 static uint64_t attribute_used __attribute__((aligned(8))) w02= 0x0002000200020002LL;
156 static uint64_t __attribute__((aligned(8))) bm00001111=0x00000000FFFFFFFFLL; 156 static uint64_t attribute_used __attribute__((aligned(8))) bm00001111=0x00000000FFFFFFFFLL;
157 static uint64_t __attribute__((aligned(8))) bm00000111=0x0000000000FFFFFFLL; 157 static uint64_t attribute_used __attribute__((aligned(8))) bm00000111=0x0000000000FFFFFFLL;
158 static uint64_t __attribute__((aligned(8))) bm11111000=0xFFFFFFFFFF000000LL; 158 static uint64_t attribute_used __attribute__((aligned(8))) bm11111000=0xFFFFFFFFFF000000LL;
159 static uint64_t __attribute__((aligned(8))) bm01010101=0x00FF00FF00FF00FFLL; 159 static uint64_t attribute_used __attribute__((aligned(8))) bm01010101=0x00FF00FF00FF00FFLL;
160 160
161 static volatile uint64_t __attribute__((aligned(8))) b5Dither; 161 static volatile uint64_t attribute_used __attribute__((aligned(8))) b5Dither;
162 static volatile uint64_t __attribute__((aligned(8))) g5Dither; 162 static volatile uint64_t attribute_used __attribute__((aligned(8))) g5Dither;
163 static volatile uint64_t __attribute__((aligned(8))) g6Dither; 163 static volatile uint64_t attribute_used __attribute__((aligned(8))) g6Dither;
164 static volatile uint64_t __attribute__((aligned(8))) r5Dither; 164 static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither;
165 165
166 static uint64_t __attribute__((aligned(8))) dither4[2]={ 166 static uint64_t __attribute__((aligned(8))) dither4[2]={
167 0x0103010301030103LL, 167 0x0103010301030103LL,
168 0x0200020002000200LL,}; 168 0x0200020002000200LL,};
169 169
170 static uint64_t __attribute__((aligned(8))) dither8[2]={ 170 static uint64_t __attribute__((aligned(8))) dither8[2]={
171 0x0602060206020602LL, 171 0x0602060206020602LL,
172 0x0004000400040004LL,}; 172 0x0004000400040004LL,};
173 173
174 static uint64_t __attribute__((aligned(8))) b16Mask= 0x001F001F001F001FLL; 174 static uint64_t __attribute__((aligned(8))) b16Mask= 0x001F001F001F001FLL;
175 static uint64_t __attribute__((aligned(8))) g16Mask= 0x07E007E007E007E0LL; 175 static uint64_t attribute_used __attribute__((aligned(8))) g16Mask= 0x07E007E007E007E0LL;
176 static uint64_t __attribute__((aligned(8))) r16Mask= 0xF800F800F800F800LL; 176 static uint64_t attribute_used __attribute__((aligned(8))) r16Mask= 0xF800F800F800F800LL;
177 static uint64_t __attribute__((aligned(8))) b15Mask= 0x001F001F001F001FLL; 177 static uint64_t __attribute__((aligned(8))) b15Mask= 0x001F001F001F001FLL;
178 static uint64_t __attribute__((aligned(8))) g15Mask= 0x03E003E003E003E0LL; 178 static uint64_t attribute_used __attribute__((aligned(8))) g15Mask= 0x03E003E003E003E0LL;
179 static uint64_t __attribute__((aligned(8))) r15Mask= 0x7C007C007C007C00LL; 179 static uint64_t attribute_used __attribute__((aligned(8))) r15Mask= 0x7C007C007C007C00LL;
180 180
181 static uint64_t __attribute__((aligned(8))) M24A= 0x00FF0000FF0000FFLL; 181 static uint64_t attribute_used __attribute__((aligned(8))) M24A= 0x00FF0000FF0000FFLL;
182 static uint64_t __attribute__((aligned(8))) M24B= 0xFF0000FF0000FF00LL; 182 static uint64_t attribute_used __attribute__((aligned(8))) M24B= 0xFF0000FF0000FF00LL;
183 static uint64_t __attribute__((aligned(8))) M24C= 0x0000FF0000FF0000LL; 183 static uint64_t attribute_used __attribute__((aligned(8))) M24C= 0x0000FF0000FF0000LL;
184 184
185 #ifdef FAST_BGR2YV12 185 #ifdef FAST_BGR2YV12
186 static const uint64_t bgr2YCoeff __attribute__((aligned(8))) = 0x000000210041000DULL; 186 static const uint64_t bgr2YCoeff attribute_used __attribute__((aligned(8))) = 0x000000210041000DULL;
187 static const uint64_t bgr2UCoeff __attribute__((aligned(8))) = 0x0000FFEEFFDC0038ULL; 187 static const uint64_t bgr2UCoeff attribute_used __attribute__((aligned(8))) = 0x0000FFEEFFDC0038ULL;
188 static const uint64_t bgr2VCoeff __attribute__((aligned(8))) = 0x00000038FFD2FFF8ULL; 188 static const uint64_t bgr2VCoeff attribute_used __attribute__((aligned(8))) = 0x00000038FFD2FFF8ULL;
189 #else 189 #else
190 static const uint64_t bgr2YCoeff __attribute__((aligned(8))) = 0x000020E540830C8BULL; 190 static const uint64_t bgr2YCoeff attribute_used __attribute__((aligned(8))) = 0x000020E540830C8BULL;
191 static const uint64_t bgr2UCoeff __attribute__((aligned(8))) = 0x0000ED0FDAC23831ULL; 191 static const uint64_t bgr2UCoeff attribute_used __attribute__((aligned(8))) = 0x0000ED0FDAC23831ULL;
192 static const uint64_t bgr2VCoeff __attribute__((aligned(8))) = 0x00003831D0E6F6EAULL; 192 static const uint64_t bgr2VCoeff attribute_used __attribute__((aligned(8))) = 0x00003831D0E6F6EAULL;
193 #endif 193 #endif
194 static const uint64_t bgr2YOffset __attribute__((aligned(8))) = 0x1010101010101010ULL; 194 static const uint64_t bgr2YOffset attribute_used __attribute__((aligned(8))) = 0x1010101010101010ULL;
195 static const uint64_t bgr2UVOffset __attribute__((aligned(8)))= 0x8080808080808080ULL; 195 static const uint64_t bgr2UVOffset attribute_used __attribute__((aligned(8)))= 0x8080808080808080ULL;
196 static const uint64_t w1111 __attribute__((aligned(8))) = 0x0001000100010001ULL; 196 static const uint64_t w1111 attribute_used __attribute__((aligned(8))) = 0x0001000100010001ULL;
197 #endif 197 #endif
198 198
199 // clipping helper table for C implementations: 199 // clipping helper table for C implementations:
200 static unsigned char clip_table[768]; 200 static unsigned char clip_table[768];
201 201