mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-10-28 18:07:12 +08:00
HalfWidthRow_16To8 downsamples 2x2 16-bit pixels to 8-bit. For width output pixels, row 0 and row 1 each require width * 2 uint16_t elements (4 * width bytes). With two rows separated by src_uv_stride, total source buffer requirement is 8 * width bytes (4 * width uint16_t elements). The previous buffer allocation only allocated kPixels * 4 bytes (2 * kPixels uint16_t elements). Because align_buffer_page_end places the buffer at the end of a page, reading the second row caused an out-of-bounds access past the page boundary, failing the test: [ RUN ] LibYUVPlanarTest.HalfWidthRow_16To8_Opt [ FAILED ] LibYUVPlanarTest.HalfWidthRow_16To8_Opt [----------] Global test environment tear-down [==========] 3603 tests from 8 test suites ran. [ PASSED ] 3602 tests. [ FAILED ] 1 test, listed below: [ FAILED ] LibYUVPlanarTest.HalfWidthRow_16To8_Opt 1 FAILED TEST. Use align_buffer_page_end_16 to allocate 4 * width uint16_t elements (8 * width bytes) and set src_uv_stride to 2 * width elements in HalfWidthRow_16To8_Opt and HalfWidthRow_16To8_Any. Bug: None Test: LibYUVPlanarTest.HalfWidthRow_16To8_* Change-Id: Ieba81ec211a34cc315e60fc26aad64fb41a88641 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/8252627 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.