diff options
author | Måns Rullgård <mans@mansr.com> | 2010-02-18 16:24:31 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2010-02-18 16:24:31 +0000 |
commit | 19769ece3bd99b7570f39c9c605bee1bbada2b57 (patch) | |
tree | db19c1e9e60ff41d57dfd1a76a4eb08509f924f6 /libavcodec/h264_mvpred.h | |
parent | f4a7434f16afc4616a34a7cd1bd8e592ed04e89f (diff) | |
download | ffmpeg-19769ece3bd99b7570f39c9c605bee1bbada2b57.tar.gz |
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_mvpred.h')
-rw-r--r-- | libavcodec/h264_mvpred.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264_mvpred.h b/libavcodec/h264_mvpred.h index 6404ab0bfc..4a6780a75e 100644 --- a/libavcodec/h264_mvpred.h +++ b/libavcodec/h264_mvpred.h @@ -58,7 +58,7 @@ static inline int fetch_diagonal_mv(H264Context *h, const int16_t **C, int i, in && h->ref_cache[list][scan8[0]-1] != PART_NOT_AVAILABLE){ const uint32_t *mb_types = s->current_picture_ptr->mb_type; const int16_t *mv; - *(uint32_t*)h->mv_cache[list][scan8[0]-2] = 0; + AV_ZERO32(h->mv_cache[list][scan8[0]-2]); *C = h->mv_cache[list][scan8[0]-2]; if(!MB_FIELD @@ -220,8 +220,8 @@ static inline void pred_pskip_motion(H264Context * const h, int * const mx, int tprintf(h->s.avctx, "pred_pskip: (%d) (%d) at %2d %2d\n", top_ref, left_ref, h->s.mb_x, h->s.mb_y); if(top_ref == PART_NOT_AVAILABLE || left_ref == PART_NOT_AVAILABLE - || !( top_ref | *(uint32_t*)h->mv_cache[0][ scan8[0] - 8 ]) - || !(left_ref | *(uint32_t*)h->mv_cache[0][ scan8[0] - 1 ])){ + || !( top_ref | AV_RN32A(h->mv_cache[0][ scan8[0] - 8 ])) + || !(left_ref | AV_RN32A(h->mv_cache[0][ scan8[0] - 1 ]))){ *mx = *my = 0; return; |