mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 01:06:46 +08:00
Reenable AVX2 scaling with bug fix for any width
BUG=376 TESTED=unittest on scale functions R=brucedawson@google.com, harryjin@google.com Review URL: https://webrtc-codereview.appspot.com/30759004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@1135 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
4165437c3e
commit
af6f25245e
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 1134
|
||||
Version: 1135
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -201,8 +201,7 @@ extern "C" {
|
||||
#define HAS_ARGBTOYJROW_AVX2
|
||||
#define HAS_ARGBTOYROW_AVX2
|
||||
#define HAS_I422TOARGBROW_AVX2
|
||||
// TODO(fbarchard): fix bug #376.
|
||||
// #define HAS_INTERPOLATEROW_AVX2
|
||||
#define HAS_INTERPOLATEROW_AVX2
|
||||
#define HAS_MERGEUVROW_AVX2
|
||||
#define HAS_MIRRORROW_AVX2
|
||||
#define HAS_SPLITUVROW_AVX2
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 1134
|
||||
#define LIBYUV_VERSION 1135
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -581,24 +581,20 @@ YANY(ARGBShuffleRow_Any_NEON, ARGBShuffleRow_NEON,
|
||||
}
|
||||
|
||||
#ifdef HAS_INTERPOLATEROW_AVX2
|
||||
NANY(InterpolateRow_Any_AVX2, InterpolateRow_AVX2,
|
||||
InterpolateRow_C, 1, 1, 32)
|
||||
NANY(InterpolateRow_Any_AVX2, InterpolateRow_AVX2, InterpolateRow_C, 1, 1, 31)
|
||||
#endif
|
||||
#ifdef HAS_INTERPOLATEROW_SSSE3
|
||||
NANY(InterpolateRow_Any_SSSE3, InterpolateRow_SSSE3,
|
||||
InterpolateRow_C, 1, 1, 15)
|
||||
NANY(InterpolateRow_Any_SSSE3, InterpolateRow_SSSE3, InterpolateRow_C, 1, 1, 15)
|
||||
#endif
|
||||
#ifdef HAS_INTERPOLATEROW_SSE2
|
||||
NANY(InterpolateRow_Any_SSE2, InterpolateRow_SSE2,
|
||||
InterpolateRow_C, 1, 1, 15)
|
||||
NANY(InterpolateRow_Any_SSE2, InterpolateRow_SSE2, InterpolateRow_C, 1, 1, 15)
|
||||
#endif
|
||||
#ifdef HAS_INTERPOLATEROW_NEON
|
||||
NANY(InterpolateRow_Any_NEON, InterpolateRow_NEON,
|
||||
InterpolateRow_C, 1, 1, 15)
|
||||
NANY(InterpolateRow_Any_NEON, InterpolateRow_NEON, InterpolateRow_C, 1, 1, 15)
|
||||
#endif
|
||||
#ifdef HAS_INTERPOLATEROW_MIPS_DSPR2
|
||||
NANY(InterpolateRow_Any_MIPS_DSPR2, InterpolateRow_MIPS_DSPR2,
|
||||
InterpolateRow_C, 1, 1, 3)
|
||||
NANY(InterpolateRow_Any_MIPS_DSPR2, InterpolateRow_MIPS_DSPR2, InterpolateRow_C,
|
||||
1, 1, 3)
|
||||
#endif
|
||||
#undef NANY
|
||||
|
||||
|
||||
@ -4972,7 +4972,7 @@ void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride,
|
||||
#endif // HAS_ARGBAFFINEROW_SSE2
|
||||
|
||||
#ifdef HAS_INTERPOLATEROW_AVX2
|
||||
// Bilinear filter 16x2 -> 16x1
|
||||
// Bilinear filter 32x2 -> 32x1
|
||||
__declspec(naked) __declspec(align(16))
|
||||
void InterpolateRow_AVX2(uint8* dst_ptr, const uint8* src_ptr,
|
||||
ptrdiff_t src_stride, int dst_width,
|
||||
@ -5027,8 +5027,9 @@ void InterpolateRow_AVX2(uint8* dst_ptr, const uint8* src_ptr,
|
||||
align 4
|
||||
xloop25:
|
||||
vmovdqu ymm0, [esi]
|
||||
vpavgb ymm0, ymm0, [esi + edx]
|
||||
vpavgb ymm0, ymm0, [esi + edx]
|
||||
vmovdqu ymm1, [esi + edx]
|
||||
vpavgb ymm0, ymm0, ymm1
|
||||
vpavgb ymm0, ymm0, ymm1
|
||||
sub ecx, 32
|
||||
vmovdqu [esi + edi], ymm0
|
||||
lea esi, [esi + 32]
|
||||
@ -5039,7 +5040,8 @@ void InterpolateRow_AVX2(uint8* dst_ptr, const uint8* src_ptr,
|
||||
align 4
|
||||
xloop50:
|
||||
vmovdqu ymm0, [esi]
|
||||
vpavgb ymm0, ymm0, [esi + edx]
|
||||
vmovdqu ymm1, [esi + edx]
|
||||
vpavgb ymm0, ymm0, ymm1
|
||||
sub ecx, 32
|
||||
vmovdqu [esi + edi], ymm0
|
||||
lea esi, [esi + 32]
|
||||
@ -5049,9 +5051,10 @@ void InterpolateRow_AVX2(uint8* dst_ptr, const uint8* src_ptr,
|
||||
// Blend 75 / 25.
|
||||
align 4
|
||||
xloop75:
|
||||
vmovdqu ymm1, [esi]
|
||||
vmovdqu ymm0, [esi + edx]
|
||||
vpavgb ymm0, ymm0, [esi]
|
||||
vpavgb ymm0, ymm0, [esi]
|
||||
vpavgb ymm0, ymm0, ymm1
|
||||
vpavgb ymm0, ymm0, ymm1
|
||||
sub ecx, 32
|
||||
vmovdqu [esi + edi], ymm0
|
||||
lea esi, [esi + 32]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user