From db11d893c275d17264afdd1f488bcd2e77aa867d Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Mon, 1 Oct 2012 06:45:34 +0000 Subject: [PATCH] Check destination alignment for Q420 format when using SSE2. BUG=96 TEST=none Review URL: https://webrtc-codereview.appspot.com/861004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@387 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- README.chromium | 2 +- include/libyuv/version.h | 2 +- source/convert.cc | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.chromium b/README.chromium index 3b510f0fd..c0c630a2c 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 386 +Version: 387 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 38c18ef90..6e67c07a3 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 386 +#define LIBYUV_VERSION 387 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/convert.cc b/source/convert.cc index 0f46b5aa5..bbd37367c 100644 --- a/source/convert.cc +++ b/source/convert.cc @@ -544,7 +544,9 @@ int Q420ToI420(const uint8* src_y, int src_stride_y, YUY2ToYRow = YUY2ToYRow_Unaligned_SSE2; if (IS_ALIGNED(src_yuy2, 16) && IS_ALIGNED(src_stride_yuy2, 16)) { YUY2ToUV422Row = YUY2ToUV422Row_SSE2; - YUY2ToYRow = YUY2ToYRow_SSE2; + if (IS_ALIGNED(dst_y, 16) && IS_ALIGNED(dst_stride_y, 16)) { + YUY2ToYRow = YUY2ToYRow_SSE2; + } } } }