Commit 5e24e55f authored by fbarchard@google.com's avatar fbarchard@google.com

Couple fixes for scale common

BUG=none
TESTED=local build
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@897 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 980150f7
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 896
Version: 897
License: BSD
License File: LICENSE
......
......@@ -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
......@@ -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;
}
......
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