mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-10-29 02:17:13 +08:00
In ScalePlane and ScalePlane_16, when dst_width == src_width and dst_height == 1 with src_height >= 32768, set y to (src_height << 15) - 32768 for bilinear filtering and src_height << 15 for point sampling so the center row is sampled instead of row 0. In ScaleSlope, when dst_width == 1 and Abs(src_width) >= 32768 (or dst_height == 1 and src_height >= 32768), compute the centered *x and *y coordinates directly instead of overwriting dst_width or dst_height, which previously sampled pixel/row 0 (or 0.5) and added (Abs(src_width) - 1) * *dx when horizontally mirroring src_width < 0. Use Abs(src_width) << 15 and src_height << 15 as the non-box step values so ScaleARGB and ScaleUV treat the 32768x downscale as an even scale factor rather than 1x. Save Abs(src_width) in a local variable. In ScaleAddCols1_16_C, shift x >>= 16 before indexing src_ptr[x], matching ScaleAddCols1_C. Bug: b:573815252 Test: libyuv_unittest --gtest_filter=*ScalePlaneOversizeHeight*:*ARGBScaleOversizeWidthTo1* Change-Id: Ic82319dae6291d17b98b056b5d64a4bbf02f7787 |
||
|---|---|---|
| build_overrides | ||
| docs | ||
| include | ||
| infra/config | ||
| riscv_script | ||
| source | ||
| tools_libyuv | ||
| unit_test | ||
| util | ||
| .clang-format | ||
| .gitignore | ||
| .gn | ||
| 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 | ||
| vpython.toml | ||
| vpython.toml.uv.lock | ||
| 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.