diff --git a/README.chromium b/README.chromium index c1c7e599e..155d77623 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 302 +Version: 303 License: BSD License File: LICENSE diff --git a/include/libyuv/planar_functions.h b/include/libyuv/planar_functions.h index 7ee27c191..9d5c4c779 100644 --- a/include/libyuv/planar_functions.h +++ b/include/libyuv/planar_functions.h @@ -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 // and 255 means 1% src_argb0 and 99% src_argb1. // 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, const uint8* src_argb1, int src_stride_argb1, uint8* dst_argb, int dst_stride_argb, diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 3d6f6b2fa..a0c6720d9 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 302 +#define LIBYUV_VERSION 303 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/planar_functions.cc b/source/planar_functions.cc index 8b5dc853f..473cc92bf 100644 --- a/source/planar_functions.cc +++ b/source/planar_functions.cc @@ -1147,9 +1147,13 @@ int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0, ScaleARGBFilterRows = ScaleARGBFilterRows_SSSE3; } #endif + uint8 last16[16]; 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, width, interpolation); + memcpy(dst_argb + width * 4, last16, 16); // Restore last 16 beyond end. src_argb0 += src_stride_argb0; src_argb1 += src_stride_argb1; dst_argb += dst_stride_argb;