Commit 62e5ef95 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 41a052a6
......@@ -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++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment