diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-12 21:03:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-13 18:40:17 +0200 |
commit | 62e5ef95cacb29b5ee3149792f12f9204dbd1655 (patch) | |
tree | cd7c340218ade71a7d427485d1a7f2eb664617c1 /libavutil/imgutils.c | |
parent | 41a052a6badc9ed672a810a40b8e54af5d093b5d (diff) | |
download | ffmpeg-streaming-62e5ef95cacb29b5ee3149792f12f9204dbd1655.zip ffmpeg-streaming-62e5ef95cacb29b5ee3149792f12f9204dbd1655.tar.gz |
av_image_alloc: Align the width to 8 when align >= 8.
This allows simd optimized routines to work in steps of 8 pixels
without going over the linesize. (this matters for yuv->rgb24 for example)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/imgutils.c')
-rw-r--r-- | libavutil/imgutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c index 75642d1..ef7d413 100644 --- a/libavutil/imgutils.c +++ b/libavutil/imgutils.c @@ -188,7 +188,7 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4], if ((ret = av_image_check_size(w, h, 0, NULL)) < 0) return ret; - if ((ret = av_image_fill_linesizes(linesizes, pix_fmt, w)) < 0) + if ((ret = av_image_fill_linesizes(linesizes, pix_fmt, align>7 ? FFALIGN(w, 8) : w)) < 0) return ret; for (i = 0; i < 4; i++) |