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
This commit is contained in:
fbarchard@google.com 2013-05-06 21:57:25 +00:00
parent 48085a2267
commit 74df2a521d
3 changed files with 4 additions and 10 deletions

View File

@ -1,6 +1,6 @@
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 686
Version: 687
License: BSD
License File: LICENSE

View File

@ -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

View File

@ -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) {