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
This commit is contained in:
fbarchard@google.com 2014-10-17 01:18:02 +00:00
parent 3dbaaf0032
commit 9107460c7f
3 changed files with 10 additions and 10 deletions

View File

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

View File

@ -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) { \