mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
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 .
This commit is contained in:
parent
58cb534962
commit
8c196f4d4c
@ -1,6 +1,6 @@
|
||||
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, \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user