From 5f29eaafae3814eb7f615ebea66a22823bdee7e4 Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Sun, 8 Dec 2013 18:03:00 +0000 Subject: [PATCH] Fix for off by one in scale - only source should be src - 0x10001 because dest will hit exact pixel. BUG=292 TESTED=valgrind Review URL: https://webrtc-codereview.appspot.com/5359004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@902 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- README.chromium | 2 +- include/libyuv/version.h | 2 +- source/scale_common.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.chromium b/README.chromium index 37bb847e5..ddca5a06a 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 898 +Version: 902 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index d8037ff83..83ae6f4fa 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 898 +#define LIBYUV_VERSION 902 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/scale_common.cc b/source/scale_common.cc index b0ba1e846..ba8507795 100644 --- a/source/scale_common.cc +++ b/source/scale_common.cc @@ -581,7 +581,7 @@ FilterMode ScaleFilterReduce(int src_width, int src_height, #define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s) #define FIXEDDIV1(src, dst) FixedDiv((src << 16) - 0x00010001, \ - (dst << 16) - 0x00010001); + (dst << 16) - 0x00010000); // Compute slope values for stepping. void ScaleSlope(int src_width, int src_height,