mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
Use expect near to see exact values for differences.
BUG=269 TESTED=local unittest R=harryjin@google.com Review URL: https://webrtc-codereview.appspot.com/32349004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@1204 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
7866d8e082
commit
d3bc010367
@ -657,30 +657,24 @@ TEST_F(libyuvTest, FMT_A##To##FMT_PLANAR##N) { \
|
||||
} \
|
||||
for (int i = 0; i < kHeight; ++i) { \
|
||||
for (int j = 0; j < kWidth; ++j) { \
|
||||
int abs_diff = \
|
||||
abs(static_cast<int>(dst_y_c[i * kWidth + j]) - \
|
||||
static_cast<int>(dst_y_opt[i * kWidth + j])); \
|
||||
EXPECT_LE(abs_diff, DIFF); \
|
||||
EXPECT_NEAR(static_cast<int>(dst_y_c[i * kWidth + j]), \
|
||||
static_cast<int>(dst_y_opt[i * kWidth + j]), DIFF); \
|
||||
} \
|
||||
} \
|
||||
for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y); ++i) { \
|
||||
for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
|
||||
int abs_diff = \
|
||||
abs(static_cast<int>(dst_u_c[i * \
|
||||
SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
|
||||
EXPECT_NEAR(static_cast<int>(dst_u_c[i * \
|
||||
SUBSAMPLE(kWidth, SUBSAMP_X) + j]), \
|
||||
static_cast<int>(dst_u_opt[i * \
|
||||
SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
|
||||
EXPECT_LE(abs_diff, DIFF); \
|
||||
SUBSAMPLE(kWidth, SUBSAMP_X) + j]), DIFF); \
|
||||
} \
|
||||
} \
|
||||
for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y); ++i) { \
|
||||
for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
|
||||
int abs_diff = \
|
||||
abs(static_cast<int>(dst_v_c[i * \
|
||||
SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
|
||||
EXPECT_NEAR(static_cast<int>(dst_v_c[i * \
|
||||
SUBSAMPLE(kWidth, SUBSAMP_X) + j]), \
|
||||
static_cast<int>(dst_v_opt[i * \
|
||||
SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
|
||||
EXPECT_LE(abs_diff, DIFF); \
|
||||
SUBSAMPLE(kWidth, SUBSAMP_X) + j]), DIFF); \
|
||||
} \
|
||||
} \
|
||||
free_aligned_buffer_64(dst_y_c); \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user