mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 01:06:46 +08:00
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
This commit is contained in:
parent
9d48df9ac4
commit
25120f2196
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 619
|
Version: 620
|
||||||
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 619
|
#define LIBYUV_VERSION 620
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||||
|
|||||||
@ -413,4 +413,31 @@ TEST_F(libyuvTest, ARGBScaleTo853x480_Bilinear) {
|
|||||||
EXPECT_LE(max_diff, 1);
|
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
|
} // namespace libyuv
|
||||||
|
|||||||
@ -551,4 +551,30 @@ TEST_F(libyuvTest, ScaleTo853x480_Box) {
|
|||||||
EXPECT_LE(max_diff, 1);
|
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
|
} // namespace libyuv
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user