diff --git a/README.chromium b/README.chromium index cd616ef4e..df1bb03ea 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 775 +Version: 776 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index b099745b1..2ca2d3c3d 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 775 +#define LIBYUV_VERSION 776 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/scale.cc b/source/scale.cc index 87930be92..1c58b95e3 100644 --- a/source/scale.cc +++ b/source/scale.cc @@ -22,6 +22,9 @@ namespace libyuv { extern "C" { #endif +// Remove this macro if OVERREAD is safe. +#define AVOID_OVERREAD 1 + static __inline int Abs(int v) { return v >= 0 ? v : -v; } @@ -741,6 +744,7 @@ static void ScaleRowDown38_2_Box_SSSE3(const uint8* src_ptr, #define HAS_SCALEADDROWS_SSE2 // Reads 16xN bytes and produces 16 shorts at a time. +// TODO(fbarchard): Make this handle 4xN bytes for any width ARGB. __declspec(naked) __declspec(align(16)) static void ScaleAddRows_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, uint16* dst_ptr, int src_width, @@ -2046,6 +2050,9 @@ static void ScalePlaneBox(int src_width, int src_height, } #if defined(HAS_SCALEADDROWS_SSE2) if (TestCpuFlag(kCpuHasSSE2) && +#ifdef AVOID_OVERREAD + IS_ALIGNED(src_width, 16) && +#endif IS_ALIGNED(src_ptr, 16) && IS_ALIGNED(src_stride, 16)) { ScaleAddRows = ScaleAddRows_SSE2; }