mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 17:26:49 +08:00
Add edge to sobel buffers to avoid overwrites.
BUG=296 TESTED=Sobel unittest in Effects R=tpsiaki@google.com Review URL: https://webrtc-codereview.appspot.com/6429004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@930 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
6b6eb8cd36
commit
49db7b7e4a
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 929
|
||||
Version: 930
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 929
|
||||
#define LIBYUV_VERSION 930
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -1908,10 +1908,10 @@ static int ARGBSobelize(const uint8* src_argb, int src_stride_argb,
|
||||
}
|
||||
#endif
|
||||
// 3 rows with edges before/after.
|
||||
const int kRowSize = (width + 15) & ~15;
|
||||
align_buffer_64(row_y, kEdge + kRowSize * 3);
|
||||
align_buffer_64(row_sobelx, width);
|
||||
align_buffer_64(row_sobely, width);
|
||||
const int kRowSize = (width + kEdge + 15) & ~15;
|
||||
align_buffer_64(row_y, kEdge + kRowSize * 3 + kEdge);
|
||||
align_buffer_64(row_sobelx, width + kEdge);
|
||||
align_buffer_64(row_sobely, width + kEdge);
|
||||
|
||||
// Convert first row.
|
||||
uint8* row_y0 = row_y + kEdge;
|
||||
@ -1919,7 +1919,7 @@ static int ARGBSobelize(const uint8* src_argb, int src_stride_argb,
|
||||
uint8* row_y2 = row_y1 + kRowSize;
|
||||
ARGBToBayerRow(src_argb, row_y0, 0x0d090501, width);
|
||||
row_y0[-1] = row_y0[0];
|
||||
memset(row_y0 + width, row_y0[width - 1], 16); // extrude 16 pixels.
|
||||
memset(row_y0 + width, row_y0[width - 1], 16); // Extrude 16 for valgrind.
|
||||
ARGBToBayerRow(src_argb, row_y1, 0x0d090501, width);
|
||||
row_y1[-1] = row_y1[0];
|
||||
memset(row_y1 + width, row_y1[width - 1], 16);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user