Commit c23b817e authored by fbarchard@google.com's avatar fbarchard@google.com

64 bit clip for argb scale down

BUG=302
TEST=out\release\libyuv_unittest --gtest_filter=*ARGBScaleDownClipBy3by4*
R=tpsiaki@google.com

Review URL: https://webrtc-codereview.appspot.com/6549004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@947 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 909c76e3
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 946
Version: 947
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 946
#define LIBYUV_VERSION 947
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -171,9 +171,9 @@ static void ScaleARGBBilinearDown(int src_width, int src_height,
assert(src_height > 0);
assert(dst_width > 0);
assert(dst_height > 0);
int xlast = x + (dst_width - 1) * dx;
int xl = (dx >= 0) ? x : xlast;
int xr = (dx >= 0) ? xlast : x;
int64 xlast = x + static_cast<int64>(dst_width - 1) * dx;
int64 xl = (dx >= 0) ? x : xlast;
int64 xr = (dx >= 0) ? xlast : x;
xl = (xl >> 16) & ~3; // Left edge aligned.
xr = (xr >> 16) + 1; // Right most pixel used.
int clip_src_width = (((xr - xl) + 1 + 3) & ~3) * 4; // Width aligned to 4.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment