[FFmpeg-cvslog] h264pred: fix one more aliasing violation.

Ronald S. Bultje git at videolan.org
Thu May 12 04:55:14 CEST 2011


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Wed May 11 08:30:02 2011 -0400| [d2bf42895ac30d228491a8a95a5908351dc32783] | committer: Anton Khirnov

h264pred: fix one more aliasing violation.

Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d2bf42895ac30d228491a8a95a5908351dc32783
---

 libavcodec/h264pred_template.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/h264pred_template.c b/libavcodec/h264pred_template.c
index c600133..1c1fe0b 100644
--- a/libavcodec/h264pred_template.c
+++ b/libavcodec/h264pred_template.c
@@ -695,10 +695,12 @@ static void FUNCC(pred8x8l_horizontal)(uint8_t *_src, int has_topleft, int has_t
 {
     pixel *src = (pixel*)_src;
     int stride = _stride/sizeof(pixel);
+    pixel4 a;
 
     PREDICT_8x8_LOAD_LEFT;
-#define ROW(y) ((pixel4*)(src+y*stride))[0] =\
-               ((pixel4*)(src+y*stride))[1] = PIXEL_SPLAT_X4(l##y)
+#define ROW(y) a = PIXEL_SPLAT_X4(l##y); \
+               AV_WN4PA(src+y*stride, a); \
+               AV_WN4PA(src+y*stride+4, a);
     ROW(0); ROW(1); ROW(2); ROW(3); ROW(4); ROW(5); ROW(6); ROW(7);
 #undef ROW
 }



More information about the ffmpeg-cvslog mailing list