summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_common.h
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2010-06-30 01:47:42 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-06-30 01:47:42 +0000
commit99267eb702d35b863e13fcb4fc829acbf7016e55 (patch)
tree8954cb1a10be868bade1750c6d1c68d9e9c1942f /libavcodec/mpegvideo_common.h
parentdd8e127a4d6235384f8f8e7f0edcbca5808e0964 (diff)
Fix strict-aliasing violations in MPV_motion_internal.
Patch by Eli Friedman, eli D friedman A gmail Originally committed as revision 23894 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo_common.h')
-rw-r--r--libavcodec/mpegvideo_common.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h
index 24cfa78849..25ecd94a7f 100644
--- a/libavcodec/mpegvideo_common.h
+++ b/libavcodec/mpegvideo_common.h
@@ -670,19 +670,19 @@ static av_always_inline void MPV_motion_internal(MpegEncContext *s,
}
if(mb_x==0 || IS_INTRA(s->current_picture.mb_type[xy-1])){
- *(int32_t*)mv_cache[1][0]= *(int32_t*)mv_cache[1][1];
- *(int32_t*)mv_cache[2][0]= *(int32_t*)mv_cache[2][1];
+ AV_COPY32(mv_cache[1][0], mv_cache[1][1]);
+ AV_COPY32(mv_cache[2][0], mv_cache[2][1]);
}else{
- *(int32_t*)mv_cache[1][0]= *(int32_t*)s->current_picture.motion_val[0][mot_xy-1];
- *(int32_t*)mv_cache[2][0]= *(int32_t*)s->current_picture.motion_val[0][mot_xy-1+mot_stride];
+ AV_COPY32(mv_cache[1][0], s->current_picture.motion_val[0][mot_xy-1]);
+ AV_COPY32(mv_cache[2][0], s->current_picture.motion_val[0][mot_xy-1+mot_stride]);
}
if(mb_x+1>=s->mb_width || IS_INTRA(s->current_picture.mb_type[xy+1])){
- *(int32_t*)mv_cache[1][3]= *(int32_t*)mv_cache[1][2];
- *(int32_t*)mv_cache[2][3]= *(int32_t*)mv_cache[2][2];
+ AV_COPY32(mv_cache[1][3], mv_cache[1][2]);
+ AV_COPY32(mv_cache[2][3], mv_cache[2][2]);
}else{
- *(int32_t*)mv_cache[1][3]= *(int32_t*)s->current_picture.motion_val[0][mot_xy+2];
- *(int32_t*)mv_cache[2][3]= *(int32_t*)s->current_picture.motion_val[0][mot_xy+2+mot_stride];
+ AV_COPY32(mv_cache[1][3], s->current_picture.motion_val[0][mot_xy+2]);
+ AV_COPY32(mv_cache[2][3], s->current_picture.motion_val[0][mot_xy+2+mot_stride]);
}
mx = 0;