Commit cded3e56 authored by fbarchard@google.com's avatar fbarchard@google.com

interpolate stores/restores an extra byte, so asan complains about the potential…

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
parent 06f275cc
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 348
Version: 349
License: BSD
License File: LICENSE
......
......@@ -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
......@@ -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;
......
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