diff --git a/README.chromium b/README.chromium index 3869dd6d8..4c60e7d8a 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 896 +Version: 897 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 981139b33..06836767a 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 896 +#define LIBYUV_VERSION 897 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/scale_common.cc b/source/scale_common.cc index 277a94e10..468aaa267 100644 --- a/source/scale_common.cc +++ b/source/scale_common.cc @@ -23,6 +23,10 @@ namespace libyuv { extern "C" { #endif +static __inline int Abs(int v) { + return v >= 0 ? v : -v; +} + // CPU agnostic row functions void ScaleRowDown2_C(const uint8* src_ptr, ptrdiff_t /* src_stride */, uint8* dst, int dst_width) { @@ -581,7 +585,7 @@ FilterMode ScaleFilterReduce(int src_width, int src_height, // Compute slope values for stepping. void ScaleSlope(int src_width, int src_height, - int dst_width, int src_height, + int dst_width, int dst_height, FilterMode filtering, int* x, int* y, int* dx, int* dy) { assert(x != NULL); @@ -634,7 +638,7 @@ void ScaleSlope(int src_width, int src_height, } // Negative src_width means horizontally mirror. if (src_width < 0) { - *x += (dst_width - 1) * dx; + *x += (dst_width - 1) * *dx; *dx = -*dx; src_width = -src_width; }