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

Scale exit early if simple version used

BUG=none
TEST=none
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@921 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 06ed6258
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 920 Version: 921
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 920 #define LIBYUV_VERSION 921
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
...@@ -407,18 +407,15 @@ static void ScalePlaneBox(int src_width, int src_height, ...@@ -407,18 +407,15 @@ static void ScalePlaneBox(int src_width, int src_height,
src, dst); src, dst);
dst += dst_stride; dst += dst_stride;
} }
} else { return;
}
// TODO(fbarchard): Remove kMaxStride limitation.
SIMD_ALIGNED(uint16 row[kMaxStride]); SIMD_ALIGNED(uint16 row[kMaxStride]);
void (*ScaleAddRows)(const uint8* src_ptr, ptrdiff_t src_stride, void (*ScaleAddRows)(const uint8* src_ptr, ptrdiff_t src_stride,
uint16* dst_ptr, int src_width, int src_height) = uint16* dst_ptr, int src_width, int src_height) = ScaleAddRows_C;
ScaleAddRows_C;
void (*ScaleAddCols)(int dst_width, int boxheight, int x, int dx, void (*ScaleAddCols)(int dst_width, int boxheight, int x, int dx,
const uint16* src_ptr, uint8* dst_ptr); const uint16* src_ptr, uint8* dst_ptr) =
if (dx & 0xffff) { (dx & 0xffff) ? ScaleAddCols2_C: ScaleAddCols1_C;
ScaleAddCols = ScaleAddCols2_C;
} else {
ScaleAddCols = ScaleAddCols1_C;
}
#if defined(HAS_SCALEADDROWS_SSE2) #if defined(HAS_SCALEADDROWS_SSE2)
if (TestCpuFlag(kCpuHasSSE2) && if (TestCpuFlag(kCpuHasSSE2) &&
#ifdef AVOID_OVERREAD #ifdef AVOID_OVERREAD
...@@ -441,7 +438,7 @@ static void ScalePlaneBox(int src_width, int src_height, ...@@ -441,7 +438,7 @@ static void ScalePlaneBox(int src_width, int src_height,
ScaleAddCols(dst_width, boxheight, x, dx, row, dst_ptr); ScaleAddCols(dst_width, boxheight, x, dx, row, dst_ptr);
dst_ptr += dst_stride; dst_ptr += dst_stride;
} }
}
} }
// Scale plane down with bilinear interpolation. // Scale plane down with bilinear interpolation.
......
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