George Steed 2dd4257364 AArch64: Fix HalfMergeUVRow_SVE2 average calculation
The existing SVE2 path only computes the average for a pair of input
values instead of groups of four as done in the Neon implementation.

The average of two values must be retained for the final odd element if
present. Existing code just handles this by falling back to the C
implementation, so mirror that for SVE2 as well.

Reduction in time taken relative to the existing Neon code, the SVE2
code remains faster even with the correct averaging:

       Cortex-A510: -12.66%
     Lumex C1-Nano:  -6.38%
       Cortex-A720:  -9.73%
      Lumex C1-Pro:  +0.99%
         Cortex-X4:  -3.05%
    Lumex C1-Ultra: -18.98%

Bug: 546962730
Change-Id: I7ab348e64a9d079b81d070cea5fd575243b037d2
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/8252281
Reviewed-by: Wan-Teh Chang <wtc@google.com>
Reviewed-by: Justin Green <greenjustin@google.com>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
2026-09-11 05:56:04 -07:00
..
compare_common.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
compare_gcc.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
compare_neon64.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
compare_neon.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
compare_win.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
compare.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
convert_argb.cc Add I422ToAR30Row_RVV for RISC-V Vector 2026-09-01 17:00:40 -07:00
convert_from_argb.cc Multiply_16 port to avx512, rvv, neon 32 bit, and windows 2026-09-01 19:08:52 -07:00
convert_from.cc Convert8To16 takes bits instead of scale. 2026-09-01 16:07:23 -07:00
convert_jpeg.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
convert_to_argb.cc Convert8To16 takes bits instead of scale. 2026-09-01 16:07:23 -07:00
convert_to_i420.cc Convert8To16 takes bits instead of scale. 2026-09-01 16:07:23 -07:00
convert.cc Multiply_16 port to avx512, rvv, neon 32 bit, and windows 2026-09-01 19:08:52 -07:00
cpu_id.cc add bmm detect and vdpphps in util/cpuid 2026-06-09 14:52:48 -07:00
mjpeg_decoder.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
mjpeg_validate.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
planar_functions.cc AArch64: Fix HalfMergeUVRow_SVE2 average calculation 2026-09-11 05:56:04 -07:00
rotate_any.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
rotate_argb.cc SVE2 row functions needed for multipass image functions 2026-08-06 12:40:26 -07:00
rotate_common.cc Convert8To16 takes bits instead of scale. 2026-09-01 16:07:23 -07:00
rotate_gcc.cc Use ptrdiff_t for buffer offsets 2026-04-28 18:21:42 -07:00
rotate_lsx.cc [AArch64] Use full vectors in TransposeWx{8 => 16}_NEON 2024-05-21 07:46:42 +00:00
rotate_neon64.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
rotate_neon.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
rotate_sme.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
rotate_win.cc BGRAToI420 use BgraConstants for a direct conversion using AVX512BW 2026-06-08 12:21:47 -07:00
rotate.cc SVE2 row functions needed for multipass image functions 2026-08-06 12:40:26 -07:00
row_any.cc Multiply_16 port to avx512, rvv, neon 32 bit, and windows 2026-09-01 19:08:52 -07:00
row_common.cc Convert8To16 takes bits instead of scale. 2026-09-01 16:07:23 -07:00
row_gcc.cc [libyuv] Add SwapUVRow_AVX2 and NV12ToNV21 2026-09-04 12:23:24 -07:00
row_lasx.cc loongarch: Fix RGBToY SIMD 2026-08-31 20:57:34 -07:00
row_lsx.cc loongarch: Fix RGBToY SIMD 2026-08-31 20:57:34 -07:00
row_neon64.cc Convert8To16 takes bits instead of scale. 2026-09-01 16:07:23 -07:00
row_neon.cc Convert8To16 takes bits instead of scale. 2026-09-01 16:07:23 -07:00
row_rvv.cc Multiply_16 port to avx512, rvv, neon 32 bit, and windows 2026-09-01 19:08:52 -07:00
row_sme.cc Convert8To16 takes bits instead of scale. 2026-09-01 16:07:23 -07:00
row_sve.cc AArch64: Fix HalfMergeUVRow_SVE2 average calculation 2026-09-11 05:56:04 -07:00
row_win.cc [libyuv] Add SwapUVRow_AVX2 and NV12ToNV21 2026-09-04 12:23:24 -07:00
scale_any.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
scale_argb.cc Scale*BilinearUp: Add invariants assertions and simplify loop 2026-08-13 14:20:11 -07:00
scale_common.cc ARGBScale and UV use uint8_t for -fsanitize=alignment 2026-08-28 15:30:12 -07:00
scale_gcc.cc Refactor multi-stage SSSE3 scalers into single asm blocks 2026-08-24 18:05:48 -07:00
scale_lsx.cc DetilePlane and unittest for NEON 2022-01-31 20:05:55 +00:00
scale_neon64.cc Apply format with no code changes 2025-02-24 23:57:01 -08:00
scale_neon.cc Apply format with no code changes 2025-02-24 23:57:01 -08:00
scale_rgb.cc Fix Coverity Control flow issues (DEADCODE) 2026-07-01 10:39:22 -07:00
scale_rvv.cc Fix unaligned memory accesses in RVV scaling kernels 2026-09-02 13:16:30 -07:00
scale_sme.cc Apply clang format 2025-01-02 13:31:20 -08:00
scale_uv.cc Scale*BilinearUp: Add invariants assertions and simplify loop 2026-08-13 14:20:11 -07:00
scale_win.cc BGRAToI420 use BgraConstants for a direct conversion using AVX512BW 2026-06-08 12:21:47 -07:00
scale.cc [libyuv] Keep LIBYUV_API in basic_types.h and remove legacy types and bool macros 2026-08-28 08:32:19 -07:00
test.sh Optimze ABGRToI420 for AVX2 2020-06-04 18:24:45 +00:00
video_common.cc Lint cleanup after C99 change CL 2018-01-24 19:16:03 +00:00