forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

lib.rs24 lines, 1017 bytesHistoryRawDownload
1//! Avid DNxHD / DNxHR (SMPTE VC-3) video decoder.
2//!
3//! Intra-only. Covers every DNxHD compression id ffmpeg knows (1235-1260,
4//! 8- and 10-bit 4:2:2, progressive and two-field interlaced, the MBAFF 1260
5//! layout) and DNxHR LB/SQ/HQ (8-bit 4:2:2), HQX (10/12-bit 4:2:2) and 444
6//! (10/12-bit 4:4:4 YCbCr), at any resolution.
7//!
8//! Refused by name: alpha channel streams, RGB (non-YCbCr) 4:4:4 streams and
9//! 4:2:2 streams that set the adaptive-colour-transform flag.
10//!
11//! Output is [`PixelFormat::I422`](ec_core::frame::PixelFormat), `I210`, `I444` or `I410`.
12//! ec-core has no 12-bit pixel formats, so [`DnxhdDecoder::decode`] narrows
13//! 12-bit pictures to 10 bits (`(v + 2) >> 2`, clamped); [`DnxhdDecoder::decode_native`]
14//! returns the samples at their coded depth.
15#![allow(clippy::chunks_exact_to_as_chunks, clippy::needless_range_loop)]
16#![forbid(unsafe_code)]
17mod bits;
18mod codec;
19mod decoder;
20mod idct;
21mod tables;
22
23pub use codec::DnxhdDecoder;
24pub use decoder::{Chroma, FrameInfo, Picture};