Commit 95d845bd authored by fbarchard@google.com's avatar fbarchard@google.com

benchmark only the opt version of rotate.

BUG=155
TEST=sudo LIBYUV_REPEAT=1000 nice --5 ./libyuv_unittest --gtest_filter=*Rotate*
Review URL: https://webrtc-codereview.appspot.com/939029

git-svn-id: http://libyuv.googlecode.com/svn/trunk@502 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent d6b94fde
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 501
Version: 502
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 501
#define LIBYUV_VERSION 502
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -105,7 +105,6 @@ void ScaleFilterRows_NEON(uint8* dst_ptr,
*
*/
// Constants for SSSE3 code
#elif !defined(YUV_DISABLE_ASM) && \
(defined(_M_IX86) || defined(__i386__) || defined(__x86_64__))
......@@ -225,6 +224,7 @@ static void ScaleRowDown2_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
ret
}
}
// Blends 32x2 rectangle to 16x1.
// Alignment requirement: src_ptr 16 byte aligned, dst_ptr 16 byte aligned.
__declspec(naked) __declspec(align(16))
......@@ -299,6 +299,7 @@ static void ScaleRowDown2_Unaligned_SSE2(const uint8* src_ptr,
ret
}
}
// Blends 32x2 rectangle to 16x1.
// Alignment requirement: src_ptr 16 byte aligned, dst_ptr 16 byte aligned.
__declspec(naked) __declspec(align(16))
......@@ -1241,9 +1242,7 @@ static void ScaleFilterRows_Unaligned_SSSE3(uint8* dst_ptr,
ret
}
}
#elif !defined(YUV_DISABLE_ASM) && (defined(__x86_64__) || defined(__i386__))
// GCC versions of row functions are verbatim conversions from Visual C.
// Generated using gcc disassembly on Visual C object file:
// objdump -D yuvscaler.obj >yuvscaler.txt
......@@ -1313,6 +1312,7 @@ void ScaleRowDown2Int_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
#endif
);
}
static void ScaleRowDown2_Unaligned_SSE2(const uint8* src_ptr,
ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width) {
......@@ -2569,7 +2569,6 @@ static void ScaleFilterRows_C(uint8* dst_ptr,
int y0_fraction = 256 - y1_fraction;
const uint8* src_ptr1 = src_ptr + src_stride;
for (int x = 0; x < dst_width - 1; x += 2) {
dst_ptr[0] = (src_ptr[0] * y0_fraction + src_ptr1[0] * y1_fraction) >> 8;
dst_ptr[1] = (src_ptr[1] * y0_fraction + src_ptr1[1] * y1_fraction) >> 8;
......
......@@ -56,12 +56,10 @@ static int ARGBTestRotate(int src_width, int src_height,
MaskCpuFlags(0); // Disable all CPU optimization.
double c_time = get_time();
for (i = 0; i < runs; ++i) {
ARGBRotate(src_argb + (src_stride_argb * b) + b * 4, src_stride_argb,
dst_argb_c + (dst_stride_argb * b) + b * 4, dst_stride_argb,
src_width, src_height, mode);
}
c_time = (get_time() - c_time) / runs;
ARGBRotate(src_argb + (src_stride_argb * b) + b * 4, src_stride_argb,
dst_argb_c + (dst_stride_argb * b) + b * 4, dst_stride_argb,
src_width, src_height, mode);
c_time = (get_time() - c_time);
MaskCpuFlags(-1); // Enable all CPU optimization.
double opt_time = get_time();
......
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