mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
test some problematic scale factors
BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/678006 git-svn-id: http://libyuv.googlecode.com/svn/trunk@296 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
f37f9a3542
commit
a537bbdc59
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 295
|
Version: 296
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 295
|
#define LIBYUV_VERSION 296
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||||
|
|||||||
@ -317,4 +317,47 @@ TEST_F(libyuvTest, ScaleTo853Wrong) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A one off test for a screen cast resolution scale.
|
||||||
|
TEST_F(libyuvTest, ScaleTo684) {
|
||||||
|
int src_width = 686;
|
||||||
|
int src_height = 557;
|
||||||
|
int dst_width = 684;
|
||||||
|
int dst_height = 552;
|
||||||
|
|
||||||
|
for (int f = 0; f < 3; ++f) {
|
||||||
|
int err = TestFilter(src_width, src_height,
|
||||||
|
dst_width, dst_height,
|
||||||
|
static_cast<FilterMode>(f), 1);
|
||||||
|
EXPECT_GE(1, err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(libyuvTest, ScaleTo342) {
|
||||||
|
int src_width = 686;
|
||||||
|
int src_height = 557;
|
||||||
|
int dst_width = 342;
|
||||||
|
int dst_height = 276;
|
||||||
|
|
||||||
|
for (int f = 0; f < 3; ++f) {
|
||||||
|
int err = TestFilter(src_width, src_height,
|
||||||
|
dst_width, dst_height,
|
||||||
|
static_cast<FilterMode>(f), 1);
|
||||||
|
EXPECT_GE(1, err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(libyuvTest, ScaleToHalf342) {
|
||||||
|
int src_width = 684;
|
||||||
|
int src_height = 552;
|
||||||
|
int dst_width = 342;
|
||||||
|
int dst_height = 276;
|
||||||
|
|
||||||
|
for (int f = 0; f < 3; ++f) {
|
||||||
|
int err = TestFilter(src_width, src_height,
|
||||||
|
dst_width, dst_height,
|
||||||
|
static_cast<FilterMode>(f), 1);
|
||||||
|
EXPECT_GE(1, err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace libyuv
|
} // namespace libyuv
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user