mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-01-01 03:12:16 +08:00
make const int into int
BUG=none TEST=lint Review URL: https://webrtc-codereview.appspot.com/766007 git-svn-id: http://libyuv.googlecode.com/svn/trunk@338 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
26d088e770
commit
b8f820af71
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 337
|
||||
Version: 338
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 337
|
||||
#define LIBYUV_VERSION 338
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -19,7 +19,7 @@ namespace libyuv {
|
||||
|
||||
static int ARGBTestRotate(int src_width, int src_height,
|
||||
int dst_width, int dst_height,
|
||||
libyuv::RotationMode mode, const int runs) {
|
||||
libyuv::RotationMode mode, int runs) {
|
||||
const int b = 128;
|
||||
int src_argb_plane_size = (src_width + b * 2) * (src_height + b * 2) * 4;
|
||||
int src_stride_argb = (b * 2 + src_width) * 4;
|
||||
|
||||
@ -19,7 +19,7 @@ namespace libyuv {
|
||||
|
||||
static int ARGBTestFilter(int src_width, int src_height,
|
||||
int dst_width, int dst_height,
|
||||
FilterMode f, int benchmark_iterations_) {
|
||||
FilterMode f, int benchmark_iterations) {
|
||||
const int b = 128;
|
||||
int src_argb_plane_size = (src_width + b * 2) * (src_height + b * 2) * 4;
|
||||
int src_stride_argb = (b * 2 + src_width) * 4;
|
||||
@ -58,23 +58,23 @@ static int ARGBTestFilter(int src_width, int src_height,
|
||||
|
||||
MaskCpuFlags(0); // Disable all CPU optimization.
|
||||
double c_time = get_time();
|
||||
for (i = 0; i < benchmark_iterations_; ++i) {
|
||||
for (i = 0; i < benchmark_iterations; ++i) {
|
||||
ARGBScale(src_argb + (src_stride_argb * b) + b * 4, src_stride_argb,
|
||||
src_width, src_height,
|
||||
dst_argb_c + (dst_stride_argb * b) + b * 4, dst_stride_argb,
|
||||
dst_width, dst_height, f);
|
||||
}
|
||||
c_time = (get_time() - c_time) / benchmark_iterations_;
|
||||
c_time = (get_time() - c_time) / benchmark_iterations;
|
||||
|
||||
MaskCpuFlags(-1); // Enable all CPU optimization.
|
||||
double opt_time = get_time();
|
||||
for (i = 0; i < benchmark_iterations_; ++i) {
|
||||
for (i = 0; i < benchmark_iterations; ++i) {
|
||||
ARGBScale(src_argb + (src_stride_argb * b) + b * 4, src_stride_argb,
|
||||
src_width, src_height,
|
||||
dst_argb_opt + (dst_stride_argb * b) + b * 4, dst_stride_argb,
|
||||
dst_width, dst_height, f);
|
||||
}
|
||||
opt_time = (get_time() - opt_time) / benchmark_iterations_;
|
||||
opt_time = (get_time() - opt_time) / benchmark_iterations;
|
||||
|
||||
// Report performance of C vs OPT
|
||||
printf("filter %d - %8d us C - %8d us OPT\n",
|
||||
|
||||
@ -19,7 +19,7 @@ namespace libyuv {
|
||||
|
||||
static int TestFilter(int src_width, int src_height,
|
||||
int dst_width, int dst_height,
|
||||
FilterMode f, int rounding, int benchmark_iterations_) {
|
||||
FilterMode f, int rounding, int benchmark_iterations) {
|
||||
const int b = 128 * rounding;
|
||||
int src_width_uv = (src_width + rounding) >> 1;
|
||||
int src_height_uv = (src_height + rounding) >> 1;
|
||||
@ -88,7 +88,7 @@ static int TestFilter(int src_width, int src_height,
|
||||
|
||||
MaskCpuFlags(0); // Disable all CPU optimization.
|
||||
double c_time = get_time();
|
||||
for (i = 0; i < benchmark_iterations_; ++i) {
|
||||
for (i = 0; i < benchmark_iterations; ++i) {
|
||||
I420Scale(src_y + (src_stride_y * b) + b, src_stride_y,
|
||||
src_u + (src_stride_uv * b) + b, src_stride_uv,
|
||||
src_v + (src_stride_uv * b) + b, src_stride_uv,
|
||||
@ -98,11 +98,11 @@ static int TestFilter(int src_width, int src_height,
|
||||
dst_v_c + (dst_stride_uv * b) + b, dst_stride_uv,
|
||||
dst_width, dst_height, f);
|
||||
}
|
||||
c_time = (get_time() - c_time) / benchmark_iterations_;
|
||||
c_time = (get_time() - c_time) / benchmark_iterations;
|
||||
|
||||
MaskCpuFlags(-1); // Enable all CPU optimization.
|
||||
double opt_time = get_time();
|
||||
for (i = 0; i < benchmark_iterations_; ++i) {
|
||||
for (i = 0; i < benchmark_iterations; ++i) {
|
||||
I420Scale(src_y + (src_stride_y * b) + b, src_stride_y,
|
||||
src_u + (src_stride_uv * b) + b, src_stride_uv,
|
||||
src_v + (src_stride_uv * b) + b, src_stride_uv,
|
||||
@ -112,7 +112,7 @@ static int TestFilter(int src_width, int src_height,
|
||||
dst_v_opt + (dst_stride_uv * b) + b, dst_stride_uv,
|
||||
dst_width, dst_height, f);
|
||||
}
|
||||
opt_time = (get_time() - opt_time) / benchmark_iterations_;
|
||||
opt_time = (get_time() - opt_time) / benchmark_iterations;
|
||||
|
||||
// Report performance of C vs OPT
|
||||
printf("filter %d - %8d us C - %8d us OPT\n",
|
||||
@ -186,7 +186,7 @@ TEST_F(libyuvTest, ScaleDownBy4) {
|
||||
int max_diff = TestFilter(src_width, src_height,
|
||||
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.
|
||||
EXPECT_LE(max_diff, 2); // This is the only scale factor with error of 2.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user