Frank Barchard eb8eda9c79 [libyuv] Add WASM SIMD128 and Relaxed SIMD for RAWToRGB24Row
Implement RAWToRGB24Row_WASMSIMD and RAWToRGB24Row_Any_WASMSIMD in
source/row_wasm.cc for RGB24ToRAW and RAWToRGB24 conversions:
- Process 16 pixels (48 bytes) per loop iteration using three 128-bit
  loads, three byte-wise shuffles, and four 2-way blends.
- Use wasm_i8x16_relaxed_swizzle when __wasm_relaxed_simd__ is enabled
  (compiling to a single vpshufb on x86 without bounds-checking
  overhead) and fall back to wasm_i8x16_swizzle for baseline SIMD128.
- Add kCpuHasWASM (0x100) and kCpuHasWASMSIMD (0x101) CPU feature
  flags and enable -msimd128 in BUILD.bazel, BUILD.gn, and
  CMakeLists.txt for WebAssembly targets.

Performance (RAWToRGB24_Opt, 1280x720, V8 d8):
CPU                     WASM C  SIMD128  Relaxed  SIMD Spd  Rlx Spd
-------------------------------------------------------------------
AMD Zen 4             595.0 us 137.0 us  84.0 us     4.34x    7.08x
AMD Zen 3             708.0 us 148.0 us 107.0 us     4.78x    6.62x
AMD Zen 5             375.0 us 107.0 us  67.0 us     3.50x    5.60x
ARM Neoverse-V2       638.0 us 118.0 us 116.0 us     5.41x    5.50x
ARM Neoverse-N1      1046.0 us 294.0 us 294.0 us     3.56x    3.56x
Intel Ice Lake        707.0 us 209.0 us 220.0 us     3.38x    3.21x
Intel Haswell        1110.0 us 344.0 us 360.0 us     3.23x    3.08x
Intel Emerald Rapids  519.0 us 207.0 us 208.0 us     2.51x    2.50x
Intel Sapphire Rapids 551.0 us 220.0 us 255.0 us     2.50x    2.16x
ARM Cortex-A53      14440.0 us 8660.0us 6920.0us     1.67x    2.09x
Intel Granite Rapids  453.0 us 225.0 us 221.0 us     2.01x    2.05x

Bug: 42271072
Test: libyuv_test --gunit_filter=*RAWToRGB24*:*RGB24ToRAW*:*Cpu*
Change-Id: Id902668263a2ab70aa300eeeea18851490c917b5
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/8515581
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2026-10-05 17:45:41 -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 Compare AVX512BW and AVX2, intrinsics for Visual C and ROWWIN 2026-10-02 15:30:05 -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 Compare AVX512BW and AVX2, intrinsics for Visual C and ROWWIN 2026-10-02 15:30:05 -07:00
compare.cc Compare AVX512BW and AVX2, intrinsics for Visual C and ROWWIN 2026-10-02 15:30:05 -07:00
convert_argb.cc I422ToRGB24 avx512bw tail and row coalesce 2026-09-24 12:07:29 -07:00
convert_from_argb.cc ARGBToRGB24 AVX512 with tail masking 2026-09-29 16:15:44 -07:00
convert_from.cc clang format and bump version 2026-09-28 10:42:45 -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 clang format and bump version 2026-09-28 10:42:45 -07:00
convert_to_i420.cc clang format and bump version 2026-09-28 10:42:45 -07:00
convert.cc InterpolateRow_AVX512BW with tail masking 2026-09-29 11:22:47 -07:00
cpu_id.cc [libyuv] Add WASM SIMD128 and Relaxed SIMD for RAWToRGB24Row 2026-10-05 17:45:41 -07:00
mjpeg_decoder.cc [libyuv] Fix RISC-V CMake/GN/Bazel builds and C compiler driver linking 2026-09-28 10:59:30 -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 [libyuv] Add WASM SIMD128 and Relaxed SIMD for RAWToRGB24Row 2026-10-05 17:45:41 -07:00
rotate_any.cc Rotate intrinsics for Visual C, ROWWIN and 32 bit x86 2026-10-01 20:39:30 -07:00
rotate_argb.cc SVE2 row functions needed for multipass image functions 2026-08-06 12:40:26 -07:00
rotate_common.cc Transpose 16x16 for AVX2 2026-10-01 17:31:33 -07:00
rotate_gcc.cc Rotate intrinsics for Visual C, ROWWIN and 32 bit x86 2026-10-01 20:39:30 -07:00
rotate_lsx.cc Transpose 16x16 for AVX2 2026-10-01 17:31:33 -07: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 Rotate intrinsics for Visual C, ROWWIN and 32 bit x86 2026-10-01 20:39:30 -07:00
rotate.cc Rotate intrinsics for Visual C, ROWWIN and 32 bit x86 2026-10-01 20:39:30 -07:00
row_any.cc [libyuv] Add WASM SIMD128 and Relaxed SIMD for RAWToRGB24Row 2026-10-05 17:45:41 -07:00
row_common.cc clang format and bump version 2026-09-28 10:42:45 -07:00
row_gcc.cc RAWToRGB24 for NEON, x86, and LoongArch 2026-10-05 12:09:40 -07:00
row_lasx.cc RAWToRGB24 for NEON, x86, and LoongArch 2026-10-05 12:09:40 -07:00
row_lsx.cc RAWToRGB24 for NEON, x86, and LoongArch 2026-10-05 12:09:40 -07:00
row_neon64.cc RAWToRGB24 for NEON, x86, and LoongArch 2026-10-05 12:09:40 -07:00
row_neon.cc RAWToRGB24 for NEON, x86, and LoongArch 2026-10-05 12:09:40 -07:00
row_rvv.cc clang format and bump version 2026-09-28 10:42:45 -07:00
row_sme.cc Convert8To16 takes bits instead of scale. 2026-09-01 16:07:23 -07:00
row_sve.cc clang format and bump version 2026-09-28 10:42:45 -07:00
row_wasm.cc [libyuv] Add WASM SIMD128 and Relaxed SIMD for RAWToRGB24Row 2026-10-05 17:45:41 -07:00
row_win.cc RAWToRGB24 for NEON, x86, and LoongArch 2026-10-05 12:09:40 -07:00
scale_any.cc [libyuv] Enable LIBYUV_ENABLE_ROWWIN and MSAN_MEMSET for MSan builds 2026-09-28 10:49:58 -07:00
scale_argb.cc InterpolateRow_AVX512BW with tail masking 2026-09-29 11:22:47 -07:00
scale_common.cc InterpolateRow_AVX512BW with tail masking 2026-09-29 11:22:47 -07:00
scale_gcc.cc [libyuv] Add ScaleRowDown2Box_AVX512BW with tail masking 2026-10-05 10:56:34 -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 RVV replace vnclipu.wi with vwaddu.vx and vnsrl.wi 2026-09-25 12:43:28 -07:00
scale_sme.cc Apply clang format 2025-01-02 13:31:20 -08:00
scale_uv.cc Add a box filter to ScaleUV 2026-10-02 15:37:21 -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] Add ScaleRowDown2Box_AVX512BW with tail masking 2026-10-05 10:56:34 -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