Mercurial > libavcodec.hg
comparison dsputil.c @ 398:d7008d1c5bd0 libavcodec
fixing alignment for alignment picky cpus
author | michaelni |
---|---|
date | Sun, 19 May 2002 01:49:53 +0000 |
parents | fce0a2520551 |
children | 2c3e25f4c496 |
comparison
equal
deleted
inserted
replaced
397:8ca5969535ee | 398:d7008d1c5bd0 |
---|---|
247 pix += line_size; | 247 pix += line_size; |
248 p += 8; | 248 p += 8; |
249 } | 249 } |
250 } | 250 } |
251 | 251 |
252 //FIXME someone with a alignemtent picky cpu should change these | 252 #ifdef __GNUC__ |
253 | |
254 struct unaligned_64 { uint64_t l; } __attribute__((packed)); | |
255 struct unaligned_32 { uint32_t l; } __attribute__((packed)); | |
256 | |
257 #define LD32(a) (((const struct unaligned_32 *) (a))->l) | |
258 #define LD64(a) (((const struct unaligned_64 *) (a))->l) | |
259 | |
260 #else /* __GNUC__ */ | |
253 | 261 |
254 #define LD32(a) (*((uint32_t*)(a))) | 262 #define LD32(a) (*((uint32_t*)(a))) |
255 #define LD64(a) (*((uint64_t*)(a))) | 263 #define LD64(a) (*((uint64_t*)(a))) |
264 | |
265 #endif /* !__GNUC__ */ | |
256 | 266 |
257 #if 0 | 267 #if 0 |
258 | 268 |
259 #define PIXOP2(OPNAME, OP) \ | 269 #define PIXOP2(OPNAME, OP) \ |
260 void OPNAME ## _pixels(uint8_t *block, const uint8_t *pixels, int line_size, int h)\ | 270 void OPNAME ## _pixels(uint8_t *block, const uint8_t *pixels, int line_size, int h)\ |