Eliminate SIMD unsafe blocks and optimize encoder SIMD/CAVLC hot paths

Enforce #![deny(unsafe_code)] across all x86_64 and aarch64 SIMD modules
while improving single- and multi-threaded encoder throughput:

- Replace raw-pointer SIMD loads/stores and unsafe #[target_feature] calls
  with zero-sized capability tokens, the simd_entry! macro, safe lanes
  helpers, and bounds-eliding BlockRows/CellSpan views.
- Add AVX2 kernels for 16x16/16x8 SAD, screen-content ME feature sums, and
  4x4/four-4x4 quantization, plus SSSE3 nibble-pshufb cavlc_param_cal.
- Add fused Combined3 intra prediction SATD/SAD kernels (x86_64, aarch64,
  and scalar) and wire them into mode decision.
- Add register-cached LocalBsWriter in safe::bits for CAVLC residual and MB
  prediction bitstream packing.
- Add in-process C++ dlopen comparison in encode_bench and Cargo 1.100
  cdylib discovery in interop_test.

Bug: 527969915
Change-Id: Id5923124de5c15348f5d0e7cebb5bccd95df19c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/third_party/openh264rs/+/8823535
Reviewed-by: Frank Liberato <liberato@google.com>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Reviewed-by: Eugene Zemtsov <ezemtsov@google.com>
39 files changed
tree: d7d2df008bfb7d9c93c42c5d57ee620e3bfdd8ec
  1. benches/
  2. src/
  3. tests/
  4. tools/
  5. .gitignore
  6. build.rs
  7. Cargo.toml
  8. LICENSE_CHROMIUM
  9. LICENSE_CISCO
  10. OWNERS
  11. README.md
  12. rustfmt.toml
  13. sources.gni
README.md

openh264rs

Rust port of Cisco OpenH264 (H.264/AVC encoder and decoder). Designed as a source-level drop-in replacement for the C and C++ APIs of OpenH264.