Frank Barchard c24b3cab82 [libyuv] Fix top 9 bugs and performance issues
1. Fix TestCpuFlag(A | B) multi-bit checks in AYUVToNV12, AYUVToNV21,
   NV12ToRGB24Matrix, RAWToRGBARow, MergeRGBRow, and MergeXR30Row so
   that all required ISA flags are verified (== (A | B)) instead of
   matching when only one flag is present.
2. Fix 2-byte heap buffer overflow on odd widths in
   I422ToARGB1555Row_SVE_SC and I422ToARGB4444Row_SVE_SC by replacing
   st1h on interleaved lanes with trn1/trn2 + st2b under per-pixel byte
   predicates.
3. Fix ARGBPolynomialRow_SSE2 clamping outputs to <= 127 (packssdw
   before packuswb instead of double packuswb) and add missing
   vzeroupper to SplitRGBRow_AVX2.
4. Fix AR64ShuffleRow_C processing only half the row (loop bound width
   instead of width / 2).
5. Fix negative-height crashes and orientation errors in
   ConvertFromI420, SplitARGBPlane (when dst_a == NULL), I422Rotate,
   I010Rotate, and I210Rotate.
6. Fix signed 16.16 fixed-point coordinate handling for negative x/dx
   in ScaleFilterCols_NEON (asr + 64-bit sign-extended x64/dx64) and
   ScaleAddCols1_16_C (x >>= 16).
7. Fix ConvertToARGB odd crop_x UV alignment for NV12/NV21, src_u
   offset calculation on odd sample widths for I420/YV12/J420/H420/U420,
   and FOURCC_U422 BT.2020 matrix dispatch (U422ToARGB).
8. Remove dead 14-instruction block before loop label 1: in
   ScaleRowUp2_Bilinear_16_SSE2.
9. Fix SIMD feature macros, dead dispatches, and SVE2 loop tail
   branches:
   - Define HAS_SCALECOLSUP2_SSE2 in scale.cc for 32-bit x86.
   - Guard TransposeWx4_32_SVE2 in rotate_argb.cc with
     HAS_TRANSPOSEWX4_32_SVE2.
   - Restrict HAS_UYVYTOARGBROW_SME and HAS_SCALEUVROWDOWN2_SME to
     Clang >= 20 to match their implementations.
   - Add AB64ToARGBRow_Any_NEON/SSE2/AVX2/AVX512BW wrappers so unaligned
     widths use SIMD + C tail.
   - Remove duplicate macro definitions in include/libyuv/row.h.
   - Replace b.lt 2f / b.ge 1b with b.gt 1b in SVE2 row loops so one
     redundant tail iteration is not executed when width % vl == 0.

R=rrwinterton@gmail.com

Bug: libyuv:574714081, b/574714081
Test: out/Release/libyuv_unittest && out/asan/libyuv_unittest
Change-Id: Iec3ae5c58d52bee3ef13cf9b765ac84b733aa576
2026-10-19 15:33:40 -07:00
..
compare_common.cc [libyuv] Add Qualcomm Hexagon HVX SIMD support 2026-10-19 14:16:18 -07:00
compare_gcc.cc [libyuv] Optimize CalcFrameSsim with 2-row 4x4 tile buffer and SIMD 2026-10-15 23:22:58 -07:00
compare_hvx.cc [libyuv] Add Qualcomm Hexagon HVX SIMD support 2026-10-19 14:16:18 -07:00
compare_neon64.cc [libyuv] Optimize CalcFrameSsim with 2-row 4x4 tile buffer and SIMD 2026-10-15 23:22:58 -07:00
compare_neon.cc [libyuv] Optimize CalcFrameSsim with 2-row 4x4 tile buffer and SIMD 2026-10-15 23:22:58 -07:00
compare_wasm.cc [libyuv] Optimize CalcFrameSsim with 2-row 4x4 tile buffer and SIMD 2026-10-15 23:22:58 -07:00
compare_win.cc [libyuv] Optimize CalcFrameSsim with 2-row 4x4 tile buffer and SIMD 2026-10-15 23:22:58 -07:00
compare.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
convert_argb.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
convert_from_argb.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
convert_from.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -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 [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
convert_to_i420.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
convert.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
cpu_id.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
mjpeg_decoder.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -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] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
rotate_any.cc [libyuv] Rewrite LoongArch LSX/LASX kernels in compact inline asm 2026-10-16 17:25:23 -07:00
rotate_argb.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
rotate_common.cc [libyuv] Optimize RotatePlane_16 SIMD and compact 32-bit transposes 2026-10-12 10:57:34 -07:00
rotate_gcc.cc [libyuv] Optimize RotatePlane_16 SIMD and compact 32-bit transposes 2026-10-12 10:57:34 -07:00
rotate_hvx.cc [libyuv] Add Qualcomm Hexagon HVX SIMD support 2026-10-19 14:16:18 -07:00
rotate_lasx.cc [libyuv] Rewrite LoongArch LSX/LASX kernels in compact inline asm 2026-10-16 17:25:23 -07:00
rotate_lsx.cc [libyuv] Rewrite LoongArch LSX/LASX kernels in compact inline asm 2026-10-16 17:25:23 -07:00
rotate_neon64.cc [libyuv] Optimize RotatePlane_16 SIMD and compact 32-bit transposes 2026-10-12 10:57:34 -07:00
rotate_neon.cc [libyuv] Optimize RotatePlane_16 SIMD and compact 32-bit transposes 2026-10-12 10:57:34 -07:00
rotate_rvv.cc [libyuv] Optimize RotatePlane_16 SIMD and compact 32-bit transposes 2026-10-12 10:57:34 -07:00
rotate_sme.cc [libyuv] Optimize RotatePlane_16 SIMD and compact 32-bit transposes 2026-10-12 10:57:34 -07:00
rotate_sve.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
rotate_wasm.cc [libyuv] Optimize RotatePlane_16 SIMD and compact 32-bit transposes 2026-10-12 10:57:34 -07:00
rotate_win.cc [libyuv] Optimize RotatePlane_16 SIMD and compact 32-bit transposes 2026-10-12 10:57:34 -07:00
rotate.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
row_any.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
row_common.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
row_gcc.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
row_hvx.cc [libyuv] Add Qualcomm Hexagon HVX SIMD support 2026-10-19 14:16:18 -07:00
row_lasx.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
row_lsx.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
row_neon64.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
row_neon.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
row_rvv.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
row_sme.cc [libyuv] Optimize CalcFrameSsim with 2-row 4x4 tile buffer and SIMD 2026-10-15 23:22:58 -07:00
row_sve.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
row_wasm.cc [libyuv] AVX512, NEON, WASM and RVV alpha copy and mirror rows 2026-10-07 12:44:53 -07:00
row_win.cc Add 25 native k-masked AVX-512 row kernels 2026-10-12 18:14:41 -07:00
scale_any.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
scale_argb.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
scale_common.cc [libyuv] Add Qualcomm Hexagon HVX SIMD support 2026-10-19 14:16:18 -07:00
scale_gcc.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
scale_hvx.cc [libyuv] Add Qualcomm Hexagon HVX SIMD support 2026-10-19 14:16:18 -07:00
scale_lsx.cc [libyuv] Rewrite LoongArch LSX/LASX kernels in compact inline asm 2026-10-16 17:25:23 -07:00
scale_neon64.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
scale_neon.cc Fix missing inline asm register clobbers 2026-10-08 14:44:23 -07:00
scale_rgb.cc Fix Coverity Control flow issues (DEADCODE) 2026-07-01 10:39:22 -07:00
scale_rvv.cc Fix missing inline asm register clobbers 2026-10-08 14:44:23 -07:00
scale_sme.cc Fix missing inline asm register clobbers 2026-10-08 14:44:23 -07:00
scale_uv.cc [libyuv] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -07:00
scale_wasm.cc [libyuv] Add WASM SIMD128 compare, rotate, scale and row functions 2026-10-06 19:05:05 -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] Fix top 9 bugs and performance issues 2026-10-19 15:33:40 -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