summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-02-18 16:24:31 +0000
committerMåns Rullgård <mans@mansr.com>2010-02-18 16:24:31 +0000
commit19769ece3bd99b7570f39c9c605bee1bbada2b57 (patch)
treedb19c1e9e60ff41d57dfd1a76a4eb08509f924f6 /libavcodec/h264.c
parentf4a7434f16afc4616a34a7cd1bd8e592ed04e89f (diff)
H264: use alias-safe macros
This eliminates all aliasing violation warnings in h264 code. No measurable speed difference with gcc-4.4.3 on i7. Originally committed as revision 21881 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index f0abd6bc00..97c97ba7a1 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -156,11 +156,11 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_l
# if HAVE_FAST_64BIT
# define RS 7
for(i=0; i+1<length; i+=9){
- if(!((~*(const uint64_t*)(src+i) & (*(const uint64_t*)(src+i) - 0x0100010001000101ULL)) & 0x8000800080008080ULL))
+ if(!((~AV_RN64A(src+i) & (AV_RN64A(src+i) - 0x0100010001000101ULL)) & 0x8000800080008080ULL))
# else
# define RS 3
for(i=0; i+1<length; i+=5){
- if(!((~*(const uint32_t*)(src+i) & (*(const uint32_t*)(src+i) - 0x01000101U)) & 0x80008080U))
+ if(!((~AV_RN32A(src+i) & (AV_RN32A(src+i) - 0x01000101U)) & 0x80008080U))
# endif
continue;
if(i>0 && !src[i]) i--;