From 4871a0b57d55c27005bdcc88dc79905621e006e5 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 30 Sep 2026 08:55:58 +0000 Subject: [PATCH] -remove HVX optimization of function SimdAbsGradientSaturatedSum. Delete SimdHvxAbsGradientSaturatedSum.cpp and drop the HVX dispatch path, declaration, auto-test, and VS2022 project entries. Document the removal in the 7.2.166 release notes. Co-authored-by: igor.ermolaev --- docs/2026.html | 1 + prj/vs2022/Hvx.vcxproj | 1 - prj/vs2022/Hvx.vcxproj.filters | 3 -- src/Simd/SimdHvx.h | 3 -- src/Simd/SimdHvxAbsGradientSaturatedSum.cpp | 53 --------------------- src/Simd/SimdLib.cpp | 5 -- src/Test/TestFilter.cpp | 5 -- 7 files changed, 1 insertion(+), 70 deletions(-) delete mode 100644 src/Simd/SimdHvxAbsGradientSaturatedSum.cpp diff --git a/docs/2026.html b/docs/2026.html index f6dfe0a4af..c86a3e3607 100644 --- a/docs/2026.html +++ b/docs/2026.html @@ -163,6 +163,7 @@
Removing
  • C++ wrapper Simd::AlphaBlending2x.
  • HVX optimization of function AbsDifference.
  • HVX optimization of function AbsDifferenceSum.
  • +
  • HVX optimization of function AbsGradientSaturatedSum.
  • Python wrapper

    diff --git a/prj/vs2022/Hvx.vcxproj b/prj/vs2022/Hvx.vcxproj index 9e6cd980c7..49f60020bf 100644 --- a/prj/vs2022/Hvx.vcxproj +++ b/prj/vs2022/Hvx.vcxproj @@ -21,7 +21,6 @@ - diff --git a/prj/vs2022/Hvx.vcxproj.filters b/prj/vs2022/Hvx.vcxproj.filters index 639d9d0c15..50e073b9c6 100644 --- a/prj/vs2022/Hvx.vcxproj.filters +++ b/prj/vs2022/Hvx.vcxproj.filters @@ -77,9 +77,6 @@ - - Hvx\Statistics - Hvx\Statistics diff --git a/src/Simd/SimdHvx.h b/src/Simd/SimdHvx.h index 36d6c58aac..b63682d184 100644 --- a/src/Simd/SimdHvx.h +++ b/src/Simd/SimdHvx.h @@ -12,9 +12,6 @@ namespace Simd #ifdef SIMD_HVX_ENABLE namespace Hvx { - void AbsGradientSaturatedSum(const uint8_t* src, size_t srcStride, size_t width, size_t height, - uint8_t* dst, size_t dstStride); - void AddFeatureDifference(const uint8_t* value, size_t valueStride, size_t width, size_t height, const uint8_t* lo, size_t loStride, const uint8_t* hi, size_t hiStride, uint16_t weight, uint8_t* difference, size_t differenceStride); diff --git a/src/Simd/SimdHvxAbsGradientSaturatedSum.cpp b/src/Simd/SimdHvxAbsGradientSaturatedSum.cpp deleted file mode 100644 index 1c6f0c3c21..0000000000 --- a/src/Simd/SimdHvxAbsGradientSaturatedSum.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. - * SPDX-License-Identifier: MIT - */ -#include "Simd/SimdMemory.h" -#include "Simd/SimdStore.h" - -namespace Simd -{ -#ifdef SIMD_HVX_ENABLE - namespace Hvx - { - template SIMD_INLINE HVX_Vector AbsGradientSaturatedSum(const uint8_t* src, size_t stride) - { - const HVX_Vector dx = Q6_Vub_vabsdiff_VubVub(Load(src + 1), Load(src - 1)); - const HVX_Vector dy = Q6_Vub_vabsdiff_VubVub(Load(src + stride), Load(src - stride)); - return Q6_Vub_vadd_VubVub_sat(dx, dy); - } - - template void AbsGradientSaturatedSum(const uint8_t* src, size_t srcStride, size_t width, size_t height, - uint8_t* dst, size_t dstStride) - { - size_t alignedWidth = AlignLo(width, A); - memset(dst, 0, width); - src += srcStride; - dst += dstStride; - for (size_t row = 2; row < height; ++row) - { - for (size_t col = 0; col < alignedWidth; col += A) - Store(dst + col, AbsGradientSaturatedSum(src + col, srcStride)); - if (width != alignedWidth) - Store(dst + width - A, AbsGradientSaturatedSum(src + width - A, srcStride)); - - dst[0] = 0; - dst[width - 1] = 0; - - src += srcStride; - dst += dstStride; - } - memset(dst, 0, width); - } - - void AbsGradientSaturatedSum(const uint8_t* src, size_t srcStride, size_t width, size_t height, - uint8_t* dst, size_t dstStride) - { - if (Aligned(src) && Aligned(srcStride) && Aligned(dst) && Aligned(dstStride)) - AbsGradientSaturatedSum(src, srcStride, width, height, dst, dstStride); - else - AbsGradientSaturatedSum(src, srcStride, width, height, dst, dstStride); - } - } -#endif -} diff --git a/src/Simd/SimdLib.cpp b/src/Simd/SimdLib.cpp index 0d2fc3ebb7..cd96c3a44a 100644 --- a/src/Simd/SimdLib.cpp +++ b/src/Simd/SimdLib.cpp @@ -473,11 +473,6 @@ SIMD_API void SimdAbsGradientSaturatedSum(const uint8_t * src, size_t srcStride, if (Neon::Enable && width >= Neon::A) Neon::AbsGradientSaturatedSum(src, srcStride, width, height, dst, dstStride); else -#endif -#ifdef SIMD_HVX_ENABLE - if (Hvx::Enable && width >= Hvx::A) - Hvx::AbsGradientSaturatedSum(src, srcStride, width, height, dst, dstStride); - else #endif Base::AbsGradientSaturatedSum(src, srcStride, width, height, dst, dstStride); } diff --git a/src/Test/TestFilter.cpp b/src/Test/TestFilter.cpp index 9e05755fab..5fc7caf011 100644 --- a/src/Test/TestFilter.cpp +++ b/src/Test/TestFilter.cpp @@ -718,11 +718,6 @@ namespace result = result && GrayFilterAutoTest(View::Gray8, FUNC_G(Simd::Sve2::AbsGradientSaturatedSum), FUNC_G(SimdAbsGradientSaturatedSum)); #endif -#ifdef SIMD_HVX_ENABLE - if (Simd::Hvx::Enable && TestHvx(options) && W - 1 >= Simd::Hvx::A) - result = result && GrayFilterAutoTest(View::Gray8, FUNC_G(Simd::Hvx::AbsGradientSaturatedSum), FUNC_G(SimdAbsGradientSaturatedSum)); -#endif - return result; }