Commit 8c196f4d authored by Frank Barchard's avatar Frank Barchard

Fix testi420 unittest for odd height

When the image height for unittests was set to an
odd height, the TestI420 unittest would not fill
the complete source buffer.  This change handles
the odd height test case.
No change to library code.

TBR=harryjin@google.com
BUG=libyuv:549

Review URL: https://codereview.chromium.org/1609103002 .
parent 58cb5349
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 1567
Version: 1568
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1567
#define LIBYUV_VERSION 1568
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -81,7 +81,19 @@ namespace libyuv {
} \
p += HN; \
} \
\
if ((benchmark_height_ & 1) && HS == 2) { \
for (int x = 0; x < benchmark_width_ - 1; x += 2) { \
uint8 r = static_cast<uint8>(fastrand()); \
p[0] = r; \
p[1] = r; \
p += 2; \
} \
if (benchmark_width_ & 1) { \
uint8 r = static_cast<uint8>(fastrand()); \
p[0] = r; \
p += 1; \
} \
} \
/* Start with YUV converted to ARGB. */ \
YUVTOARGB(orig_y, benchmark_width_, \
orig_u, (benchmark_width_ + 1) / 2, \
......
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