Closed GoogleCodeExporter closed 8 years ago
appears this is an overwrite on Y. In this loop:
for (y = 0; y < height - 1; y += 2) {
// Split Y from UV.
SplitUVRow(src_yuy2, dst_y, rows, awidth);
SplitUVRow(src_yuy2 + src_stride_yuy2, dst_y + dst_stride_y,
rows + awidth, awidth);
InterpolateRow(dst_uv, rows, awidth, awidth, 128);
src_yuy2 += src_stride_yuy2 * 2;
dst_y += dst_stride_y * 2;
dst_uv += dst_stride_uv;
}
when width is odd, an extra Y is output.
Original comment by fbarch...@google.com
on 16 Jan 2016 at 2:13
The following revision refers to this bug:
https://chromium.googlesource.com/libyuv/libyuv.git/+/58cb534962b86fc1b673a8f0835e98852a1754ff
commit 58cb534962b86fc1b673a8f0835e98852a1754ff
Author: Frank Barchard <fbarchard@google.com>
Date: Tue Jan 19 19:28:09 2016
Fix memory overwrite in YUY2ToNV12 odd wdiths
When width was odd Y channel wrote an extra pixel.
This change splits the Y from UV into a temporary
buffer and memcpy's to the destination. Performance
is slower.
Was
YUY2ToNV12_Any (307 ms)
YUY2ToNV12_Unaligned (213 ms)
TestYUY2ToNV12 (181 ms)
YUY2ToNV12_Opt (177 ms)
YUY2ToNV12_Invert (177 ms)
Npw
YUY2ToNV12_Any (300 ms)
YUY2ToNV12_Unaligned (226 ms)
YUY2ToNV12_Invert (206 ms)
TestYUY2ToNV12 (184 ms)
YUY2ToNV12_Opt (181 ms)
TBR=harryjin@google.com
BUG=libyuv:545
Review URL: https://codereview.chromium.org/1593833002 .
[modify]
http://crrev.com/58cb534962b86fc1b673a8f0835e98852a1754ff/README.chromium
[modify]
http://crrev.com/58cb534962b86fc1b673a8f0835e98852a1754ff/include/libyuv/version
.h
[modify]
http://crrev.com/58cb534962b86fc1b673a8f0835e98852a1754ff/source/planar_function
s.cc
[modify]
http://crrev.com/58cb534962b86fc1b673a8f0835e98852a1754ff/unit_test/convert_test
.cc
Original comment by bugdroid1@chromium.org
on 19 Jan 2016 at 7:28
Fixed in r1567
Original comment by fbarch...@google.com
on 19 Jan 2016 at 10:02
Original issue reported on code.google.com by
fbarch...@google.com
on 12 Jan 2016 at 2:39