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
URL: http://code.google.com/p/libyuv/
Version: 361
Version: 362
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 361
#define LIBYUV_VERSION 362
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -12,7 +12,7 @@
#include <string.h>
#include <time.h>
#include "unit_test/unit_test.h"
#include "../unit_test/unit_test.h"
#include "libyuv/basic_types.h"
#include "libyuv/compare.h"
#include "libyuv/cpu_id.h"
......
......@@ -14,7 +14,7 @@
#include "libyuv/basic_types.h"
#include "libyuv/cpu_id.h"
#include "libyuv/version.h"
#include "unit_test/unit_test.h"
#include "../unit_test/unit_test.h"
namespace libyuv {
......@@ -59,7 +59,6 @@ TEST_F(libyuvTest, TestCpuId) {
CpuId(cpu_info, 0);
cpu_info[0] = cpu_info[1]; // Reorder output
cpu_info[1] = cpu_info[3];
cpu_info[2] = cpu_info[2];
cpu_info[3] = 0;
printf("Cpu Vendor: %s %x %x %x\n", reinterpret_cast<char*>(&cpu_info[0]),
cpu_info[0], cpu_info[1], cpu_info[2]);
......
......@@ -17,7 +17,7 @@
#include "libyuv/format_conversion.h"
#include "libyuv/planar_functions.h"
#include "libyuv/rotate.h"
#include "unit_test/unit_test.h"
#include "../unit_test/unit_test.h"
#if defined(_MSC_VER)
#define SIMD_ALIGNED(var) __declspec(align(16)) var
......@@ -97,7 +97,8 @@ TESTPLANARTOB(I422, 2, 1, ARGB, 4)
TESTPLANARTOB(I444, 1, 1, ARGB, 4)
TESTPLANARTOB(I420, 2, 2, YUY2, 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, BayerBGGR, 1)
TESTPLANARTOB(I420, 2, 2, BayerRGGB, 1)
......
......@@ -13,7 +13,7 @@
#include "libyuv/cpu_id.h"
#include "libyuv/rotate_argb.h"
#include "unit_test/unit_test.h"
#include "../unit_test/unit_test.h"
namespace libyuv {
......
......@@ -12,7 +12,7 @@
#include <time.h>
#include "libyuv/rotate.h"
#include "unit_test/unit_test.h"
#include "../unit_test/unit_test.h"
namespace libyuv {
......@@ -29,7 +29,7 @@ TEST_F(libyuvTest, Transpose) {
int iw, ih, ow, oh;
int err = 0;
for (iw = 8; iw < rotate_max_w_ && !err; ++iw)
for (iw = 8; iw < rotate_max_w_ && !err; ++iw) {
for (ih = 8; ih < rotate_max_h_ && !err; ++ih) {
int i;
ow = ih;
......@@ -39,15 +39,17 @@ TEST_F(libyuvTest, Transpose) {
align_buffer_16(output_1, ow * oh)
align_buffer_16(output_2, iw * ih)
for (i = 0; i < iw * ih; ++i)
for (i = 0; i < iw * ih; ++i) {
input[i] = i;
}
TransposePlane(input, iw, output_1, ow, iw, ih);
TransposePlane(output_1, ow, output_2, oh, ow, oh);
for (i = 0; i < iw * ih; ++i) {
if (input[i] != output_2[i])
if (input[i] != output_2[i]) {
err++;
}
}
if (err) {
......@@ -65,6 +67,7 @@ TEST_F(libyuvTest, Transpose) {
free_aligned_buffer_16(output_1)
free_aligned_buffer_16(output_2)
}
}
EXPECT_EQ(0, err);
}
......@@ -73,7 +76,7 @@ TEST_F(libyuvTest, TransposeUV) {
int iw, ih, ow, oh;
int err = 0;
for (iw = 16; iw < rotate_max_w_ && !err; iw += 2)
for (iw = 16; iw < rotate_max_w_ && !err; iw += 2) {
for (ih = 8; ih < rotate_max_h_ && !err; ++ih) {
int i;
......@@ -97,10 +100,12 @@ TEST_F(libyuvTest, TransposeUV) {
TransposePlane(output_b1, ow, output_b2, oh, ow, oh);
for (i = 0; i < iw * ih; i += 2) {
if (input[i] != output_a2[i >> 1])
if (input[i] != output_a2[i >> 1]) {
err++;
if (input[i + 1] != output_b2[i >> 1])
}
if (input[i + 1] != output_b2[i >> 1]) {
err++;
}
}
if (err) {
......@@ -122,6 +127,7 @@ TEST_F(libyuvTest, TransposeUV) {
free_aligned_buffer_16(output_a2)
free_aligned_buffer_16(output_b2)
}
}
EXPECT_EQ(0, err);
}
......@@ -130,7 +136,7 @@ TEST_F(libyuvTest, RotatePlane90) {
int iw, ih, ow, oh;
int err = 0;
for (iw = 8; iw < rotate_max_w_ && !err; ++iw)
for (iw = 8; iw < rotate_max_w_ && !err; ++iw) {
for (ih = 8; ih < rotate_max_h_ && !err; ++ih) {
int i;
......@@ -143,8 +149,9 @@ TEST_F(libyuvTest, RotatePlane90) {
align_buffer_16(output_180, iw * ih)
align_buffer_16(output_270, ow * oh)
for (i = 0; i < iw * ih; ++i)
for (i = 0; i < iw * ih; ++i) {
input[i] = i;
}
RotatePlane90(input, iw, output_90, ow, iw, ih);
RotatePlane90(output_90, ow, output_180, oh, ow, oh);
......@@ -152,8 +159,9 @@ TEST_F(libyuvTest, RotatePlane90) {
RotatePlane90(output_270, ow, output_0, iw, ow, oh);
for (i = 0; i < iw * ih; ++i) {
if (input[i] != output_0[i])
if (input[i] != output_0[i]) {
err++;
}
}
if (err) {
......@@ -179,6 +187,7 @@ TEST_F(libyuvTest, RotatePlane90) {
free_aligned_buffer_16(output_180)
free_aligned_buffer_16(output_270)
}
}
EXPECT_EQ(0, err);
}
......@@ -187,7 +196,7 @@ TEST_F(libyuvTest, RotateUV90) {
int iw, ih, ow, oh;
int err = 0;
for (iw = 16; iw < rotate_max_w_ && !err; iw += 2)
for (iw = 16; iw < rotate_max_w_ && !err; iw += 2) {
for (ih = 8; ih < rotate_max_h_ && !err; ++ih) {
int i;
......@@ -216,10 +225,12 @@ TEST_F(libyuvTest, RotateUV90) {
RotatePlane180(output_180_v, ow, output_0_v, ow, ow, oh);
for (i = 0; i < (ow * oh); ++i) {
if (output_0_u[i] != (uint8)i)
if (output_0_u[i] != (uint8)i) {
err++;
if (output_0_v[i] != (uint8)(-i))
}
if (output_0_v[i] != (uint8)(-i)) {
err++;
}
}
if (err) {
......@@ -253,6 +264,7 @@ TEST_F(libyuvTest, RotateUV90) {
free_aligned_buffer_16(output_180_u)
free_aligned_buffer_16(output_180_v)
}
}
EXPECT_EQ(0, err);
}
......@@ -261,7 +273,7 @@ TEST_F(libyuvTest, RotateUV180) {
int iw, ih, ow, oh;
int err = 0;
for (iw = 16; iw < rotate_max_w_ && !err; iw += 2)
for (iw = 16; iw < rotate_max_w_ && !err; iw += 2) {
for (ih = 8; ih < rotate_max_h_ && !err; ++ih) {
int i;
......@@ -290,10 +302,12 @@ TEST_F(libyuvTest, RotateUV180) {
RotatePlane90(output_90_v, oh, output_0_v, ow, oh, ow);
for (i = 0; i < (ow * oh); ++i) {
if (output_0_u[i] != (uint8)i)
if (output_0_u[i] != (uint8)i) {
err++;
if (output_0_v[i] != (uint8)(-i))
}
if (output_0_v[i] != (uint8)(-i)) {
err++;
}
}
if (err) {
......@@ -327,6 +341,7 @@ TEST_F(libyuvTest, RotateUV180) {
free_aligned_buffer_16(output_180_u)
free_aligned_buffer_16(output_180_v)
}
}
EXPECT_EQ(0, err);
}
......@@ -335,7 +350,7 @@ TEST_F(libyuvTest, RotateUV270) {
int iw, ih, ow, oh;
int err = 0;
for (iw = 16; iw < rotate_max_w_ && !err; iw += 2)
for (iw = 16; iw < rotate_max_w_ && !err; iw += 2) {
for (ih = 8; ih < rotate_max_h_ && !err; ++ih) {
int i;
......@@ -365,10 +380,12 @@ TEST_F(libyuvTest, RotateUV270) {
RotatePlane180(output_180_v, ow, output_0_v, ow, ow, oh);
for (i = 0; i < (ow * oh); ++i) {
if (output_0_u[i] != (uint8)i)
if (output_0_u[i] != (uint8)i) {
err++;
if (output_0_v[i] != (uint8)(-i))
}
if (output_0_v[i] != (uint8)(-i)) {
err++;
}
}
if (err) {
......@@ -402,6 +419,7 @@ TEST_F(libyuvTest, RotateUV270) {
free_aligned_buffer_16(output_180_u)
free_aligned_buffer_16(output_180_v)
}
}
EXPECT_EQ(0, err);
}
......@@ -421,15 +439,17 @@ TEST_F(libyuvTest, RotatePlane180) {
align_buffer_16(output_0, iw * ih)
align_buffer_16(output_180, iw * ih)
for (i = 0; i < iw * ih; ++i)
for (i = 0; i < iw * ih; ++i) {
input[i] = i;
}
RotatePlane180(input, iw, output_180, ow, iw, ih);
RotatePlane180(output_180, ow, output_0, iw, ow, oh);
for (i = 0; i < iw * ih; ++i) {
if (input[i] != output_0[i])
if (input[i] != output_0[i]) {
err++;
}
}
if (err) {
......@@ -455,7 +475,7 @@ TEST_F(libyuvTest, RotatePlane270) {
int iw, ih, ow, oh;
int err = 0;
for (iw = 8; iw < rotate_max_w_ && !err; ++iw)
for (iw = 8; iw < rotate_max_w_ && !err; ++iw) {
for (ih = 8; ih < rotate_max_h_ && !err; ++ih) {
int i;
......@@ -477,8 +497,9 @@ TEST_F(libyuvTest, RotatePlane270) {
RotatePlane270(output_90, ow, output_0, iw, ow, oh);
for (i = 0; i < iw * ih; ++i) {
if (input[i] != output_0[i])
if (input[i] != output_0[i]) {
err++;
}
}
if (err) {
......@@ -504,6 +525,7 @@ TEST_F(libyuvTest, RotatePlane270) {
free_aligned_buffer_16(output_180)
free_aligned_buffer_16(output_270)
}
}
EXPECT_EQ(0, err);
}
......@@ -523,15 +545,17 @@ TEST_F(libyuvTest, RotatePlane90and270) {
align_buffer_16(output_0, iw * ih)
align_buffer_16(output_90, ow * oh)
for (i = 0; i < iw * ih; ++i)
for (i = 0; i < iw * ih; ++i) {
input[i] = i;
}
RotatePlane90(input, iw, output_90, ow, iw, ih);
RotatePlane270(output_90, ow, output_0, iw, ow, oh);
for (i = 0; i < iw * ih; ++i) {
if (input[i] != output_0[i])
if (input[i] != output_0[i]) {
err++;
}
}
if (err) {
......@@ -568,8 +592,9 @@ TEST_F(libyuvTest, RotatePlane90Pitch) {
align_buffer_16(output_0, iw * ih)
align_buffer_16(output_90, ow * oh)
for (i = 0; i < iw * ih; ++i)
for (i = 0; i < iw * ih; ++i) {
input[i] = i;
}
RotatePlane90(input, iw,
output_90 + (ow >> 1), ow,
......@@ -587,8 +612,9 @@ TEST_F(libyuvTest, RotatePlane90Pitch) {
RotatePlane270(output_90, ih, output_0, iw, ow, oh);
for (i = 0; i < iw * ih; ++i) {
if (input[i] != output_0[i])
if (input[i] != output_0[i]) {
err++;
}
}
if (err) {
......@@ -614,7 +640,7 @@ TEST_F(libyuvTest, RotatePlane270Pitch) {
int iw, ih, ow, oh;
int err = 0;
for (iw = 16; iw < rotate_max_w_ && !err; iw += 4)
for (iw = 16; iw < rotate_max_w_ && !err; iw += 4) {
for (ih = 16; ih < rotate_max_h_ && !err; ih += 4) {
int i;
......@@ -625,8 +651,9 @@ TEST_F(libyuvTest, RotatePlane270Pitch) {
align_buffer_16(output_0, iw * ih)
align_buffer_16(output_270, ow * oh)
for (i = 0; i < iw * ih; ++i)
for (i = 0; i < iw * ih; ++i) {
input[i] = i;
}
RotatePlane270(input, iw,
output_270 + ow * (oh >> 1), ow,
......@@ -644,8 +671,9 @@ TEST_F(libyuvTest, RotatePlane270Pitch) {
RotatePlane90(output_270, ih, output_0, iw, ow, oh);
for (i = 0; i < iw * ih; ++i) {
if (input[i] != output_0[i])
if (input[i] != output_0[i]) {
err++;
}
}
if (err) {
......@@ -663,6 +691,7 @@ TEST_F(libyuvTest, RotatePlane270Pitch) {
free_aligned_buffer_16(output_0)
free_aligned_buffer_16(output_270)
}
}
EXPECT_EQ(0, err);
}
......@@ -760,15 +789,18 @@ TEST_F(libyuvTest, I420Rotate90) {
kRotateClockwise);
for (i = 0; i < y_plane_size; ++i) {
if (orig_y[i] != ro0_y[i])
if (orig_y[i] != ro0_y[i]) {
++err;
}
}
for (i = 0; i < uv_plane_size; ++i) {
if (orig_u[i] != ro0_u[i])
if (orig_u[i] != ro0_u[i]) {
++err;
if (orig_v[i] != ro0_v[i])
}
if (orig_v[i] != ro0_v[i]) {
++err;
}
}
free_aligned_buffer_16(orig_y)
......@@ -880,15 +912,18 @@ TEST_F(libyuvTest, I420Rotate270) {
kRotateCounterClockwise);
for (i = 0; i < y_plane_size; ++i) {
if (orig_y[i] != ro0_y[i])
if (orig_y[i] != ro0_y[i]) {
++err;
}
}
for (i = 0; i < uv_plane_size; ++i) {
if (orig_u[i] != ro0_u[i])
if (orig_u[i] != ro0_u[i]) {
++err;
if (orig_v[i] != ro0_v[i])
}
if (orig_v[i] != ro0_v[i]) {
++err;
}
}
free_aligned_buffer_16(orig_y)
......@@ -990,14 +1025,17 @@ TEST_F(libyuvTest, NV12ToI420Rotate90) {
int zero_cnt = 0;
for (i = 0; i < uv_plane_size; ++i) {
if ((signed char)ro0_u[i] != -(signed char)ro0_v[i])
if ((signed char)ro0_u[i] != -(signed char)ro0_v[i]) {
++err;
if (ro0_u[i] != 0)
}
if (ro0_u[i] != 0) {
++zero_cnt;
}
}
if (!zero_cnt)
if (!zero_cnt) {
++err;
}
free_aligned_buffer_16(orig_y)
free_aligned_buffer_16(orig_uv)
......@@ -1095,14 +1133,17 @@ TEST_F(libyuvTest, NV12ToI420Rotate270) {
int zero_cnt = 0;
for (i = 0; i < uv_plane_size; ++i) {
if ((signed char)ro0_u[i] != -(signed char)ro0_v[i])
if ((signed char)ro0_u[i] != -(signed char)ro0_v[i]) {
++err;
if (ro0_u[i] != 0)
}
if (ro0_u[i] != 0) {
++zero_cnt;
}
}
if (!zero_cnt)
if (!zero_cnt) {
++err;
}
free_aligned_buffer_16(orig_y)
free_aligned_buffer_16(orig_uv)
......@@ -1189,21 +1230,25 @@ TEST_F(libyuvTest, NV12ToI420Rotate180) {
kRotate180);
for (i = 0; i < y_plane_size; ++i) {
if (orig_y[i] != ro0_y[i])
if (orig_y[i] != ro0_y[i]) {
++err;
}
}
int zero_cnt = 0;
for (i = 0; i < uv_plane_size; ++i) {
if ((signed char)ro0_u[i] != -(signed char)ro0_v[i])
if ((signed char)ro0_u[i] != -(signed char)ro0_v[i]) {
++err;
if (ro0_u[i] != 0)
}
if (ro0_u[i] != 0) {
++zero_cnt;
}
}
if (!zero_cnt)
if (!zero_cnt) {
++err;
}
free_aligned_buffer_16(orig_y)
free_aligned_buffer_16(orig_uv)
......@@ -1308,8 +1353,9 @@ TEST_F(libyuvTest, NV12ToI420RotateNegHeight90) {
kRotate180);
for (i = 0; i < y_plane_size; ++i) {
if (orig_y[i] != roc_y[i])
if (orig_y[i] != roc_y[i]) {
++y_err;
}
}
if (y_err) {
......@@ -1329,14 +1375,17 @@ TEST_F(libyuvTest, NV12ToI420RotateNegHeight90) {
int zero_cnt = 0;
for (i = 0; i < uv_plane_size; ++i) {
if ((signed char)roc_u[i] != -(signed char)roc_v[i])
if ((signed char)roc_u[i] != -(signed char)roc_v[i]) {
++uv_err;
if (rob_u[i] != 0)
}
if (rob_u[i] != 0) {
++zero_cnt;
}
}
if (!zero_cnt)
if (!zero_cnt) {
++uv_err;
}
if (uv_err) {
printf("input %dx%d \n", uvw * 2, uvh);
......@@ -1460,14 +1509,17 @@ TEST_F(libyuvTest, NV12ToI420RotateNegHeight180) {
int zero_cnt = 0;
for (i = 0; i < uv_plane_size; ++i) {
if ((signed char)rob_u[i] != -(signed char)rob_v[i])
if ((signed char)rob_u[i] != -(signed char)rob_v[i]) {
++uv_err;
if (rob_u[i] != 0)
}
if (rob_u[i] != 0) {
++zero_cnt;
}
}
if (!zero_cnt)
if (!zero_cnt) {
++uv_err;
}
if (uv_err) {
printf("input %dx%d \n", uvw * 2, uvh);
......
......@@ -13,7 +13,7 @@
#include "libyuv/cpu_id.h"
#include "libyuv/scale_argb.h"
#include "unit_test/unit_test.h"
#include "../unit_test/unit_test.h"
namespace libyuv {
......
......@@ -13,7 +13,7 @@
#include "libyuv/cpu_id.h"
#include "libyuv/scale.h"
#include "unit_test/unit_test.h"
#include "../unit_test/unit_test.h"
namespace libyuv {
......@@ -170,8 +170,9 @@ TEST_F(libyuvTest, ScaleDownBy2) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1);
}
}
......@@ -184,8 +185,9 @@ TEST_F(libyuvTest, ScaleDownBy4) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 2); // This is the only scale factor with error of 2.
}
}
......@@ -198,8 +200,9 @@ TEST_F(libyuvTest, ScaleDownBy5) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1);
}
}
......@@ -212,8 +215,9 @@ TEST_F(libyuvTest, ScaleDownBy8) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1);
}
}
......@@ -226,8 +230,9 @@ TEST_F(libyuvTest, ScaleDownBy16) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1);
}
}
......@@ -240,8 +245,9 @@ TEST_F(libyuvTest, ScaleDownBy34) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1);
}
}
......@@ -254,8 +260,9 @@ TEST_F(libyuvTest, ScaleDownBy38) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1);
}
}
......@@ -268,8 +275,9 @@ TEST_F(libyuvTest, ScaleTo1366) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1);
}
}
......@@ -282,8 +290,9 @@ TEST_F(libyuvTest, ScaleTo4074) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1);
}
}
......@@ -296,8 +305,9 @@ TEST_F(libyuvTest, ScaleTo853) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1);
}
}
......@@ -310,8 +320,9 @@ TEST_F(libyuvTest, ScaleTo853Wrong) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 0, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 0,
benchmark_iterations_);
EXPECT_LE(max_diff, 1);
}
}
......@@ -325,8 +336,9 @@ TEST_F(libyuvTest, ScaleTo684) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1);
}
}
......@@ -339,8 +351,9 @@ TEST_F(libyuvTest, ScaleTo342) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1);
}
}
......@@ -353,8 +366,9 @@ TEST_F(libyuvTest, ScaleToHalf342) {
for (int f = 0; f < 3; ++f) {
int max_diff = TestFilter(src_width, src_height,
dst_width, dst_height,
static_cast<FilterMode>(f), 1, benchmark_iterations_);
dst_width, dst_height,
static_cast<FilterMode>(f), 1,
benchmark_iterations_);
EXPECT_LE(max_diff, 1);
}
}
......
......@@ -8,7 +8,7 @@
* 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()
......
......@@ -37,7 +37,7 @@
#ifdef WIN32
#include <windows.h>
static double get_time() {
static inline double get_time() {
LARGE_INTEGER t, f;
QueryPerformanceCounter(&t);
QueryPerformanceFrequency(&f);
......@@ -51,7 +51,7 @@ static double get_time() {
#include <sys/time.h>
#include <sys/resource.h>
static double get_time() {
static inline double get_time() {
struct timeval t;
struct timezone tzp;
gettimeofday(&t, &tzp);
......
......@@ -13,7 +13,7 @@
#include "libyuv/basic_types.h"
#include "libyuv/version.h"
#include "unit_test/unit_test.h"
#include "../unit_test/unit_test.h"
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