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:
fbarchard@google.com 2012-06-27 23:42:19 +00:00
parent f37f9a3542
commit a537bbdc59
3 changed files with 45 additions and 2 deletions

View File

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

View File

@ -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