mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
Save and restore last 16 bytes of filtered rows when used for ARGBInterpolate.
BUG=50 TEST=none Review URL: https://webrtc-codereview.appspot.com/673012 git-svn-id: http://libyuv.googlecode.com/svn/trunk@303 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
05b5cf9610
commit
b50e0572f2
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 302
|
Version: 303
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -217,6 +217,7 @@ int ARGBShade(const uint8* src_argb, int src_stride_argb,
|
|||||||
// 'interpolation' is specified as 8 bit fraction where 0 means 100% src_argb0
|
// 'interpolation' is specified as 8 bit fraction where 0 means 100% src_argb0
|
||||||
// and 255 means 1% src_argb0 and 99% src_argb1.
|
// and 255 means 1% src_argb0 and 99% src_argb1.
|
||||||
// Internally uses ARGBScale bilinear filtering.
|
// Internally uses ARGBScale bilinear filtering.
|
||||||
|
// Caveat: This function will write up to 16 bytes beyond the end of dst_argb.
|
||||||
int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0,
|
int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0,
|
||||||
const uint8* src_argb1, int src_stride_argb1,
|
const uint8* src_argb1, int src_stride_argb1,
|
||||||
uint8* dst_argb, int dst_stride_argb,
|
uint8* dst_argb, int dst_stride_argb,
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 302
|
#define LIBYUV_VERSION 303
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||||
|
|||||||
@ -1147,9 +1147,13 @@ int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0,
|
|||||||
ScaleARGBFilterRows = ScaleARGBFilterRows_SSSE3;
|
ScaleARGBFilterRows = ScaleARGBFilterRows_SSSE3;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
uint8 last16[16];
|
||||||
for (int y = 0; y < height; ++y) {
|
for (int y = 0; y < height; ++y) {
|
||||||
|
// Filter extrudes edge for its scaling purpose.
|
||||||
|
memcpy(last16, dst_argb + width * 4, 16); // Save last 16 beyond end.
|
||||||
ScaleARGBFilterRows(dst_argb, src_argb0, src_argb1 - src_argb0,
|
ScaleARGBFilterRows(dst_argb, src_argb0, src_argb1 - src_argb0,
|
||||||
width, interpolation);
|
width, interpolation);
|
||||||
|
memcpy(dst_argb + width * 4, last16, 16); // Restore last 16 beyond end.
|
||||||
src_argb0 += src_stride_argb0;
|
src_argb0 += src_stride_argb0;
|
||||||
src_argb1 += src_stride_argb1;
|
src_argb1 += src_stride_argb1;
|
||||||
dst_argb += dst_stride_argb;
|
dst_argb += dst_stride_argb;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user