diff options
author | Frank Barchard <fbarchard@google.com> | 2020-10-13 19:56:28 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-14 06:23:26 +0000 |
commit | a4ec5cf9c2a183e389d3fddd9c239e87af56db68 (patch) | |
tree | 0bd374ed4902a1cc5273c881489b38d114728c4d /include/libyuv/scale_row.h | |
parent | 725c64015d10977d0bd021028c00d11099a42f8d (diff) | |
download | libyuv-a4ec5cf9c2a183e389d3fddd9c239e87af56db68.tar.gz |
UVScale down use AVX2 and Neon for aarch32
Intel SkylakeX
Was SSSE3 UVScaleDownBy4_Box (2496 ms)
Now AVX2 UVScaleDownBy4_Box (1983 ms)
Was SSSE3 UVScaleDownBy2_Box (380 ms)
Now AVX2 UVScaleDownBy2_Box (360 ms)
Pixel 4 aarch32
Was UVScaleDownBy4_Box (4295 ms)
Now UVScaleDownBy4_Box (3307 ms)
Was UVScaleDownBy2_Box (1022 ms)
Now UVScaleDownBy2_Box (778 ms)
Bug: libuyv:838
Change-Id: Ic823fa15e5761c1b9a897da27341adbf1ed39883
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2470196
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'include/libyuv/scale_row.h')
-rw-r--r-- | include/libyuv/scale_row.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/include/libyuv/scale_row.h b/include/libyuv/scale_row.h index 9ebc1002..88858240 100644 --- a/include/libyuv/scale_row.h +++ b/include/libyuv/scale_row.h @@ -79,6 +79,15 @@ extern "C" { #define HAS_SCALEUVROWDOWN2BOX_SSSE3 #endif +// The following are available for gcc/clang x86 platforms, but +// require clang 3.4 or gcc 4.7. +// TODO(fbarchard): Port to Visual C +#if !defined(LIBYUV_DISABLE_X86) && \ + (defined(__x86_64__) || defined(__i386__)) && !defined(_MSC_VER) && \ + (defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2)) +#define HAS_SCALEUVROWDOWN2BOX_AVX2 +#endif + // The following are available on all x86 platforms, but // require VS2012, clang 3.4 or gcc 4.7. // The code supports NaCL but requires a new compiler and validator. @@ -103,10 +112,6 @@ extern "C" { #define HAS_SCALEROWDOWN34_NEON #define HAS_SCALEROWDOWN38_NEON #define HAS_SCALEROWDOWN4_NEON -#endif - -// The following are available on 64 bit Neon platforms: -#if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) #define HAS_SCALEUVROWDOWN2BOX_NEON #endif @@ -854,6 +859,10 @@ void ScaleUVRowDown2Box_SSSE3(const uint8_t* src_ptr, ptrdiff_t src_stride, uint8_t* dst_uv, int dst_width); +void ScaleUVRowDown2Box_AVX2(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_uv, + int dst_width); void ScaleUVRowDown2_NEON(const uint8_t* src_ptr, ptrdiff_t src_stride, uint8_t* dst, @@ -902,6 +911,10 @@ void ScaleUVRowDown2Box_Any_SSSE3(const uint8_t* src_ptr, ptrdiff_t src_stride, uint8_t* dst_ptr, int dst_width); +void ScaleUVRowDown2Box_Any_AVX2(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width); void ScaleUVRowDown2_Any_NEON(const uint8_t* src_ptr, ptrdiff_t src_stride, uint8_t* dst_ptr, |