AArch64: Avoid INCP in {YUY2,UYVY}ToUVRow_SVE2

The INCP instructions are particularly slow on some CPUs and in this
case can be replaced by a simple ADD instruction, so use that instead.

Reduction in time taken relative to the existing SVE2 code for
{YUY2,UYVY}ToUVRow_SVE2:

       Cortex-A510: −12.1%
     Lumex C1-Nano:   0.0%
       Cortex-A720:   0.0%
      Lumex C1-Pro:   0.0%
         Cortex-X4: −20.9%
    Lumex C1-Ultra: −20.3%

Bug: 546962730
Change-Id: Iea3d75f7b70fe8a29f12afdd877ac02d43e49f04
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/8252282
Reviewed-by: Frank Barchard <fbarchard@google.com>
Reviewed-by: Wan-Teh Chang <wtc@google.com>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
This commit is contained in:
George Steed 2026-08-13 18:55:19 +01:00 committed by libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com
parent 210d11f747
commit 50bfd8fc08

View File

@ -1433,8 +1433,8 @@ void YUY2ToUVRow_SVE2(const uint8_t* src_yuy2,
"subs %w[width], %w[width], %w[vl] \n"
"st1b {z0.b}, p1, [%[dst_u]] \n"
"st1b {z2.b}, p1, [%[dst_v]] \n"
"incp %[dst_u], p1.b \n"
"incp %[dst_v], p1.b \n"
"add %[dst_u], %[dst_u], %x[vl_half] \n"
"add %[dst_v], %[dst_v], %x[vl_half] \n"
"b.ge 1b \n"
"2: \n"
@ -1497,8 +1497,8 @@ void UYVYToUVRow_SVE2(const uint8_t* src_uyvy,
"subs %w[width], %w[width], %w[vl] \n"
"st1b {z1.b}, p1, [%[dst_u]] \n"
"st1b {z2.b}, p1, [%[dst_v]] \n"
"incp %[dst_u], p1.b \n"
"incp %[dst_v], p1.b \n"
"add %[dst_u], %[dst_u], %x[vl_half] \n"
"add %[dst_v], %[dst_v], %x[vl_half] \n"
"b.ge 1b \n"
"2: \n"