From a711ce3df5435925678955cd52f94ed6e609ac2e Mon Sep 17 00:00:00 2001 From: Pauli Oikkonen Date: Wed, 16 Jan 2019 19:57:53 +0200 Subject: [PATCH] Inline fixed width vectorized SAD functions --- src/strategies/avx2/reg_sad_pow2_widths-avx2.h | 4 ++-- src/strategies/sse41/reg_sad_pow2_widths-sse41.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/strategies/avx2/reg_sad_pow2_widths-avx2.h b/src/strategies/avx2/reg_sad_pow2_widths-avx2.h index 3bdb49ab..51f1f660 100644 --- a/src/strategies/avx2/reg_sad_pow2_widths-avx2.h +++ b/src/strategies/avx2/reg_sad_pow2_widths-avx2.h @@ -4,7 +4,7 @@ #include "strategies/sse41/reg_sad_pow2_widths-sse41.h" #include "kvazaar.h" -static uint32_t reg_sad_w32(const kvz_pixel * const data1, const kvz_pixel * const data2, +static INLINE uint32_t reg_sad_w32(const kvz_pixel * const data1, const kvz_pixel * const data2, const int32_t height, const uint32_t stride1, const uint32_t stride2) { @@ -28,7 +28,7 @@ static uint32_t reg_sad_w32(const kvz_pixel * const data1, const kvz_pixel * con return _mm_cvtsi128_si32(sad); } -static uint32_t reg_sad_w64(const kvz_pixel * const data1, const kvz_pixel * const data2, +static INLINE uint32_t reg_sad_w64(const kvz_pixel * const data1, const kvz_pixel * const data2, const int32_t height, const uint32_t stride1, const uint32_t stride2) { diff --git a/src/strategies/sse41/reg_sad_pow2_widths-sse41.h b/src/strategies/sse41/reg_sad_pow2_widths-sse41.h index 88ad3e35..666dba26 100644 --- a/src/strategies/sse41/reg_sad_pow2_widths-sse41.h +++ b/src/strategies/sse41/reg_sad_pow2_widths-sse41.h @@ -4,7 +4,7 @@ #include #include "kvazaar.h" -static uint32_t reg_sad_w4(const kvz_pixel * const data1, const kvz_pixel * const data2, +static INLINE uint32_t reg_sad_w4(const kvz_pixel * const data1, const kvz_pixel * const data2, const int32_t height, const uint32_t stride1, const uint32_t stride2) { @@ -43,7 +43,7 @@ static uint32_t reg_sad_w4(const kvz_pixel * const data1, const kvz_pixel * cons return _mm_cvtsi128_si32(sad); } -static uint32_t reg_sad_w8(const kvz_pixel * const data1, const kvz_pixel * const data2, +static INLINE uint32_t reg_sad_w8(const kvz_pixel * const data1, const kvz_pixel * const data2, const int32_t height, const uint32_t stride1, const uint32_t stride2) { @@ -82,7 +82,7 @@ static uint32_t reg_sad_w8(const kvz_pixel * const data1, const kvz_pixel * cons return result; } -static uint32_t reg_sad_w12(const kvz_pixel * const data1, const kvz_pixel * const data2, +static INLINE uint32_t reg_sad_w12(const kvz_pixel * const data1, const kvz_pixel * const data2, const int32_t height, const uint32_t stride1, const uint32_t stride2) { @@ -101,7 +101,7 @@ static uint32_t reg_sad_w12(const kvz_pixel * const data1, const kvz_pixel * con return _mm_cvtsi128_si32(sad); } -static uint32_t reg_sad_w16(const kvz_pixel * const data1, const kvz_pixel * const data2, +static INLINE uint32_t reg_sad_w16(const kvz_pixel * const data1, const kvz_pixel * const data2, const int32_t height, const uint32_t stride1, const uint32_t stride2) { @@ -118,7 +118,7 @@ static uint32_t reg_sad_w16(const kvz_pixel * const data1, const kvz_pixel * con return _mm_cvtsi128_si32(sad); } -static uint32_t reg_sad_w24(const kvz_pixel * const data1, const kvz_pixel * const data2, +static INLINE uint32_t reg_sad_w24(const kvz_pixel * const data1, const kvz_pixel * const data2, const int32_t height, const uint32_t stride1, const uint32_t stride2) { @@ -170,7 +170,7 @@ static uint32_t reg_sad_w24(const kvz_pixel * const data1, const kvz_pixel * con return _mm_cvtsi128_si32(sad); } -static uint32_t reg_sad_arbitrary(const kvz_pixel * const data1, const kvz_pixel * const data2, +static INLINE uint32_t reg_sad_arbitrary(const kvz_pixel * const data1, const kvz_pixel * const data2, const int32_t width, const int32_t height, const uint32_t stride1, const uint32_t stride2) {