Skip to main content

Crate rusty_av2d

Crate rusty_av2d 

Source

Re-exports§

pub use rust_api::*;

Modules§

align
Types for enforcing alignment on struct fields.
av2_lr
AV2 loop restoration (NS-Wiener / PC-Wiener) — dav2d obu.c restoration parse state + decode.c per-SB unit syntax + lr_apply_tmpl.c / looprestoration_tmpl.c collapsed to a whole-frame pass. The dav stripe/row-backup machinery exists because dav filters in place; the filter only ever READS pre-LR pixels (rows below the cursor are unfiltered, rows above come from backups, left/right strips from pre-LR borders), so with a full pre-wiener snapshot the pass is a pure src→dst transform with two boundary rules:
av2_lr_tables
AV2 loop-restoration tables — extracted from dav2d tables.c + wiener_tables.c.
av2_palette
AV2 palette / screen-content: neighbour palette caches, the luma-palette color parse, and the color-index-map token decode. Exact ports of:
av2_qm
AV2 quantization matrices (QM): predefined-matrix lookup + the per-position dequant weighting. Ports of avm quant_common.c (av2_qm_init layout / av2_iqmatrix / av2_get_adjusted_tx_size) and decodetxb.c get_dqv: dqv’ = (iqm[pos] * dqv + (1 << (AVM_QM_BITS-1))) >> AVM_QM_BITS, AVM_QM_BITS = 5. QM applies to 2D transforms only (avm av2_get_iqmatrix: 1D/identity transforms use the flat matrix = no weighting). 64-dim transforms reuse the 32-dim matrix (av2_get_adjusted_tx_size) — their coded coefficient grid is the 32-clamped corner. PANIC-FREEDOM: this module is compiled under #![deny(clippy::indexing_slicing)] (see the attribute below) — every element access is a checked accessor, so no bounds panic is reachable here BY CONSTRUCTION rather than by review or fuzzing. This is the pattern the rest of the decode path should adopt module by module. User-defined matrices (QM OBU payload) are NOT ported (loud error at the parse; every avmenc mint so far signals no QM OBU and the decoder-default predefined list is used).
av2_wedge
AV2 compound wedge masks — dav2d wedge.c ported. Masks are generated per block size (68 codebook entries): a 128x128 “master” directional ramp (sharp mul=2 for sizes <=16x16 px, soft mul=1 above), cropped per codebook offset, plus 422/420 subsampled variants and the per-8x8 TMVP winner map (0/1 = single side, 2 = both).
cpu
include
rust_api
This API copies that of dav1d-rs, and should function as a drop-in replacement, aside from dav1d::Error being renamed to Rav1dError
send_sync_non_null

Macros§

dlog
Debug print: compiles to a cheap boolean test when the switch is off.

Structs§

Dav1dResult

Enums§

Rav1dError
Error enum return by various rav1d operations.

Constants§

DAV1D_API_VERSION_MAJOR
DAV1D_API_VERSION_MINOR
DAV1D_API_VERSION_PATCH

Functions§

dav1d_apply_grain
Safety
dav1d_close
Safety
dav1d_data_create
Safety
dav1d_data_props_unref
Safety
dav1d_data_unref
Safety
dav1d_data_wrap
Safety
dav1d_data_wrap_user_data
Safety
dav1d_default_settings
Safety
dav1d_flush
Safety
dav1d_get_decode_error_data_props
Safety
dav1d_get_event_flags
Safety
dav1d_get_frame_delay
Safety
dav1d_get_picture
Safety
dav1d_open
Safety
dav1d_parse_sequence_header
Safety
dav1d_picture_unref
Safety
dav1d_send_data
Safety
dav1d_version
dav1d_version_api
Get the dav1d library C API version.
rav1d_version

Type Aliases§

Rav1dResult