diff options
author | fbarchard@google.com <fbarchard@google.com> | 2014-10-17 01:18:02 +0000 |
---|---|---|
committer | fbarchard@google.com <fbarchard@google.com> | 2014-10-17 01:18:02 +0000 |
commit | 9107460c7f76a10cc4122d91e62b0580eacd376e (patch) | |
tree | 278f820d0d307b701717df2779a0ce1916e80202 | |
parent | 3dbaaf003281e8219ef5a12cb3cfc8e5c7e4e335 (diff) | |
download | libyuv-9107460c7f76a10cc4122d91e62b0580eacd376e.tar.gz |
Offset destination by 1 for I420ToARGB_Unaligned test to ensure destination alignment avoids exceptions.
BUG=372
TESTED=out\release_x64\libyuv_unittest --gtest_catch_exceptions=0 --gtest_filter=*I420ToARGB_Unaligned
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/23109004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1125 16f28f9a-4ce2-e073-06de-1de4eb20be90
-rw-r--r-- | README.chromium | 2 | ||||
-rw-r--r-- | include/libyuv/version.h | 2 | ||||
-rw-r--r-- | unit_test/convert_test.cc | 16 |
3 files changed, 10 insertions, 10 deletions
diff --git a/README.chromium b/README.chromium index 0cf5693..600d33f 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 1124 +Version: 1125 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 1f26da2..349b523 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 1124 +#define LIBYUV_VERSION 1125 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/unit_test/convert_test.cc b/unit_test/convert_test.cc index a50b33f..fd82ed1 100644 --- a/unit_test/convert_test.cc +++ b/unit_test/convert_test.cc @@ -430,8 +430,8 @@ TEST_F(libyuvTest, FMT_PLANAR##To##FMT_B##N) { \ align_buffer_64(src_y, kWidth * kHeight + OFF); \ align_buffer_64(src_u, kSizeUV + OFF); \ align_buffer_64(src_v, kSizeUV + OFF); \ - align_buffer_64(dst_argb_c, kStrideB * kHeight); \ - align_buffer_64(dst_argb_opt, kStrideB * kHeight); \ + align_buffer_64(dst_argb_c, kStrideB * kHeight + OFF); \ + align_buffer_64(dst_argb_opt, kStrideB * kHeight + OFF); \ srandom(time(NULL)); \ for (int i = 0; i < kWidth * kHeight; ++i) { \ src_y[i + OFF] = (random() & 0xff); \ @@ -440,20 +440,20 @@ TEST_F(libyuvTest, FMT_PLANAR##To##FMT_B##N) { \ src_u[i + OFF] = (random() & 0xff); \ src_v[i + OFF] = (random() & 0xff); \ } \ - memset(dst_argb_c, 1, kStrideB * kHeight); \ - memset(dst_argb_opt, 101, kStrideB * kHeight); \ + memset(dst_argb_c + OFF, 1, kStrideB * kHeight); \ + memset(dst_argb_opt + OFF, 101, kStrideB * kHeight); \ MaskCpuFlags(0); \ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \ src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ - dst_argb_c, kStrideB, \ + dst_argb_c + OFF, kStrideB, \ kWidth, NEG kHeight); \ MaskCpuFlags(-1); \ for (int i = 0; i < benchmark_iterations_; ++i) { \ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \ src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ - dst_argb_opt, kStrideB, \ + dst_argb_opt + OFF, kStrideB, \ kWidth, NEG kHeight); \ } \ int max_diff = 0; \ @@ -462,10 +462,10 @@ TEST_F(libyuvTest, FMT_PLANAR##To##FMT_B##N) { \ align_buffer_64(dst_argb32_opt, kWidth * BPP_C * kHeight); \ memset(dst_argb32_c, 2, kWidth * BPP_C * kHeight); \ memset(dst_argb32_opt, 102, kWidth * BPP_C * kHeight); \ - FMT_B##To##FMT_C(dst_argb_c, kStrideB, \ + FMT_B##To##FMT_C(dst_argb_c + OFF, kStrideB, \ dst_argb32_c, kWidth * BPP_C , \ kWidth, kHeight); \ - FMT_B##To##FMT_C(dst_argb_opt, kStrideB, \ + FMT_B##To##FMT_C(dst_argb_opt + OFF, kStrideB, \ dst_argb32_opt, kWidth * BPP_C , \ kWidth, kHeight); \ for (int i = 0; i < kWidth * BPP_C * kHeight; ++i) { \ |