mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-10-29 02:17:13 +08:00
Add SetMaxThreads() and GetMaxThreads() APIs (with LIBYUV_NUM_THREADS environment variable override, defaulting to half of logical cores capped at 8 when built with -fopenmp). Enable OpenMP parallel row processing for large frames (>= 1280x720) in I420ToARGBMatrix and CopyPlane (including reshaping coalesced contiguous planes across threads), and configure thread counts for ComputeHammingDistance, ComputeSumSquareError, and CalcFrameSsim. 1280x720 Benchmarks (ms): Benchmark Reps 1T 2T 4T 8T Speedup -------------------------------------------------------- I420ToARGB_Opt 1000 272 162 88 60 4.53x CopyPlane_Opt 1000 57 42 19 14 4.07x BenchmarkPsnr_Opt 1000 92 76 56 34 2.71x BenchmarkSsim_Opt 100 518 241 147 89 5.82x R=rrwinterton@gmail.com Bug: none Test: libyuv_unittest --gtest_filter=*TestSetMaxThreads*:*I420ToARGB_Opt*:*CopyPlane_Opt*:*Ssim* Change-Id: I5ca9a2b8c68eaac870da6353c51306930d015c3a CONV=a7f09b98-93ab-4652-a8eb-8d9551361f61 TAG=agy |
||
|---|---|---|
| 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.