Commit 74df2a52 authored by fbarchard@google.com's avatar fbarchard@google.com

Point upsample uncentered so last pixel is same width as first.

BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/1424004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@687 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 48085a22
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 686
Version: 687
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 686
#define LIBYUV_VERSION 687
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -1046,15 +1046,12 @@ static void ScaleARGBSimple(int src_width, int src_height,
ScaleARGBCols = ScaleARGBCols_SSE2;
}
#endif
int dx = 0;
int dy = 0;
int dx = (Abs(src_width) << 16) / dst_width;
int dy = (src_height << 16) / dst_height;
int x = 0;
int y = 0;
if (dst_width <= Abs(src_width)) {
dx = (Abs(src_width) << 16) / dst_width;
x = (dx >> 1) - 32768;
} else if (dst_width > 1) {
dx = ((Abs(src_width) - 1) << 16) / (dst_width - 1);
}
// Negative src_width means horizontally mirror.
if (src_width < 0) {
......@@ -1063,10 +1060,7 @@ static void ScaleARGBSimple(int src_width, int src_height,
src_width = -src_width;
}
if (dst_height <= src_height) {
dy = (src_height << 16) / dst_height;
y = (dy >> 1) - 32768;
} else if (dst_height > 1) {
dy = ((src_height - 1) << 16) / (dst_height - 1);
}
for (int i = 0; i < dst_height; ++i) {
......
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