forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

lib.rs27 lines, 1.2 KiBHistoryRawDownload
1#![allow(clippy::needless_range_loop, clippy::too_many_arguments)]
2//! Apple ProRes video decoder (SMPTE RDD 36).
3//!
4//! Profiles 422 Proxy / LT / Standard / HQ (`apco`, `apcs`, `apcn`, `apch`) decode to
5//! [`PixelFormat::I210`](ec_core::frame::PixelFormat::I210); 4444 and 4444 XQ (`ap4h`, `ap4x`)
6//! decode to [`PixelFormat::I412`](ec_core::frame::PixelFormat::I412) (the 12-bit 4:4:4 layout
7//! ffmpeg also reports). Interlaced frames (two field pictures) come back woven with
8//! [`VideoFrame::interlace`](ec_core::frame::VideoFrame) set; slice sizes, both scan orders and
9//! custom quantisation matrices are handled. The optional alpha plane is returned beside the
10//! frame as a 16-bit [`AlphaPlane`], because `VideoFrame` has no alpha-bearing planar format.
11//!
12//! The arithmetic is ffmpeg's: its integer simple IDCT (`ff_prores_idct_10` / `_12`) is
13//! reproduced including 16-bit intermediate wrap, so output is byte-exact against ffmpeg.
14#![forbid(unsafe_code)]
15
16mod codec;
17mod encode;
18mod frame;
19mod header;
20mod idct;
21mod slice;
22mod tables;
23
24pub use codec::ProResDecoder;
25pub use encode::{EncoderConfig, Profile, ProResEncoder, nominal_frame_bytes};
26pub use frame::{AlphaPlane, DecodedFrame};
27pub use header::FrameInfo;