mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-10-28 18:07:12 +08:00
In P010ToARGBMatrixFilterOverflow, P210ToARGBMatrixFilterOverflow, P010ToAR30MatrixFilterOverflow, and P210ToAR30MatrixFilterOverflow, the tests set src_stride_uv to width (1039) and allocated width * src_uv_height elements. For odd widths, the interleaved UV row requires (width + 1) & ~1 elements (1040). Using width for the stride and buffer size caused the second row to read past the allocated buffer and access uninitialized memory under MSan. Fix this by computing src_stride_uv = (width + 1) & ~1 and sizing the allocated buffer to src_stride_uv * src_uv_height. In TestI400LargeSize, the test attempts large allocations totaling over 10 GB (~2 GB for source and ~8.5 GB for destination). Under MemorySanitizer (MSan), large allocations can exceed shadow memory virtual address limits or assert. Skip this test under MSan by checking __SANITIZE_MEMORY__ and __has_feature(memory_sanitizer). Test: libyuv_unittest --gtest_filter=*FilterOverflow*:*I400Large* Bug: 549112862 Change-Id: I679b7c67d93822e83f066b1895924589fc7242e7 TAG=agy CONV=dd635180-175b-4e35-b7f0-2e38105d3506 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/8269585 Commit-Queue: Frank Barchard <fbarchard@google.com> Reviewed-by: Wan-Teh Chang <wtc@google.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.