check copy has different address. If same, skip the copy to avoid valgrind error.

BUG=334
TESTED=unittests still pass
R=tpsiaki@google.com

Review URL: https://webrtc-codereview.appspot.com/14679004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1011 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
fbarchard@google.com 2014-06-11 00:16:59 +00:00
parent b0fce2a311
commit a9ff15b7bb
3 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 1010
Version: 1011
License: BSD
License File: LICENSE

View File

@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1010
#define LIBYUV_VERSION 1011
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT

View File

@ -37,6 +37,10 @@ void CopyPlane(const uint8* src_y, int src_stride_y,
height = 1;
src_stride_y = dst_stride_y = 0;
}
// Nothing to do.
if (src_y == dst_y && src_stride_y == dst_stride_y) {
return;
}
#if defined(HAS_COPYROW_X86)
if (TestCpuFlag(kCpuHasX86) && IS_ALIGNED(width, 4)) {
CopyRow = CopyRow_X86;