[AArch64] Enable use of ScaleRowDown2Box_16_NEON

The #ifdef surrounding the use of this kernel is never defined and
ScaleRowDown2_16_NEON does not exist, so add the missing #define and
remove the use of ScaleRowDown2_16_NEON for now. Additionally since
there is no implementation of this kernel for 32-bit Arm, restrict the
define to only be present on AArch64.

Bug: b/42280942
Change-Id: Icc35c145c1bad1c0df2933a2d8bc7dcf7fe63cb7
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6040152
Reviewed-by: Justin Green <greenjustin@google.com>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
George Steed 2024-11-15 13:58:22 +00:00 committed by Frank Barchard
parent 9ed07258c7
commit 952d6a282f
2 changed files with 7 additions and 3 deletions

View File

@ -116,6 +116,11 @@ extern "C" {
#define HAS_SCALEUVROWUP2_BILINEAR_16_NEON
#endif
// The following are available on AArch64 Neon platforms:
#if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__)
#define HAS_SCALEROWDOWN2_16_NEON
#endif
// The following are available on AArch64 SME platforms:
#if !defined(LIBYUV_DISABLE_SME) && defined(CLANG_HAS_SME) && \
defined(__aarch64__)

View File

@ -187,9 +187,8 @@ static void ScalePlaneDown2_16(int src_width,
}
#if defined(HAS_SCALEROWDOWN2_16_NEON)
if (TestCpuFlag(kCpuHasNEON) && IS_ALIGNED(dst_width, 16)) {
ScaleRowDown2 =
filtering ? ScaleRowDown2Box_16_NEON : ScaleRowDown2_16_NEON;
if (TestCpuFlag(kCpuHasNEON) && IS_ALIGNED(dst_width, 16) && filtering) {
ScaleRowDown2 = ScaleRowDown2Box_16_NEON;
}
#endif
#if defined(HAS_SCALEROWDOWN2_16_SSE2)