[FFmpeg-cvslog] sws-test: Fix data alignment
Michael Niedermayer
git at videolan.org
Sun Oct 23 23:43:45 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 23 23:35:28 2011 +0200| [f4bf06eb96c8492754f66e7fca77fe98ae800aad] | committer: Michael Niedermayer
sws-test: Fix data alignment
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f4bf06eb96c8492754f66e7fca77fe98ae800aad
---
libswscale/swscale-test.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libswscale/swscale-test.c b/libswscale/swscale-test.c
index 888cbab..190eda4 100644
--- a/libswscale/swscale-test.c
+++ b/libswscale/swscale-test.c
@@ -104,6 +104,7 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h,
av_image_fill_linesizes(srcStride, srcFormat, srcW);
for (p = 0; p < 4; p++) {
+ srcStride[p] = FFALIGN(srcStride[p], 16);
if (srcStride[p])
src[p] = av_mallocz(srcStride[p]*srcH+16);
if (srcStride[p] && !src[p]) {
@@ -139,6 +140,7 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h,
* allocated with av_malloc). */
/* An extra 16 bytes is being allocated because some scalers may write
* out of bounds. */
+ dstStride[i] = FFALIGN(dstStride[i], 16);
if (dstStride[i])
dst[i]= av_mallocz(dstStride[i]*dstH+16);
if (dstStride[i] && !dst[i]) {
@@ -178,6 +180,7 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h,
ssdA = r->ssdA;
} else {
for (i=0; i<4; i++) {
+ refStride[i] = FFALIGN(refStride[i], 16);
if (refStride[i])
out[i]= av_mallocz(refStride[i]*h);
if (refStride[i] && !out[i]) {
More information about the ffmpeg-cvslog
mailing list