From 5602fefdb3fc8ab2d37c8131503d95ea38c67e96 Mon Sep 17 00:00:00 2001 From: awxkee Date: Mon, 22 Apr 2024 10:29:07 +0100 Subject: [PATCH] added sve --- src/sampler/Window4RowSampler-inl.hpp | 7 +++++++ src/sampler/Window6RowSampler-inl.hpp | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/sampler/Window4RowSampler-inl.hpp b/src/sampler/Window4RowSampler-inl.hpp index 7f10df9..7307bfb 100644 --- a/src/sampler/Window4RowSampler-inl.hpp +++ b/src/sampler/Window4RowSampler-inl.hpp @@ -116,6 +116,7 @@ class WeightedWindow4RowSampler : public ScaleRowSampler { } void sample(const int y) override { +#if WEIGHTED_WINDOW4_HWY const FixedTag dfx4; const FixedTag dix4; const FixedTag dux4; @@ -123,6 +124,9 @@ class WeightedWindow4RowSampler : public ScaleRowSampler { using VI4 = Vec; using VF4 = Vec; using VU8x4 = Vec; + const VF4 vfZeros = Zero(dfx4); + const VF4 maxColorsV = Set(dfx4, maxColors); +#endif auto dst = reinterpret_cast(reinterpret_cast(this->mDestination) + y * this->dstStride); @@ -540,12 +544,15 @@ class WeightedWindow4RowSamplerF16Bit : public ScaleRowSampler { } void sample(const int y) override { +#if WEIGHTED_WINDOW4_HWY const FixedTag dfx4; const FixedTag dix4; const FixedTag df16x4; using VI4 = Vec; using VF4 = Vec; using VF16x4 = Vec; + const int mMaxWidth = this->inputWidth - 1; +#endif const auto src8 = reinterpret_cast(this->mSource); auto dst16 = reinterpret_cast(reinterpret_cast(this->mDestination) + y * this->dstStride); diff --git a/src/sampler/Window6RowSampler-inl.hpp b/src/sampler/Window6RowSampler-inl.hpp index f559fed..eff5a6f 100644 --- a/src/sampler/Window6RowSampler-inl.hpp +++ b/src/sampler/Window6RowSampler-inl.hpp @@ -454,12 +454,15 @@ class WeightedWindow6RowSamplerF16Bit : public ScaleRowSampler { } void sample(const int y) override { +#if WEIGHTED_WINDOW6_HWY const FixedTag dfx4; const FixedTag dix4; const FixedTag df16x4; using VI4 = Vec; using VF4 = Vec; using VF16x4 = Vec; + const int mMaxWidth = this->inputWidth - 1; +#endif const auto src8 = reinterpret_cast(this->mSource); auto dst16 = reinterpret_cast(reinterpret_cast(this->mDestination) + y * this->dstStride);