summaryrefslogtreecommitdiff
path: root/libavcodec/h264pred_template.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2011-05-11 08:30:02 -0400
committerAnton Khirnov <anton@khirnov.net>2011-05-11 15:48:51 +0200
commitd2bf42895ac30d228491a8a95a5908351dc32783 (patch)
treed4c1f410d146658494ed94970f369b4be658b107 /libavcodec/h264pred_template.c
parent36dc49b713f81708e5637c18748c6f666f732caa (diff)
h264pred: fix one more aliasing violation.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/h264pred_template.c')
-rw-r--r--libavcodec/h264pred_template.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/h264pred_template.c b/libavcodec/h264pred_template.c
index c600133346..1c1fe0bc31 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
}