Commit 909c76e3 authored by fbarchard@google.com's avatar fbarchard@google.com

point sample 64 bit column filter

BUG=302
TESTED=ARGBScaleClipTo320x240_None etc
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@946 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 667de22f
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 942
Version: 946
License: BSD
License File: LICENSE
......
......@@ -140,6 +140,8 @@ void ScaleARGBRowDownEvenBox_C(const uint8* src_argb,
uint8* dst_argb, int dst_width);
void ScaleARGBCols_C(uint8* dst_argb, const uint8* src_argb,
int dst_width, int x, int dx);
void ScaleARGBCols64_C(uint8* dst_argb, const uint8* src_argb,
int dst_width, int x, int dx);
void ScaleARGBColsUp2_C(uint8* dst_argb, const uint8* src_argb,
int dst_width, int, int);
void ScaleARGBFilterCols_C(uint8* dst_argb, const uint8* src_argb,
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 942
#define LIBYUV_VERSION 946
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -322,8 +322,9 @@ static void ScaleARGBBilinearUp(int src_width, int src_height,
void (*ScaleARGBFilterCols)(uint8* dst_argb, const uint8* src_argb,
int dst_width, int x, int dx) =
filtering ? ScaleARGBFilterCols_C : ScaleARGBCols_C;
if (filtering && src_width >= 32768) {
ScaleARGBFilterCols = ScaleARGBFilterCols64_C;
if (src_width >= 32768) {
ScaleARGBFilterCols = filtering ?
ScaleARGBFilterCols64_C : ScaleARGBCols64_C;
}
#if defined(HAS_SCALEARGBFILTERCOLS_SSSE3)
if (filtering && TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) {
......@@ -508,8 +509,9 @@ static void ScaleYUVToARGBBilinearUp(int src_width, int src_height,
void (*ScaleARGBFilterCols)(uint8* dst_argb, const uint8* src_argb,
int dst_width, int x, int dx) =
filtering ? ScaleARGBFilterCols_C : ScaleARGBCols_C;
if (filtering && src_width >= 32768) {
ScaleARGBFilterCols = ScaleARGBFilterCols64_C;
if (src_width >= 32768) {
ScaleARGBFilterCols = filtering ?
ScaleARGBFilterCols64_C : ScaleARGBCols64_C;
}
#if defined(HAS_SCALEARGBFILTERCOLS_SSSE3)
if (filtering && TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) {
......@@ -622,9 +624,10 @@ static void ScaleARGBSimple(int src_width, int src_height,
const uint8* src_argb, uint8* dst_argb,
int x, int dx, int y, int dy) {
void (*ScaleARGBCols)(uint8* dst_argb, const uint8* src_argb,
int dst_width, int x, int dx) = ScaleARGBCols_C;
int dst_width, int x, int dx) =
(src_width >= 32768) ? ScaleARGBCols64_C : ScaleARGBCols_C;
#if defined(HAS_SCALEARGBCOLS_SSE2)
if (TestCpuFlag(kCpuHasSSE2)) {
if (TestCpuFlag(kCpuHasSSE2) && src_width < 32768) {
ScaleARGBCols = ScaleARGBCols_SSE2;
}
#endif
......
......@@ -427,6 +427,23 @@ void ScaleARGBCols_C(uint8* dst_argb, const uint8* src_argb,
}
}
void ScaleARGBCols64_C(uint8* dst_argb, const uint8* src_argb,
int dst_width, int x32, int dx) {
int64 x = static_cast<int64>(x32);
const uint32* src = reinterpret_cast<const uint32*>(src_argb);
uint32* dst = reinterpret_cast<uint32*>(dst_argb);
for (int j = 0; j < dst_width - 1; j += 2) {
dst[0] = src[x >> 16];
x += dx;
dst[1] = src[x >> 16];
x += dx;
dst += 2;
}
if (dst_width & 1) {
dst[0] = src[x >> 16];
}
}
// Scales a single row of pixels up by 2x using point sampling.
void ScaleARGBColsUp2_C(uint8* dst_argb, const uint8* src_argb,
int dst_width, int, int) {
......
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