Commit 3e18ca4c authored by fbarchard@google.com's avatar fbarchard@google.com

make 'full' test do multiples of 3 which includes 0 and 255.

BUG=324
TESTED=libyuvTest.TestFullYUV
R=brucedawson@google.com

Review URL: https://webrtc-codereview.appspot.com/35829004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1242 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 7772ab1f
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 1242
Version: 1243
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1242
#define LIBYUV_VERSION 1243
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -269,12 +269,15 @@ TEST_F(libyuvTest, TestGreyYUV) {
}
}
// TODO(fbarchard): Speed up this test or disable it.
// This full test should be run occassionally to test all values are accurate.
// TODO(fbarchard): Determine error distribution.
TEST_F(libyuvTest, TestFullYUV) {
// If using small image, step faster.
int step = benchmark_width_ <= 128 ? 3 : 1;
int r0, g0, b0, r1, g1, b1;
for (int y = 0; y < 256; ++y) {
for (int u = 0; u < 256; ++u) {
for (int v = 0; v < 256; ++v) {
for (int y = 0; y < 256; y += step) {
for (int u = 0; u < 256; u += step) {
for (int v = 0; v < 256; v += step) {
YUVToRGBReference(y, u, v, &r0, &g0, &b0);
YUVToRGB(y, u, v, &r1, &g1, &b1);
EXPECT_NEAR(r0, r1, ERROR_R);
......
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