scuffle_h265/lib.rs
1//! A pure Rust implementation of the HEVC/H.265 decoder.
2//!
3//! This crate is designed to provide a simple and safe interface to decode HEVC/H.265 SPS NALUs.
4//!
5//! ## Notable features
6//!
7//! This crate is a completely safe implementation of HEVC/H.265 SPS NALU decoding.
8//!
9//! ## Examples
10//!
11//! ```
12//! use scuffle_h265::SpsNALUnit;
13//!
14//! # fn test() -> std::io::Result<()> {
15//! # let data = b"\x42\x01\x01\x01\x40\x00\x00\x03\x00\x90\x00\x00\x03\x00\x00\x03\x00\x78\xa0\x03\xc0\x80\x11\x07\xcb\x96\xb4\xa4\x25\x92\xe3\x01\x6a\x02\x02\x02\x08\x00\x00\x03\x00\x08\x00\x00\x03\x00\xf3\x00\x2e\xf2\x88\x00\x02\x62\x5a\x00\x00\x13\x12\xd0\x20";
16//! # let reader = std::io::Cursor::new(data);
17//! let nalu = SpsNALUnit::parse(reader)?;
18//! println!("Parsed SPS NALU: {:?}", nalu);
19//! # Ok(())
20//! # }
21//! ```
22//!
23//! ## Status
24//!
25//! This crate is currently under development and is not yet stable.
26//!
27//! Unit tests are not yet fully implemented. Use at your own risk.
28//!
29//! ## License
30//!
31//! This project is licensed under the [MIT](./LICENSE.MIT) or [Apache-2.0](./LICENSE.Apache-2.0) license.
32//! You can choose between one of them if you use this work.
33//!
34//! `SPDX-License-Identifier: MIT OR Apache-2.0`
35#![cfg_attr(all(coverage_nightly, test), feature(coverage_attribute))]
36#![cfg_attr(docsrs, feature(doc_cfg))]
37#![deny(missing_docs)]
38#![deny(unsafe_code)]
39#![deny(unreachable_pub)]
40
41mod config;
42mod enums;
43mod nal_unit_header;
44mod rbsp_trailing_bits;
45mod sps;
46
47pub use config::{HEVCDecoderConfigurationRecord, NaluArray};
48pub use enums::*;
49pub use sps::*;