v0.0.4
Other
- drop stale REGISTRARS / with_all_features intra-doc links
- drop dead
linkmedep - wire Encoder trait + registry, spiral+diamond ME
- registry calls: rename make_decoder/make_encoder → first_decoder/first_encoder
- auto-register via oxideav_core::register! macro (linkme distributed slice)
- unify entry point on register(&mut RuntimeContext) (#502)
Added
-
Encoder
Encodertrait implementation and registry wiring.
H261RegistryEncoderwrapsH261Encoderand implements the
oxideav_core::Encodertrait (send_frame/receive_packet/flush).
make_encoder(params)is now registered inregister_codecsvia
.encoder(encoder::make_encoder)so callers can use
reg.first_encoder(¶ms)with H.261.
The factory acceptsparams.width/params.height(QCIF or CIF) and
derives an initial GQUANT fromparams.bit_ratevia an empirical
bits-per-frame-at-Q1 model. The per-GOB MQUANT rate controller then
nudges ±1 step dynamically. At 64 kbit/s QCIF the factory selects
QUANT ≈ 9, delivering ≥ 45 dB PSNR_Y on smooth gradient content. -
Spiral + diamond motion estimation replaces the prior flat full-window
scan. The new search evaluates concentric ring boundaries innermost-first
with early termination when two consecutive rings show no improvement,
then refines with an 8-connected neighbourhood around the winner. On
static/smooth content this saves evaluating the outer rings (~80 % of the
961-point full scan) while maintaining quality; on complex motion it falls
back to the full ±15 range. A compact 3-tap diamond fallback catches any
one-pel miss at ring boundaries.
Changed
- Updated
lib.rsmodule docstring — the crate is no longer decode-only. - README feature matrix updated: MC encode, loop-filter-with-RDO encode,
per-GOB rate control, and registry encoder rows added.
Tests added
register_tests::register_via_runtime_context_installs_encoder_factoryregister_tests::encoder_factory_qcif_defaultsregister_tests::encoder_factory_cifregister_tests::encoder_factory_rejects_bad_dimensionsencoder::tests::make_encoder_derives_quant_from_bit_rate— encodes 8 QCIF
frames via theEncodertrait at 64 kbit/s target; asserts avg PSNR_Y ≥ 35 dB.ffmpeg_roundtrip::registry_encoder_qcif_roundtrip— encodes 4 QCIF frames
via theEncodertrait, feeds the stream to ffmpeg, asserts clean decode.ffmpeg_roundtrip::encoder_psnr_vs_source_at_default_quant— encodes 8
QCIF frames of a moving gradient and verifies avg PSNR_Y ≥ 32 dB after
ffmpeg cross-decode.