Fix Windows decoder stack overflow and allow manifest dir override

Running openh264rs integration tests inside Chromium's media_unittests
exceeded the 1 MB default thread stack on Windows during decoder
initialization, and could not locate test data inside Android APKs.

- Heap-allocate large fixed-size tables in SWelsDecoderSpsPpsCTX and
  SWelsDecoderContext via Box<[T; N]> built from Vec so
  SWelsDecoderContext::new_boxed avoids large stack temporaries while
  keeping thin pointers and compile-time bounds-check elision.
- Drop redundant memset_zero constructors on SSps, SSubsetSps, and SPps
  in favor of Default.
- Honor OPENH264_MANIFEST_DIR in common::manifest_dir() so external test
  harnesses can supply the crate root path at runtime.

Bug: 581458350
Change-Id: I9194a63366bb52321c91f1ee39d32aad38013023
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/third_party/openh264rs/+/8732363
Reviewed-by: Frank Liberato <liberato@chromium.org>
Reviewed-by: Frank Liberato <liberato@google.com>
Reviewed-by: Eugene Zemtsov <ezemtsov@google.com>
4 files changed
tree: 711e68532413ffd94827ce09dfbde0516ccc388b
  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.