interpolate stores/restores an extra byte, so asan complains about the potential danger. This pads the buffer by 16, which is what the user is expected to do, for now at least.

BUG=81
TESTED=asan on unittests
Review URL: https://webrtc-codereview.appspot.com/799005

git-svn-id: http://libyuv.googlecode.com/svn/trunk@349 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
fbarchard@google.com 2012-09-13 11:19:00 +00:00
parent 06f275cc44
commit cded3e566b
3 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,6 @@
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 348
Version: 349
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 348
#define LIBYUV_VERSION 349
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT

View File

@ -848,11 +848,15 @@ TEST_F(libyuvTest, TestShade) {
}
}
// TODO(fbarchard): Fix asan warning in this test. libyuv bug #81
TEST_F(libyuvTest, DISABLED_TestInterpolate) {
TEST_F(libyuvTest, TestInterpolate) {
// Interpolate internally used bilinear filtering, which duplicates the last
// value, but the interpolate saves and restores it. The buffer must be
// padded by 16 extra bytes. TODO(fbarchard): Reimplement interpolate with
// code that does not duplicate the last value and remove kPad.
const int kPad = 16;
SIMD_ALIGNED(uint8 orig_pixels_0[256][4]);
SIMD_ALIGNED(uint8 orig_pixels_1[256][4]);
SIMD_ALIGNED(uint8 interpolate_pixels[256][4]);
SIMD_ALIGNED(uint8 interpolate_pixels[256 + kPad][4]);
orig_pixels_0[0][0] = 16u;
orig_pixels_0[0][1] = 32u;