Sida Zhu eae15e5fdd convert_from_argb: Add ARGB to P010, P210, and P410
Add matrix and BT.601 wrappers that convert ARGB to 16-bit biplanar
YUV in P010 (4:2:0), P210 (4:2:2), and P410 (4:4:4) layouts.

Reuse optimized ARGB matrix row functions for 8-bit Y and chroma,
merge UV with MergeUVRow, then expand with Convert8To16Row (bits=10)
and MultiplyRow_16 (scale=64) so 10-bit samples are stored in the
high bits of each uint16.

Reject width > INT_MAX / 2 so UV width (halfwidth * 2 or width * 2)
does not overflow Convert8To16Row.

Bug: 537818862
Change-Id: I7a776fb3d6f52ce46a0f6825903bfdb9c6dcfbe2
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/8314189
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Reviewed-by: Frank Barchard <fbarchard@google.com>
2026-09-23 20:42:55 -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 convert_from_argb: Add ARGB to P010, P210, and P410 2026-09-23 20:42:55 -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 RVV port to inline from intrinsics 2026-09-21 14:26:26 -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 ARGBMultiplyRow with rounding for AVX2 and RVV 2026-09-21 10:20:14 -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 [libyuv] Only memset row_any temporary buffers for MSAN 2026-09-22 19:19:45 -07:00
row_common.cc Convert8To16 takes bits instead of scale. 2026-09-01 16:07:23 -07:00
row_gcc.cc ARGBMultiplyRow with rounding for AVX2 and RVV 2026-09-21 10:20:14 -07:00
row_lasx.cc ARGBMultiplyRow with rounding for AVX2 and RVV 2026-09-21 10:20:14 -07:00
row_lsx.cc ARGBMultiplyRow with rounding for AVX2 and RVV 2026-09-21 10:20:14 -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 RVV port to inline from intrinsics 2026-09-21 14:26:26 -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 RVV port to inline from intrinsics 2026-09-21 14:26:26 -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