mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 17:26:49 +08:00
HAVE_ARGBAFFINEROW_SSE2 macro
BUG=62 TEST=none Review URL: https://webrtc-codereview.appspot.com/716006 git-svn-id: http://libyuv.googlecode.com/svn/trunk@316 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
92e51c7a69
commit
2a95465795
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 314
|
||||
Version: 315
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -232,8 +232,11 @@ int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0,
|
||||
// of destination. Useful for scaling, rotation, mirror, texture mapping.
|
||||
void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride,
|
||||
uint8* dst_argb, const float* uv_dudv, int width);
|
||||
#if defined(_MSC_VER)
|
||||
void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride,
|
||||
uint8* dst_argb, const float* uv_dudv, int width);
|
||||
#define HAS_ARGBAFFINEROW_SSE2
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 314
|
||||
#define LIBYUV_VERSION 315
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -918,25 +918,28 @@ TEST_F(libyuvTest, TestAffine) {
|
||||
EXPECT_EQ(96u, interpolate_pixels_C[128][0]);
|
||||
EXPECT_EQ(191u, interpolate_pixels_C[255][3]);
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(HAS_ARGBAFFINEROW_SSE2)
|
||||
ARGBAffineRow_SSE2(&orig_pixels_0[0][0], 0, &interpolate_pixels_Opt[0][0],
|
||||
uv_step, 256);
|
||||
EXPECT_EQ(0, memcmp(interpolate_pixels_Opt, interpolate_pixels_C, 256 * 4));
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(HAS_ARGBAFFINEROW_SSE2)
|
||||
int has_sse2 = TestCpuFlag(kCpuHasSSE2);
|
||||
if (has_sse2) {
|
||||
for (int i = 0; i < 1000 * 1280 * 720 / 256; ++i) {
|
||||
ARGBAffineRow_SSE2(&orig_pixels_0[0][0], 0, &interpolate_pixels_Opt[0][0],
|
||||
uv_step, 256);
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
#endif
|
||||
for (int i = 0; i < 1000 * 1280 * 720 / 256; ++i) {
|
||||
ARGBAffineRow_C(&orig_pixels_0[0][0], 0, &interpolate_pixels_C[0][0],
|
||||
uv_step, 256);
|
||||
for (int i = 0; i < 1000 * 1280 * 720 / 256; ++i) {
|
||||
ARGBAffineRow_C(&orig_pixels_0[0][0], 0, &interpolate_pixels_C[0][0],
|
||||
uv_step, 256);
|
||||
}
|
||||
#if defined(HAS_ARGBAFFINEROW_SSE2)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace libyuv
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user