Commit 5bf4de08 authored by Frank Barchard's avatar Frank Barchard

width and 3 bug fix in odd width support of ARGBToI411

TBR=harryjin@google.com
BUG=none

Review URL: https://codereview.chromium.org/1415213002 .
parent ba4b409d
...@@ -678,17 +678,17 @@ ANY1(ARGBSetRow_Any_NEON, ARGBSetRow_NEON, uint32, 4, 3) ...@@ -678,17 +678,17 @@ ANY1(ARGBSetRow_Any_NEON, ARGBSetRow_NEON, uint32, 4, 3)
temp + SS(r, UVSHIFT) * BPP - BPP, 4); \ temp + SS(r, UVSHIFT) * BPP - BPP, 4); \
} \ } \
/* repeat last 4 - 12 bytes for 411 subsampler */ \ /* repeat last 4 - 12 bytes for 411 subsampler */ \
if (((width & 1) == 1) && BPP == 4 && DUVSHIFT == 2) { \ if (((width & 3) == 1) && BPP == 4 && DUVSHIFT == 2) { \
memcpy(temp + SS(r, UVSHIFT) * BPP, \ memcpy(temp + SS(r, UVSHIFT) * BPP, \
temp + SS(r, UVSHIFT) * BPP - BPP, 4); \ temp + SS(r, UVSHIFT) * BPP - BPP, 4); \
memcpy(temp + SS(r, UVSHIFT) * BPP + 4, \ memcpy(temp + SS(r, UVSHIFT) * BPP + 4, \
temp + SS(r, UVSHIFT) * BPP - BPP, 8); \ temp + SS(r, UVSHIFT) * BPP - BPP, 8); \
} \ } \
if (((width & 1) == 2) && BPP == 4 && DUVSHIFT == 2) { \ if (((width & 3) == 2) && BPP == 4 && DUVSHIFT == 2) { \
memcpy(temp + SS(r, UVSHIFT) * BPP, \ memcpy(temp + SS(r, UVSHIFT) * BPP, \
temp + SS(r, UVSHIFT) * BPP - BPP * 2, 8); \ temp + SS(r, UVSHIFT) * BPP - BPP * 2, 8); \
} \ } \
if (((width & 1) == 3) && BPP == 4 && DUVSHIFT == 2) { \ if (((width & 3) == 3) && BPP == 4 && DUVSHIFT == 2) { \
memcpy(temp + SS(r, UVSHIFT) * BPP, \ memcpy(temp + SS(r, UVSHIFT) * BPP, \
temp + SS(r, UVSHIFT) * BPP - BPP, 4); \ temp + SS(r, UVSHIFT) * BPP - BPP, 4); \
} \ } \
......
...@@ -33,7 +33,7 @@ DEFINE_int32(libyuv_flags, 0, "cpu flags for reference code. 0 = C -1 = asm"); ...@@ -33,7 +33,7 @@ DEFINE_int32(libyuv_flags, 0, "cpu flags for reference code. 0 = C -1 = asm");
// Set flags to -1 for benchmarking to avoid slower C code. // Set flags to -1 for benchmarking to avoid slower C code.
LibYUVConvertTest::LibYUVConvertTest() : LibYUVConvertTest::LibYUVConvertTest() :
benchmark_iterations_(BENCHMARK_ITERATIONS), benchmark_width_(128), benchmark_iterations_(BENCHMARK_ITERATIONS), benchmark_width_(130),
benchmark_height_(72), disable_cpu_flags_(0) { benchmark_height_(72), disable_cpu_flags_(0) {
const char* repeat = getenv("LIBYUV_REPEAT"); const char* repeat = getenv("LIBYUV_REPEAT");
if (repeat) { if (repeat) {
......
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