| Index: source/libvpx/third_party/libyuv/include/libyuv/scale_row.h
|
| diff --git a/source/libvpx/third_party/libyuv/include/libyuv/scale_row.h b/source/libvpx/third_party/libyuv/include/libyuv/scale_row.h
|
| index 27aa04b220266d6176fa523e240e95312fe1b5bc..94ad9cf86b82c45e0cdbaf37f56d6da930daa4b1 100644
|
| --- a/source/libvpx/third_party/libyuv/include/libyuv/scale_row.h
|
| +++ b/source/libvpx/third_party/libyuv/include/libyuv/scale_row.h
|
| @@ -12,45 +12,66 @@
|
| #define INCLUDE_LIBYUV_SCALE_ROW_H_
|
|
|
| #include "libyuv/basic_types.h"
|
| +#include "libyuv/scale.h"
|
|
|
| #ifdef __cplusplus
|
| namespace libyuv {
|
| extern "C" {
|
| #endif
|
|
|
| -#if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
| - defined(TARGET_IPHONE_SIMULATOR)
|
| +#if defined(__pnacl__) || defined(__CLR_VER) || \
|
| + (defined(__i386__) && !defined(__SSE2__))
|
| #define LIBYUV_DISABLE_X86
|
| #endif
|
|
|
| +// Visual C 2012 required for AVX2.
|
| +#if defined(_M_IX86) && !defined(__clang__) && \
|
| + defined(_MSC_VER) && _MSC_VER >= 1700
|
| +#define VISUALC_HAS_AVX2 1
|
| +#endif // VisualStudio >= 2012
|
| +
|
| // The following are available on all x86 platforms:
|
| #if !defined(LIBYUV_DISABLE_X86) && \
|
| (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
|
| +#define HAS_FIXEDDIV1_X86
|
| +#define HAS_FIXEDDIV_X86
|
| +#define HAS_SCALEARGBCOLS_SSE2
|
| +#define HAS_SCALEARGBCOLSUP2_SSE2
|
| +#define HAS_SCALEARGBFILTERCOLS_SSSE3
|
| +#define HAS_SCALEARGBROWDOWN2_SSE2
|
| +#define HAS_SCALEARGBROWDOWNEVEN_SSE2
|
| +#define HAS_SCALECOLSUP2_SSE2
|
| +#define HAS_SCALEFILTERCOLS_SSSE3
|
| #define HAS_SCALEROWDOWN2_SSE2
|
| -#define HAS_SCALEROWDOWN4_SSE2
|
| #define HAS_SCALEROWDOWN34_SSSE3
|
| #define HAS_SCALEROWDOWN38_SSSE3
|
| -#define HAS_SCALEADDROWS_SSE2
|
| -#define HAS_SCALEFILTERCOLS_SSSE3
|
| -#define HAS_SCALECOLSUP2_SSE2
|
| -#define HAS_SCALEARGBROWDOWN2_SSE2
|
| -#define HAS_SCALEARGBROWDOWNEVEN_SSE2
|
| -#define HAS_SCALEARGBCOLS_SSE2
|
| -#define HAS_SCALEARGBFILTERCOLS_SSSE3
|
| -#define HAS_SCALEARGBCOLSUP2_SSE2
|
| -#define HAS_FIXEDDIV_X86
|
| -#define HAS_FIXEDDIV1_X86
|
| +#define HAS_SCALEROWDOWN4_SSE2
|
| +#endif
|
| +
|
| +// The following are available on VS2012:
|
| +#if !defined(LIBYUV_DISABLE_X86) && defined(VISUALC_HAS_AVX2)
|
| +#define HAS_SCALEADDROW_AVX2
|
| +#define HAS_SCALEROWDOWN2_AVX2
|
| +#define HAS_SCALEROWDOWN4_AVX2
|
| +#endif
|
| +
|
| +// The following are available on Visual C:
|
| +#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && !defined(__clang__)
|
| +#define HAS_SCALEADDROW_SSE2
|
| #endif
|
|
|
| // The following are available on Neon platforms:
|
| #if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \
|
| (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__))
|
| +#define HAS_SCALEARGBCOLS_NEON
|
| +#define HAS_SCALEARGBROWDOWN2_NEON
|
| +#define HAS_SCALEARGBROWDOWNEVEN_NEON
|
| +#define HAS_SCALEFILTERCOLS_NEON
|
| #define HAS_SCALEROWDOWN2_NEON
|
| -#define HAS_SCALEROWDOWN4_NEON
|
| #define HAS_SCALEROWDOWN34_NEON
|
| #define HAS_SCALEROWDOWN38_NEON
|
| -#define HAS_SCALEARGBROWDOWNEVEN_NEON
|
| -#define HAS_SCALEARGBROWDOWN2_NEON
|
| +#define HAS_SCALEROWDOWN4_NEON
|
| +#define HAS_SCALEARGBFILTERCOLS_NEON
|
| #endif
|
|
|
| // The following are available on Mips platforms:
|
| @@ -164,10 +185,8 @@ void ScaleRowDown38_2_Box_C(const uint8* src_ptr, ptrdiff_t src_stride,
|
| uint8* dst_ptr, int dst_width);
|
| void ScaleRowDown38_2_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
|
| uint16* dst_ptr, int dst_width);
|
| -void ScaleAddRows_C(const uint8* src_ptr, ptrdiff_t src_stride,
|
| - uint16* dst_ptr, int src_width, int src_height);
|
| -void ScaleAddRows_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
|
| - uint32* dst_ptr, int src_width, int src_height);
|
| +void ScaleAddRow_C(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
| +void ScaleAddRow_16_C(const uint16* src_ptr, uint32* dst_ptr, int src_width);
|
| void ScaleARGBRowDown2_C(const uint8* src_argb,
|
| ptrdiff_t src_stride,
|
| uint8* dst_argb, int dst_width);
|
| @@ -194,16 +213,28 @@ void ScaleARGBFilterCols_C(uint8* dst_argb, const uint8* src_argb,
|
| void ScaleARGBFilterCols64_C(uint8* dst_argb, const uint8* src_argb,
|
| int dst_width, int x, int dx);
|
|
|
| +// Specialized scalers for x86.
|
| void ScaleRowDown2_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| uint8* dst_ptr, int dst_width);
|
| void ScaleRowDown2Linear_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| uint8* dst_ptr, int dst_width);
|
| void ScaleRowDown2Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown2_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown2Linear_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown2Box_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| void ScaleRowDown4_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| uint8* dst_ptr, int dst_width);
|
| void ScaleRowDown4Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown4_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown4Box_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +
|
| void ScaleRowDown34_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride,
|
| uint8* dst_ptr, int dst_width);
|
| void ScaleRowDown34_1_Box_SSSE3(const uint8* src_ptr,
|
| @@ -220,46 +251,124 @@ void ScaleRowDown38_3_Box_SSSE3(const uint8* src_ptr,
|
| void ScaleRowDown38_2_Box_SSSE3(const uint8* src_ptr,
|
| ptrdiff_t src_stride,
|
| uint8* dst_ptr, int dst_width);
|
| -void ScaleAddRows_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| - uint16* dst_ptr, int src_width,
|
| - int src_height);
|
| +void ScaleRowDown2_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown2Linear_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown2Box_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown2_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown2Linear_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown2Box_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown4_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown4Box_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown4_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown4Box_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +
|
| +void ScaleRowDown34_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown34_1_Box_Any_SSSE3(const uint8* src_ptr,
|
| + ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown34_0_Box_Any_SSSE3(const uint8* src_ptr,
|
| + ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown38_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown38_3_Box_Any_SSSE3(const uint8* src_ptr,
|
| + ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown38_2_Box_Any_SSSE3(const uint8* src_ptr,
|
| + ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +
|
| +void ScaleAddRow_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
| +void ScaleAddRow_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
| +void ScaleAddRow_Any_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
| +void ScaleAddRow_Any_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
| +
|
| void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
|
| int dst_width, int x, int dx);
|
| void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr,
|
| int dst_width, int x, int dx);
|
| -void ScaleARGBRowDown2_SSE2(const uint8* src_argb,
|
| - ptrdiff_t src_stride,
|
| - uint8* dst_argb, int dst_width);
|
| -void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb,
|
| - ptrdiff_t src_stride,
|
| - uint8* dst_argb, int dst_width);
|
| -void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb,
|
| - ptrdiff_t src_stride,
|
| - uint8* dst_argb, int dst_width);
|
| -void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
| - int src_stepx,
|
| - uint8* dst_argb, int dst_width);
|
| -void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb,
|
| - ptrdiff_t src_stride,
|
| - int src_stepx,
|
| - uint8* dst_argb, int dst_width);
|
| +
|
| +
|
| +// ARGB Column functions
|
| void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb,
|
| int dst_width, int x, int dx);
|
| void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb,
|
| int dst_width, int x, int dx);
|
| void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb,
|
| int dst_width, int x, int dx);
|
| -// Row functions.
|
| +void ScaleARGBFilterCols_NEON(uint8* dst_argb, const uint8* src_argb,
|
| + int dst_width, int x, int dx);
|
| +void ScaleARGBCols_NEON(uint8* dst_argb, const uint8* src_argb,
|
| + int dst_width, int x, int dx);
|
| +void ScaleARGBFilterCols_Any_NEON(uint8* dst_argb, const uint8* src_argb,
|
| + int dst_width, int x, int dx);
|
| +void ScaleARGBCols_Any_NEON(uint8* dst_argb, const uint8* src_argb,
|
| + int dst_width, int x, int dx);
|
| +
|
| +// ARGB Row functions
|
| +void ScaleARGBRowDown2_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
| + uint8* dst_argb, int dst_width);
|
| +void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
| + uint8* dst_argb, int dst_width);
|
| +void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
| + uint8* dst_argb, int dst_width);
|
| +void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst, int dst_width);
|
| +void ScaleARGBRowDown2Linear_NEON(const uint8* src_argb, ptrdiff_t src_stride,
|
| + uint8* dst_argb, int dst_width);
|
| +void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst, int dst_width);
|
| +void ScaleARGBRowDown2_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
| + uint8* dst_argb, int dst_width);
|
| +void ScaleARGBRowDown2Linear_Any_SSE2(const uint8* src_argb,
|
| + ptrdiff_t src_stride,
|
| + uint8* dst_argb, int dst_width);
|
| +void ScaleARGBRowDown2Box_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
| + uint8* dst_argb, int dst_width);
|
| +void ScaleARGBRowDown2_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst, int dst_width);
|
| +void ScaleARGBRowDown2Linear_Any_NEON(const uint8* src_argb,
|
| + ptrdiff_t src_stride,
|
| + uint8* dst_argb, int dst_width);
|
| +void ScaleARGBRowDown2Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst, int dst_width);
|
| +
|
| +void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
| + int src_stepx, uint8* dst_argb, int dst_width);
|
| +void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
| + int src_stepx,
|
| + uint8* dst_argb, int dst_width);
|
| void ScaleARGBRowDownEven_NEON(const uint8* src_argb, ptrdiff_t src_stride,
|
| int src_stepx,
|
| uint8* dst_argb, int dst_width);
|
| void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb, ptrdiff_t src_stride,
|
| int src_stepx,
|
| uint8* dst_argb, int dst_width);
|
| -void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| - uint8* dst, int dst_width);
|
| -void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| - uint8* dst, int dst_width);
|
| +void ScaleARGBRowDownEven_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
| + int src_stepx,
|
| + uint8* dst_argb, int dst_width);
|
| +void ScaleARGBRowDownEvenBox_Any_SSE2(const uint8* src_argb,
|
| + ptrdiff_t src_stride,
|
| + int src_stepx,
|
| + uint8* dst_argb, int dst_width);
|
| +void ScaleARGBRowDownEven_Any_NEON(const uint8* src_argb, ptrdiff_t src_stride,
|
| + int src_stepx,
|
| + uint8* dst_argb, int dst_width);
|
| +void ScaleARGBRowDownEvenBox_Any_NEON(const uint8* src_argb,
|
| + ptrdiff_t src_stride,
|
| + int src_stepx,
|
| + uint8* dst_argb, int dst_width);
|
|
|
| // ScaleRowDown2Box also used by planar functions
|
| // NEON downscalers with interpolation.
|
| @@ -267,7 +376,8 @@ void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| // Note - not static due to reuse in convert for 444 to 420.
|
| void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| uint8* dst, int dst_width);
|
| -
|
| +void ScaleRowDown2Linear_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst, int dst_width);
|
| void ScaleRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| uint8* dst, int dst_width);
|
|
|
| @@ -302,6 +412,42 @@ void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr,
|
| ptrdiff_t src_stride,
|
| uint8* dst_ptr, int dst_width);
|
|
|
| +void ScaleRowDown2_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst, int dst_width);
|
| +void ScaleRowDown2Linear_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst, int dst_width);
|
| +void ScaleRowDown2Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst, int dst_width);
|
| +void ScaleRowDown4_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown4Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown34_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown34_0_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +void ScaleRowDown34_1_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +// 32 -> 12
|
| +void ScaleRowDown38_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +// 32x3 -> 12x1
|
| +void ScaleRowDown38_3_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +// 32x2 -> 12x1
|
| +void ScaleRowDown38_2_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
| + uint8* dst_ptr, int dst_width);
|
| +
|
| +void ScaleAddRow_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
| +void ScaleAddRow_Any_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
| +
|
| +void ScaleFilterCols_NEON(uint8* dst_ptr, const uint8* src_ptr,
|
| + int dst_width, int x, int dx);
|
| +
|
| +void ScaleFilterCols_Any_NEON(uint8* dst_ptr, const uint8* src_ptr,
|
| + int dst_width, int x, int dx);
|
| +
|
| +
|
| void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
|
| uint8* dst, int dst_width);
|
| void ScaleRowDown2Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
|
|
|