Commit a537bbdc authored by fbarchard@google.com's avatar fbarchard@google.com

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
parent f37f9a35
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 295
Version: 296
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 295
#define LIBYUV_VERSION 296
#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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment