Commit 7781d943 authored by fbarchard@google.com's avatar fbarchard@google.com

Disable V210 unittest that fails valgrind, and some warning fixes for android.

BUG=91
TEST=try
Review URL: https://webrtc-codereview.appspot.com/813004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@362 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 5625adfa
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 361 Version: 362
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -11,6 +11,6 @@ ...@@ -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 361 #define LIBYUV_VERSION 362
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include "unit_test/unit_test.h" #include "../unit_test/unit_test.h"
#include "libyuv/basic_types.h" #include "libyuv/basic_types.h"
#include "libyuv/compare.h" #include "libyuv/compare.h"
#include "libyuv/cpu_id.h" #include "libyuv/cpu_id.h"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "libyuv/basic_types.h" #include "libyuv/basic_types.h"
#include "libyuv/cpu_id.h" #include "libyuv/cpu_id.h"
#include "libyuv/version.h" #include "libyuv/version.h"
#include "unit_test/unit_test.h" #include "../unit_test/unit_test.h"
namespace libyuv { namespace libyuv {
...@@ -59,7 +59,6 @@ TEST_F(libyuvTest, TestCpuId) { ...@@ -59,7 +59,6 @@ TEST_F(libyuvTest, TestCpuId) {
CpuId(cpu_info, 0); CpuId(cpu_info, 0);
cpu_info[0] = cpu_info[1]; // Reorder output cpu_info[0] = cpu_info[1]; // Reorder output
cpu_info[1] = cpu_info[3]; cpu_info[1] = cpu_info[3];
cpu_info[2] = cpu_info[2];
cpu_info[3] = 0; cpu_info[3] = 0;
printf("Cpu Vendor: %s %x %x %x\n", reinterpret_cast<char*>(&cpu_info[0]), printf("Cpu Vendor: %s %x %x %x\n", reinterpret_cast<char*>(&cpu_info[0]),
cpu_info[0], cpu_info[1], cpu_info[2]); cpu_info[0], cpu_info[1], cpu_info[2]);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include "libyuv/format_conversion.h" #include "libyuv/format_conversion.h"
#include "libyuv/planar_functions.h" #include "libyuv/planar_functions.h"
#include "libyuv/rotate.h" #include "libyuv/rotate.h"
#include "unit_test/unit_test.h" #include "../unit_test/unit_test.h"
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define SIMD_ALIGNED(var) __declspec(align(16)) var #define SIMD_ALIGNED(var) __declspec(align(16)) var
...@@ -97,7 +97,8 @@ TESTPLANARTOB(I422, 2, 1, ARGB, 4) ...@@ -97,7 +97,8 @@ TESTPLANARTOB(I422, 2, 1, ARGB, 4)
TESTPLANARTOB(I444, 1, 1, ARGB, 4) TESTPLANARTOB(I444, 1, 1, ARGB, 4)
TESTPLANARTOB(I420, 2, 2, YUY2, 2) TESTPLANARTOB(I420, 2, 2, YUY2, 2)
TESTPLANARTOB(I420, 2, 2, UYVY, 2) TESTPLANARTOB(I420, 2, 2, UYVY, 2)
TESTPLANARTOB(I420, 2, 2, V210, 16 / 6) // TODO(fbarchard): Re-enable test and fix valgrind.
// TESTPLANARTOB(I420, 2, 2, V210, 16 / 6)
TESTPLANARTOB(I420, 2, 2, I400, 1) TESTPLANARTOB(I420, 2, 2, I400, 1)
TESTPLANARTOB(I420, 2, 2, BayerBGGR, 1) TESTPLANARTOB(I420, 2, 2, BayerBGGR, 1)
TESTPLANARTOB(I420, 2, 2, BayerRGGB, 1) TESTPLANARTOB(I420, 2, 2, BayerRGGB, 1)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "libyuv/cpu_id.h" #include "libyuv/cpu_id.h"
#include "libyuv/rotate_argb.h" #include "libyuv/rotate_argb.h"
#include "unit_test/unit_test.h" #include "../unit_test/unit_test.h"
namespace libyuv { namespace libyuv {
......
This diff is collapsed.
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "libyuv/cpu_id.h" #include "libyuv/cpu_id.h"
#include "libyuv/scale_argb.h" #include "libyuv/scale_argb.h"
#include "unit_test/unit_test.h" #include "../unit_test/unit_test.h"
namespace libyuv { namespace libyuv {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "libyuv/cpu_id.h" #include "libyuv/cpu_id.h"
#include "libyuv/scale.h" #include "libyuv/scale.h"
#include "unit_test/unit_test.h" #include "../unit_test/unit_test.h"
namespace libyuv { namespace libyuv {
...@@ -171,7 +171,8 @@ TEST_F(libyuvTest, ScaleDownBy2) { ...@@ -171,7 +171,8 @@ TEST_F(libyuvTest, ScaleDownBy2) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_); static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1); EXPECT_LE(max_diff, 1);
} }
} }
...@@ -185,7 +186,8 @@ TEST_F(libyuvTest, ScaleDownBy4) { ...@@ -185,7 +186,8 @@ TEST_F(libyuvTest, ScaleDownBy4) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_); static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 2); // This is the only scale factor with error of 2. EXPECT_LE(max_diff, 2); // This is the only scale factor with error of 2.
} }
} }
...@@ -199,7 +201,8 @@ TEST_F(libyuvTest, ScaleDownBy5) { ...@@ -199,7 +201,8 @@ TEST_F(libyuvTest, ScaleDownBy5) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_); static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1); EXPECT_LE(max_diff, 1);
} }
} }
...@@ -213,7 +216,8 @@ TEST_F(libyuvTest, ScaleDownBy8) { ...@@ -213,7 +216,8 @@ TEST_F(libyuvTest, ScaleDownBy8) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_); static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1); EXPECT_LE(max_diff, 1);
} }
} }
...@@ -227,7 +231,8 @@ TEST_F(libyuvTest, ScaleDownBy16) { ...@@ -227,7 +231,8 @@ TEST_F(libyuvTest, ScaleDownBy16) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_); static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1); EXPECT_LE(max_diff, 1);
} }
} }
...@@ -241,7 +246,8 @@ TEST_F(libyuvTest, ScaleDownBy34) { ...@@ -241,7 +246,8 @@ TEST_F(libyuvTest, ScaleDownBy34) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_); static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1); EXPECT_LE(max_diff, 1);
} }
} }
...@@ -255,7 +261,8 @@ TEST_F(libyuvTest, ScaleDownBy38) { ...@@ -255,7 +261,8 @@ TEST_F(libyuvTest, ScaleDownBy38) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_); static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1); EXPECT_LE(max_diff, 1);
} }
} }
...@@ -269,7 +276,8 @@ TEST_F(libyuvTest, ScaleTo1366) { ...@@ -269,7 +276,8 @@ TEST_F(libyuvTest, ScaleTo1366) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_); static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1); EXPECT_LE(max_diff, 1);
} }
} }
...@@ -283,7 +291,8 @@ TEST_F(libyuvTest, ScaleTo4074) { ...@@ -283,7 +291,8 @@ TEST_F(libyuvTest, ScaleTo4074) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_); static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1); EXPECT_LE(max_diff, 1);
} }
} }
...@@ -297,7 +306,8 @@ TEST_F(libyuvTest, ScaleTo853) { ...@@ -297,7 +306,8 @@ TEST_F(libyuvTest, ScaleTo853) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_); static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1); EXPECT_LE(max_diff, 1);
} }
} }
...@@ -311,7 +321,8 @@ TEST_F(libyuvTest, ScaleTo853Wrong) { ...@@ -311,7 +321,8 @@ TEST_F(libyuvTest, ScaleTo853Wrong) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 0, benchmark_iterations_); static_cast<FilterMode>(f), 0,
benchmark_iterations_);
EXPECT_LE(max_diff, 1); EXPECT_LE(max_diff, 1);
} }
} }
...@@ -326,7 +337,8 @@ TEST_F(libyuvTest, ScaleTo684) { ...@@ -326,7 +337,8 @@ TEST_F(libyuvTest, ScaleTo684) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_); static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1); EXPECT_LE(max_diff, 1);
} }
} }
...@@ -340,7 +352,8 @@ TEST_F(libyuvTest, ScaleTo342) { ...@@ -340,7 +352,8 @@ TEST_F(libyuvTest, ScaleTo342) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_); static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1); EXPECT_LE(max_diff, 1);
} }
} }
...@@ -354,7 +367,8 @@ TEST_F(libyuvTest, ScaleToHalf342) { ...@@ -354,7 +367,8 @@ TEST_F(libyuvTest, ScaleToHalf342) {
for (int f = 0; f < 3; ++f) { for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height, int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height, dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_); static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1); EXPECT_LE(max_diff, 1);
} }
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "unit_test/unit_test.h" #include "../unit_test/unit_test.h"
#include <stdlib.h> // For getenv() #include <stdlib.h> // For getenv()
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#ifdef WIN32 #ifdef WIN32
#include <windows.h> #include <windows.h>
static double get_time() { static inline double get_time() {
LARGE_INTEGER t, f; LARGE_INTEGER t, f;
QueryPerformanceCounter(&t); QueryPerformanceCounter(&t);
QueryPerformanceFrequency(&f); QueryPerformanceFrequency(&f);
...@@ -51,7 +51,7 @@ static double get_time() { ...@@ -51,7 +51,7 @@ static double get_time() {
#include <sys/time.h> #include <sys/time.h>
#include <sys/resource.h> #include <sys/resource.h>
static double get_time() { static inline double get_time() {
struct timeval t; struct timeval t;
struct timezone tzp; struct timezone tzp;
gettimeofday(&t, &tzp); gettimeofday(&t, &tzp);
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "libyuv/basic_types.h" #include "libyuv/basic_types.h"
#include "libyuv/version.h" #include "libyuv/version.h"
#include "unit_test/unit_test.h" #include "../unit_test/unit_test.h"
namespace libyuv { 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