]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264pred_template.c
swscale: use standard clipping functions.
[ffmpeg] / libavcodec / h264pred_template.c
index c60013334685aa59a69f22504aad549d646fbdac..1c1fe0bc31c3963e97ee954740dc34c77143c65e 100644 (file)
@@ -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
 }