mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-08 01:36:47 +08:00
NV12ToARGB for linux appears to have a bug in the assembly so this disables the asm for posix. It still works on Windows. Unittests updated to show the amount of pixel difference.
BUG=55 TEST=out/Release/libyuv_unittest --gtest_filter=* Review URL: https://webrtc-codereview.appspot.com/675008 git-svn-id: http://libyuv.googlecode.com/svn/trunk@310 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
25ba021148
commit
68f0d3df5e
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 307
|
||||
Version: 310
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 307
|
||||
#define LIBYUV_VERSION 310
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -57,8 +57,6 @@ extern "C" {
|
||||
#define HAS_I444TOARGBROW_SSSE3
|
||||
#define HAS_I422TOARGBROW_SSSE3
|
||||
#define HAS_I411TOARGBROW_SSSE3
|
||||
#define HAS_NV12TOARGBROW_SSSE3
|
||||
#define HAS_NV21TOARGBROW_SSSE3
|
||||
#define HAS_I422TOBGRAROW_SSSE3
|
||||
#define HAS_I422TOABGRROW_SSSE3
|
||||
#define HAS_I400TOARGBROW_SSE2
|
||||
@ -87,6 +85,8 @@ extern "C" {
|
||||
#if !defined(YUV_DISABLE_ASM) && defined(_M_IX86)
|
||||
// TODO(fbarchard): Investigate possible issue in this function and reenable.
|
||||
#define HAS_ARGBCOLORTABLEROW_X86
|
||||
#define HAS_NV12TOARGBROW_SSSE3
|
||||
#define HAS_NV21TOARGBROW_SSSE3
|
||||
#endif
|
||||
|
||||
// The following are disabled when SSSE3 is available:
|
||||
|
||||
@ -59,17 +59,18 @@ TEST_F(libyuvTest, FMT_PLANAR##To##FMT_B##_OptVsC) { \
|
||||
dst_argb_opt, kWidth * BPP_B, \
|
||||
kWidth, kHeight); \
|
||||
} \
|
||||
int err = 0; \
|
||||
int max_diff = 0; \
|
||||
for (int i = 0; i < kHeight; ++i) { \
|
||||
for (int j = 0; j < kWidth * BPP_B; ++j) { \
|
||||
int diff = static_cast<int>(dst_argb_c[i * kWidth * BPP_B + j]) - \
|
||||
static_cast<int>(dst_argb_opt[i * kWidth * BPP_B + j]); \
|
||||
if (abs(diff) > 2) { \
|
||||
++err; \
|
||||
int abs_diff = \
|
||||
abs(static_cast<int>(dst_argb_c[i * kWidth * BPP_B + j]) - \
|
||||
static_cast<int>(dst_argb_opt[i * kWidth * BPP_B + j])); \
|
||||
if (abs_diff > max_diff) { \
|
||||
max_diff = abs_diff; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
EXPECT_EQ(err, 0); \
|
||||
EXPECT_LE(max_diff, 2);; \
|
||||
free_aligned_buffer_16(src_y) \
|
||||
free_aligned_buffer_16(src_u) \
|
||||
free_aligned_buffer_16(src_v) \
|
||||
@ -119,17 +120,18 @@ TEST_F(libyuvTest, FMT_PLANAR##To##FMT_B##_OptVsC) { \
|
||||
dst_argb_opt, kWidth * BPP_B, \
|
||||
kWidth, kHeight); \
|
||||
} \
|
||||
int err = 0; \
|
||||
int max_diff = 0; \
|
||||
for (int i = 0; i < kHeight; ++i) { \
|
||||
for (int j = 0; j < kWidth * BPP_B; ++j) { \
|
||||
int diff = static_cast<int>(dst_argb_c[i * kWidth * BPP_B + j]) - \
|
||||
static_cast<int>(dst_argb_opt[i * kWidth * BPP_B + j]); \
|
||||
if (abs(diff) > 2) { \
|
||||
++err; \
|
||||
int abs_diff = \
|
||||
abs(static_cast<int>(dst_argb_c[i * kWidth * BPP_B + j]) - \
|
||||
static_cast<int>(dst_argb_opt[i * kWidth * BPP_B + j])); \
|
||||
if (abs_diff > max_diff) { \
|
||||
max_diff = abs_diff; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
EXPECT_EQ(err, 0); \
|
||||
EXPECT_LE(max_diff, 3);; \
|
||||
free_aligned_buffer_16(src_y) \
|
||||
free_aligned_buffer_16(src_uv) \
|
||||
free_aligned_buffer_16(dst_argb_c) \
|
||||
@ -171,37 +173,40 @@ TEST_F(libyuvTest, FMT_A##To##FMT_PLANAR##_OptVsC) { \
|
||||
dst_v_opt, kWidth / SUBSAMP_X, \
|
||||
kWidth, kHeight); \
|
||||
} \
|
||||
int err = 0; \
|
||||
int max_diff = 0; \
|
||||
for (int i = 0; i < kHeight; ++i) { \
|
||||
for (int j = 0; j < kWidth; ++j) { \
|
||||
int diff = static_cast<int>(dst_y_c[i * kWidth + j]) - \
|
||||
static_cast<int>(dst_y_opt[i * kWidth + j]); \
|
||||
if (abs(diff) > 2) { \
|
||||
++err; \
|
||||
int abs_diff = \
|
||||
abs(static_cast<int>(dst_y_c[i * kWidth + j]) - \
|
||||
static_cast<int>(dst_y_opt[i * kWidth + j])); \
|
||||
if (abs_diff > max_diff) { \
|
||||
max_diff = abs_diff; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
EXPECT_EQ(err, 0); \
|
||||
EXPECT_LE(max_diff, 2);; \
|
||||
for (int i = 0; i < kHeight / SUBSAMP_Y; ++i) { \
|
||||
for (int j = 0; j < kWidth / SUBSAMP_X; ++j) { \
|
||||
int diff = static_cast<int>(dst_u_c[i * kWidth / SUBSAMP_X + j]) - \
|
||||
static_cast<int>(dst_u_opt[i * kWidth / SUBSAMP_X + j]); \
|
||||
if (abs(diff) > 2) { \
|
||||
++err; \
|
||||
int abs_diff = \
|
||||
abs(static_cast<int>(dst_u_c[i * kWidth / SUBSAMP_X + j]) - \
|
||||
static_cast<int>(dst_u_opt[i * kWidth / SUBSAMP_X + j])); \
|
||||
if (abs_diff > max_diff) { \
|
||||
max_diff = abs_diff; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
EXPECT_EQ(err, 0); \
|
||||
EXPECT_LE(max_diff, 2);; \
|
||||
for (int i = 0; i < kHeight / SUBSAMP_Y; ++i) { \
|
||||
for (int j = 0; j < kWidth / SUBSAMP_X; ++j) { \
|
||||
int diff = static_cast<int>(dst_v_c[i * kWidth / SUBSAMP_X + j]) - \
|
||||
static_cast<int>(dst_v_opt[i * kWidth / SUBSAMP_X + j]); \
|
||||
if (abs(diff) > 2) { \
|
||||
++err; \
|
||||
int abs_diff = \
|
||||
abs(static_cast<int>(dst_v_c[i * kWidth / SUBSAMP_X + j]) - \
|
||||
static_cast<int>(dst_v_opt[i * kWidth / SUBSAMP_X + j])); \
|
||||
if (abs_diff > max_diff) { \
|
||||
max_diff = abs_diff; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
EXPECT_EQ(err, 0); \
|
||||
EXPECT_LE(max_diff, 2);; \
|
||||
free_aligned_buffer_16(dst_y_c) \
|
||||
free_aligned_buffer_16(dst_u_c) \
|
||||
free_aligned_buffer_16(dst_v_c) \
|
||||
@ -246,14 +251,16 @@ TEST_F(libyuvTest, FMT_A##To##FMT_B##_OptVsC) { \
|
||||
dst_argb_opt, kWidth * BPP_B, \
|
||||
kWidth, kHeight); \
|
||||
} \
|
||||
int err = 0; \
|
||||
int max_diff = 0; \
|
||||
for (int i = 0; i < kHeight * kWidth * BPP_B; ++i) { \
|
||||
int diff = static_cast<int>(dst_argb_c[i]) - \
|
||||
static_cast<int>(dst_argb_opt[i]); \
|
||||
if (abs(diff) > 2) \
|
||||
err++; \
|
||||
int abs_diff = \
|
||||
abs(static_cast<int>(dst_argb_c[i]) - \
|
||||
static_cast<int>(dst_argb_opt[i])); \
|
||||
if (abs_diff > max_diff) { \
|
||||
max_diff = abs_diff; \
|
||||
} \
|
||||
} \
|
||||
EXPECT_EQ(err, 0); \
|
||||
EXPECT_LE(max_diff, 2);; \
|
||||
free_aligned_buffer_16(src_argb) \
|
||||
free_aligned_buffer_16(dst_argb_c) \
|
||||
free_aligned_buffer_16(dst_argb_opt) \
|
||||
@ -300,14 +307,16 @@ TEST_F(libyuvTest, FMT_A##To##FMT_B##_Random) { \
|
||||
FMT_A##To##FMT_B(src_argb, kWidth * STRIDE_A, \
|
||||
dst_argb_opt, kWidth * BPP_B, \
|
||||
kWidth, kHeight); \
|
||||
int err = 0; \
|
||||
int max_diff = 0; \
|
||||
for (int i = 0; i < kHeight * kWidth * BPP_B; ++i) { \
|
||||
int diff = static_cast<int>(dst_argb_c[i]) - \
|
||||
static_cast<int>(dst_argb_opt[i]); \
|
||||
if (abs(diff) > 2) \
|
||||
err++; \
|
||||
int abs_diff = \
|
||||
abs(static_cast<int>(dst_argb_c[i]) - \
|
||||
static_cast<int>(dst_argb_opt[i])); \
|
||||
if (abs_diff > max_diff) { \
|
||||
max_diff = abs_diff; \
|
||||
} \
|
||||
} \
|
||||
EXPECT_EQ(err, 0); \
|
||||
EXPECT_LE(max_diff, 2);; \
|
||||
free_aligned_buffer_page_end(src_argb) \
|
||||
free_aligned_buffer_page_end(dst_argb_c) \
|
||||
free_aligned_buffer_page_end(dst_argb_opt) \
|
||||
@ -656,7 +665,6 @@ TEST_F(libyuvTest, TestARGBColorMatrix) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TEST_F(libyuvTest, TestARGBColorTable) {
|
||||
SIMD_ALIGNED(uint8 orig_pixels[256][4]);
|
||||
|
||||
|
||||
@ -90,8 +90,9 @@ static int ARGBTestFilter(int src_width, int src_height,
|
||||
for (j = b * 4; j < (dst_width + b) * 4; ++j) {
|
||||
int abs_diff = abs(dst_argb_c[(i * dst_stride_argb) + j] -
|
||||
dst_argb_opt[(i * dst_stride_argb) + j]);
|
||||
if (abs_diff > max_diff)
|
||||
if (abs_diff > max_diff) {
|
||||
max_diff = abs_diff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,10 +109,10 @@ TEST_F(libyuvTest, ARGBScaleDownBy2) {
|
||||
const int dst_height = src_height / 2;
|
||||
|
||||
for (int f = 0; f < 2; ++f) {
|
||||
int err = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_GE(1, err);
|
||||
int max_diff = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,10 +123,10 @@ TEST_F(libyuvTest, ARGBScaleDownBy4) {
|
||||
const int dst_height = src_height / 4;
|
||||
|
||||
for (int f = 0; f < 2; ++f) {
|
||||
int err = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_GE(1, err);
|
||||
int max_diff = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,10 +137,10 @@ TEST_F(libyuvTest, ARGBScaleDownBy5) {
|
||||
const int dst_height = src_height / 5;
|
||||
|
||||
for (int f = 0; f < 2; ++f) {
|
||||
int err = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_GE(1, err);
|
||||
int max_diff = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -150,10 +151,10 @@ TEST_F(libyuvTest, ARGBScaleDownBy8) {
|
||||
const int dst_height = src_height / 8;
|
||||
|
||||
for (int f = 0; f < 2; ++f) {
|
||||
int err = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_GE(1, err);
|
||||
int max_diff = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,10 +165,10 @@ TEST_F(libyuvTest, ARGBScaleDownBy16) {
|
||||
const int dst_height = src_height / 16;
|
||||
|
||||
for (int f = 0; f < 2; ++f) {
|
||||
int err = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_GE(1, err);
|
||||
int max_diff = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -178,10 +179,10 @@ TEST_F(libyuvTest, ARGBScaleDownBy34) {
|
||||
const int dst_height = src_height * 3 / 4;
|
||||
|
||||
for (int f = 0; f < 2; ++f) {
|
||||
int err = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_GE(1, err);
|
||||
int max_diff = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -192,10 +193,10 @@ TEST_F(libyuvTest, ARGBScaleDownBy38) {
|
||||
int dst_height = src_height * 3 / 8;
|
||||
|
||||
for (int f = 0; f < 2; ++f) {
|
||||
int err = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_GE(1, err);
|
||||
int max_diff = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -206,10 +207,10 @@ TEST_F(libyuvTest, ARGBScaleTo1366) {
|
||||
int dst_height = 768;
|
||||
|
||||
for (int f = 0; f < 2; ++f) {
|
||||
int err = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_GE(1, err);
|
||||
int max_diff = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -220,10 +221,10 @@ TEST_F(libyuvTest, ARGBScaleTo4074) {
|
||||
int dst_height = 1272;
|
||||
|
||||
for (int f = 0; f < 2; ++f) {
|
||||
int err = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_GE(1, err);
|
||||
int max_diff = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,10 +236,10 @@ TEST_F(libyuvTest, ARGBScaleTo853) {
|
||||
int dst_height = 480;
|
||||
|
||||
for (int f = 0; f < 2; ++f) {
|
||||
int err = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_GE(1, err);
|
||||
int max_diff = ARGBTestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f));
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -170,10 +170,10 @@ TEST_F(libyuvTest, ScaleDownBy2) {
|
||||
const int dst_height = src_height / 2;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 1);
|
||||
EXPECT_GE(1, err);
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -184,10 +184,10 @@ TEST_F(libyuvTest, ScaleDownBy4) {
|
||||
const int dst_height = src_height / 4;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 1);
|
||||
EXPECT_GE(2, err); // This is the only scale factor with error of 2.
|
||||
EXPECT_LE(max_diff, 2);; // This is the only scale factor with error of 2.
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,10 +198,10 @@ TEST_F(libyuvTest, ScaleDownBy5) {
|
||||
const int dst_height = src_height / 5;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 1);
|
||||
EXPECT_GE(1, err);
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,10 +212,10 @@ TEST_F(libyuvTest, ScaleDownBy8) {
|
||||
const int dst_height = src_height / 8;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 1);
|
||||
EXPECT_GE(1, err);
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -226,10 +226,10 @@ TEST_F(libyuvTest, ScaleDownBy16) {
|
||||
const int dst_height = src_height / 16;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 1);
|
||||
EXPECT_GE(1, err);
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -240,10 +240,10 @@ TEST_F(libyuvTest, ScaleDownBy34) {
|
||||
const int dst_height = src_height * 3 / 4;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 1);
|
||||
EXPECT_GE(1, err);
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -254,10 +254,10 @@ TEST_F(libyuvTest, ScaleDownBy38) {
|
||||
int dst_height = src_height * 3 / 8;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 1);
|
||||
EXPECT_GE(1, err);
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -268,10 +268,10 @@ TEST_F(libyuvTest, ScaleTo1366) {
|
||||
int dst_height = 768;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 1);
|
||||
EXPECT_GE(1, err);
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -282,10 +282,10 @@ TEST_F(libyuvTest, ScaleTo4074) {
|
||||
int dst_height = 1272;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 1);
|
||||
EXPECT_GE(1, err);
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,10 +296,10 @@ TEST_F(libyuvTest, ScaleTo853) {
|
||||
int dst_height = 480;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 1);
|
||||
EXPECT_GE(1, err);
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -310,10 +310,10 @@ TEST_F(libyuvTest, ScaleTo853Wrong) {
|
||||
int dst_height = 480;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 0);
|
||||
EXPECT_GE(1, err);
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -325,10 +325,10 @@ TEST_F(libyuvTest, ScaleTo684) {
|
||||
int dst_height = 552;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 1);
|
||||
EXPECT_GE(1, err);
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -339,10 +339,10 @@ TEST_F(libyuvTest, ScaleTo342) {
|
||||
int dst_height = 276;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 1);
|
||||
EXPECT_GE(1, err);
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -353,10 +353,10 @@ TEST_F(libyuvTest, ScaleToHalf342) {
|
||||
int dst_height = 276;
|
||||
|
||||
for (int f = 0; f < 3; ++f) {
|
||||
int err = TestFilter(src_width, src_height,
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
dst_width, dst_height,
|
||||
static_cast<FilterMode>(f), 1);
|
||||
EXPECT_GE(1, err);
|
||||
EXPECT_LE(max_diff, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user