Skip to main content

Crate tealdust

Crate tealdust 

Source
Expand description
use tealdust::{Decoder, Settings, Data, TealdustError};

let mut decoder = Decoder::open(&Settings::default()).unwrap();

// Feed compressed data
let obu_data: Vec<u8> = std::fs::read("input.obu").unwrap();
decoder.send_data(Some(Data::wrap(obu_data))).unwrap();

// Retrieve decoded pictures
loop {
    match decoder.get_picture() {
        Ok(picture) => { /* process decoded frame */ }
        Err(TealdustError::Again) => break, // need more input
        Err(TealdustError::Eof) => break,   // end of stream
        Err(e) => panic!("decode error: {e}"),
    }
}

Macros§

itx_idct_dequant_rect_simd4_body
itx_idct_dequant_simd4_body
itx_kind_dequant_rect_simd4_body
itx_kind_dequant_rect_simd4_mono_body
itx_kind_dequant_simd4_body
itx_kind_dequant_simd4_mono_body

Structs§

AlphaPlane
Decoded alpha (transparency) plane from the auxiliary alpha item.
AvifContainer
A fully parsed AVIF container, ready for decoding.
AvifDecoder
High-level AVIF / AV2 image decoder.
AvifImage
A fully decoded AVIF image: metadata + raw plane data.
AvifImageInfo
Metadata about a decoded AVIF image, available before or alongside pixel data.
AvifItem
Describes a single item inside the AVIF meta box.
AvifParser
Stateless AVIF container parser.
AvifSettings
High-level AVIF parser/decoder configuration.
CleanAperture
Clean aperture from the clap item property (ISO 14496-12 §12.1.4).
CodecConfig
Parsed av2C (or av1C) codec-configuration record.
ColorInfo
Color information extracted from the colr item property.
ContentLightLevel
Data
A reference-counted byte buffer for compressed bitstream data.
Decoder
AV2 bitstream decoder.
FrameHeader
Picture
A decoded video frame with pixel data and associated metadata.
PixelAspectRatio
Pixel-aspect-ratio from the pasp item property.
Rational
A rational number as a (numerator, denominator) pair.
SequenceHeader
Settings
Decoder configuration. Use Settings::default() for sensible defaults.
SpatialExtents
Image dimensions from the ispe item property.

Enums§

AuxiliaryType
Identifies the purpose of an auxiliary image item, parsed from the auxC item property.
AvifError
Errors that can occur when parsing or decoding an AVIF file.
ColorPrimaries
DecodeFrameType
Which frame types to decode.
EventFlags
InloopFilterType
Which in-loop filters to apply during decoding.
ItemType
The four-character-code type of iinf item.
MatrixCoefficients
Orientation
Display orientation, using the eight EXIF orientation values. HEIF expresses orientation with a rotation property (irot, anticlockwise multiples of 90°) and a mirror property (imir); the diagonal EXIF values map to a mirror followed by a rotation.
PixelLayout
PlaneStorage
Owned storage for one decoded picture plane.
TealdustError
TransferCharacteristics

Constants§

ALPHA_AUXILIARY_URN
The standard URN identifying an alpha auxiliary image item.
DEFAULT_AVIF_MAX_AUXC_URN_LEN
Default byte length of an auxC URN string accepted from the bitstream.
DEFAULT_AVIF_MAX_COMPAT_BRANDS
Default number of ftyp compatible brands scanned (prevents O(n) on junk).
DEFAULT_AVIF_MAX_EXTENTS_PER_ITEM
Default extents per iloc item.
DEFAULT_AVIF_MAX_ILOC_ITEMS
Default allowed iloc item count (v0/v1 = u16, v2 = u32; cap both).
DEFAULT_AVIF_MAX_IMAGE_DIMENSION
Default image dimension accepted from ispe.
DEFAULT_AVIF_MAX_IPCO_PROPS
Default number of property entries accepted from an ipco box.
DEFAULT_AVIF_MAX_IPMA_ENTRIES
Default number of ipma entry associations per item.
DEFAULT_AVIF_MAX_IREF_REFS
Default number of item references consumed from one iref type-ref box.
DEFAULT_AVIF_MAX_ITEMS
Default number of items accepted from an iinf box.
DEFAULT_AVIF_MAX_OBU_BYTES
Default total OBU bytes assembled from iloc extents before feeding the decoder.
DEFAULT_FRAME_SIZE_LIMIT
Default untrusted-data frame-size cap. 4096x2304 keeps normal 4K/2.5MP fuzz/bench clips inside the default decoder, while avoiding repeated huge allocations from tiny malformed headers. Set Settings::frame_size_limit = 0 explicitly for trusted streams that may exceed this.
MAX_FRAME_DELAY
MAX_THREADS

Traits§

PicAllocator

Functions§

get_frame_delay
probe_avif
Quick probe: returns true if data begins with an ISOBMFF ftyp box carrying a recognised AVIF brand (avif, avis, or av02).
version
version_api