Mercurial > libavcodec.hg
comparison dsputil.h @ 493:873b9075d853 libavcodec
move unaligned access macros to dsputil.h - added unaligned 32 bit store
author | bellard |
---|---|
date | Tue, 11 Jun 2002 13:43:27 +0000 |
parents | a7cbee351b55 |
children | c0005de2be59 |
comparison
equal
deleted
inserted
replaced
492:de11e138a661 | 493:873b9075d853 |
---|---|
166 | 166 |
167 #define __align8 | 167 #define __align8 |
168 | 168 |
169 #endif | 169 #endif |
170 | 170 |
171 #ifdef __GNUC__ | |
172 | |
173 struct unaligned_64 { uint64_t l; } __attribute__((packed)); | |
174 struct unaligned_32 { uint32_t l; } __attribute__((packed)); | |
175 | |
176 #define LD32(a) (((const struct unaligned_32 *) (a))->l) | |
177 #define LD64(a) (((const struct unaligned_64 *) (a))->l) | |
178 | |
179 #define ST32(a, b) (((struct unaligned_32 *) (a))->l) = (b) | |
180 | |
181 #else /* __GNUC__ */ | |
182 | |
183 #define LD32(a) (*((uint32_t*)(a))) | |
184 #define LD64(a) (*((uint64_t*)(a))) | |
185 | |
186 #define ST32(a, b) *((uint32_t*)(a)) = (b) | |
187 | |
188 #endif /* !__GNUC__ */ | |
189 | |
171 /* PSNR */ | 190 /* PSNR */ |
172 void get_psnr(UINT8 *orig_image[3], UINT8 *coded_image[3], | 191 void get_psnr(UINT8 *orig_image[3], UINT8 *coded_image[3], |
173 int orig_linesize[3], int coded_linesize, | 192 int orig_linesize[3], int coded_linesize, |
174 AVCodecContext *avctx); | 193 AVCodecContext *avctx); |
175 | 194 |