Commit 25120f21 authored by fbarchard@google.com's avatar fbarchard@google.com

Add a unittest for scaling from VGA to whatever.

BUG=208
TESTED=out\release\libyuv_unittest --gtest_filter=*ScaleFrom*
Review URL: https://webrtc-codereview.appspot.com/1250004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@620 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 9d48df9a
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 619
Version: 620
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 619
#define LIBYUV_VERSION 620
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -413,4 +413,31 @@ TEST_F(libyuvTest, ARGBScaleTo853x480_Bilinear) {
EXPECT_LE(max_diff, 1);
}
TEST_F(libyuvTest, ARGBScaleFrom640x360_None) {
int src_width = 640;
int src_height = 360;
int dst_width = benchmark_width_;
int dst_height = benchmark_height_;
int max_diff = ARGBTestFilter(src_width, src_height,
dst_width, dst_height,
kFilterNone,
benchmark_iterations_);
EXPECT_LE(max_diff, 2);
}
TEST_F(libyuvTest, ARGBScaleFrom640x360_Bilinear) {
int src_width = 640;
int src_height = 360;
int dst_width = benchmark_width_;
int dst_height = benchmark_height_;
int max_diff = ARGBTestFilter(src_width, src_height,
dst_width, dst_height,
kFilterBilinear,
benchmark_iterations_);
EXPECT_LE(max_diff, 2);
}
} // namespace libyuv
......@@ -551,4 +551,30 @@ TEST_F(libyuvTest, ScaleTo853x480_Box) {
EXPECT_LE(max_diff, 1);
}
TEST_F(libyuvTest, ScaleFrom640x360_None) {
int src_width = 640;
int src_height = 360;
int dst_width = benchmark_width_;
int dst_height = benchmark_height_;
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
kFilterNone,
benchmark_iterations_);
EXPECT_LE(max_diff, 2);
}
TEST_F(libyuvTest, ScaleFrom640x360_Bilinear) {
int src_width = 640;
int src_height = 360;
int dst_width = benchmark_width_;
int dst_height = benchmark_height_;
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
kFilterBilinear,
benchmark_iterations_);
EXPECT_LE(max_diff, 2);
}
} // 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