mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-07-30 08:16:22 +08:00
RAW format in libyuv is Red-first ([R, G, B] in memory), whereas RGB24 is Blue-first ([B, G, R] in memory). RGBToYMatrixRow and RGBToUVMatrixRow internally expand 3-byte input into 4-byte [byte0, byte1, byte2, 255]. For RAW, this buffer becomes [R, G, B, 255] (matching ABGR byte order). RAWToI420 previously passed &kArgbI601Constants (which expects [B, G, R, 255]) instead of &kAbgrI601Constants, causing Red and Blue channels to be swapped. Pass &kAbgrI601Constants in RAWToI420, fix parameter names in source/convert.cc, and add a unit test. Test: libyuv_unittest --gtest_filter=*RAWToI420* Bug: libyuv:537503370 TAG=agy CONV=2c54c4b5-f515-421b-80b3-079caa9f948b Change-Id: Ic72470813eaf15e80046c2c01cf804cb827039ab Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/8133048 Reviewed-by: richard winterton <rrwinterton@gmail.com> |
||
|---|---|---|
| build_overrides | ||
| docs | ||
| include | ||
| infra/config | ||
| riscv_script | ||
| source | ||
| tools_libyuv | ||
| unit_test | ||
| util | ||
| .clang-format | ||
| .gitignore | ||
| .gn | ||
| .vpython3 | ||
| Android.bp | ||
| Android.mk | ||
| AUTHORS | ||
| BUILD.bazel | ||
| BUILD.gn | ||
| CM_linux_packages.cmake | ||
| CMakeLists.txt | ||
| codereview.settings | ||
| DEPS | ||
| DIR_METADATA | ||
| download_vs_toolchain.py | ||
| GEMINI.md | ||
| libyuv.bzl | ||
| libyuv.gni | ||
| libyuv.gyp | ||
| libyuv.gypi | ||
| LICENSE | ||
| linux.mk | ||
| OWNERS | ||
| PATENTS | ||
| PRESUBMIT.py | ||
| public.mk | ||
| pylintrc | ||
| README.chromium | ||
| README.md | ||
| winarm.mk | ||
| WORKSPACE.bazel | ||
libyuv is an open source project that includes YUV scaling and conversion functionality.
- Scale YUV to prepare content for compression, with point, bilinear or box filter.
- Convert to YUV from webcam formats for compression.
- Convert to RGB formats for rendering/effects.
- Rotate by 90/180/270 degrees to adjust for mobile devices in portrait mode.
- Optimized for SSSE3/AVX2 on x86/x64.
- Optimized for Neon/SVE2/SME on Arm.
- Optimized for MSA on Mips.
- Optimized for RVV on RISC-V.
Development
See Getting started for instructions on how to get started developing.
You can also browse the docs directory for more documentation.