Commit f0ada0e9 authored by fbarchard@google.com's avatar fbarchard@google.com

Pad source RGB buffer by 16 to allow overread in ARGBToRGB24

BUG=94
TEST=Build bots
Review URL: https://webrtc-codereview.appspot.com/827004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@370 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 797e9ef8
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 368
Version: 370
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 368
#define LIBYUV_VERSION 370
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -320,13 +320,14 @@ TESTATOB(YUY2, 2, 2, ARGB, 4)
TESTATOB(UYVY, 2, 2, ARGB, 4)
TESTATOB(M420, 3 / 2, 1, ARGB, 4)
static const int kReadPad = 16; // Allow overread of 16 bytes.
#define TESTATOBRANDOM(FMT_A, BPP_A, STRIDE_A, FMT_B, BPP_B) \
TEST_F(libyuvTest, FMT_A##To##FMT_B##_Random) { \
srandom(time(NULL)); \
for (int times = 0; times < benchmark_iterations_; ++times) { \
const int kWidth = (random() & 63) + 1; \
const int kHeight = (random() & 31) + 1; \
align_buffer_page_end(src_argb, (kWidth * BPP_A) * kHeight); \
align_buffer_page_end(src_argb, (kWidth * BPP_A) * kHeight + kReadPad); \
align_buffer_page_end(dst_argb_c, (kWidth * BPP_B) * kHeight); \
align_buffer_page_end(dst_argb_opt, (kWidth * BPP_B) * kHeight); \
for (int i = 0; i < kHeight * kWidth * BPP_A; ++i) { \
......
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