Commits
2026-08-14
feat(h264): registry Decoder entry, avcC extradata, mechanism-named refusalsAhmet Kaan Gümüş · 19f3903
feat(h264): registry Decoder entry, avcC extradata, mechanism-named refusals The NAL-level Decoder is what a bitstream tool wants; a demuxer wants packets. H264Decoder implements ec_core::registry::Decoder over the same decode core and adds the two things a container brings with it: parameter sets carried out of band in an avcC record (14496-15 clause 5.3.3.1), and NAL units framed by a length prefix instead of Annex B start codes. The framing is decided once, by whether extradata held an avcC, and the SPS inside it publishes the picture size before the first packet arrives. Every refusal's why-text now names the syntax element that fired and the machinery it would need, not just "not implemented" — the conformance suite proves each one against a stream that really uses the feature, so the text is the capability statement a caller reads.
feat(mp4): ISOBMFF box model, esds descriptors and the demuxerAhmet Kaan Gümüş · 49be010
feat(mp4): ISOBMFF box model, esds descriptors and the demuxer The box walk checks every size against its parent and every table entry count against the box that holds it, so a crafted header is an error and never an allocation. The moov walk resolves the sample tables into offset/size/dts/cts/sync per sample, reads fragments (moof/traf/trun) into the same tables, and takes the frame rate off stts as an exact rational -- whole track over whole track, so NTSC film stays 24000/1001 instead of decaying into 23. A sample entry is read for what it says it is: an mp4a holding MP3 is an MP3 track rather than a dropped one, ac-3/ec-3/alac/Opus/fLaC and the QuickTime PCM entries are their own codecs, and an entry with no CodecId leaves its track listed rather than decoded as something else. The esds parser hands back the DecoderSpecificInfo as bytes, which is the field callers previously had to rebuild from parsed fields.
feat(vp9,av1): bitstream header parsers for stateless hardware decodeAhmet Kaan Gümüş · ee46976
feat(vp9,av1): bitstream header parsers for stateless hardware decode ec-vp9-syntax parses the superframe index and the whole uncompressed frame header (profiles 0-3, colour config, size-from-reference, loop filter, quantization, segmentation, tile info), carrying the state VP9 spreads across frames: reference sizes, segmentation data and loop filter deltas. The spec 8.6.1 dequantization tables and the 8.8.1 loop filter level derivation ship with it, so every field of VADecPictureParameterBufferVP9 and VASegmentParameterVP9 comes out of the parse. ec-av1-syntax parses OBU framing, the sequence header and the frame header in full (superres, reference signalling incl. set_frame_refs, tile info, quant, segmentation, delta q/lf, loop filter, CDEF, loop restoration, tx mode, skip mode, global motion, film grain) plus tile group offsets, and derives the warp shear validity VAWarpedMotionParamsAV1 asks for. Both are BitReader-based, forbid unsafe, and answer malformed input with a typed error rather than a panic. Verified against every VP9/AV1 fixture stream with ffprobe as the oracle: dimensions, profile, bit depth, chroma, per-frame key flags and shown-frame counts all agree, including 10-bit, 4:4:4, monochrome, multi-tile, superframes and show_existing_frame.
feat(matroska): EBML grammar and Matroska/WebM demuxerAhmet Kaan Gümüş · 4888147
feat(matroska): EBML grammar and Matroska/WebM demuxer The element grammar both directions share (variable-length ids and sizes, in-memory child walks, the unknown-length rule) and the reader on top of it: segment and track walk, cluster walk, SimpleBlock and BlockGroup, all three lacings, ContentEncodings undone (zlib through ec-inflate, header stripping put back, everything else refused by name), and cue-driven seeking on the one reader a file was opened with. Ported from the engine's own demuxer, restructured around the ec-core Demuxer contract: packets stream out of one cluster-sized allocation instead of a frame index built for a video editor, and every track of the file becomes a StreamInfo rather than one picture track plus a sound list.
feat(riff): WAV reader/writer and the hound shim over itAhmet Kaan Gümüş · 5dd56cf
feat(riff): WAV reader/writer and the hound shim over it ec-riff writes and reads RIFF/WAVE: 8/16/24/32-bit integer PCM and 32-bit float, mono through 7.1, any sample rate. The writer streams and patches the RIFF, data and fact sizes in finalize (best-effort on drop), and emits WAVE_FORMAT_EXTENSIBLE with a channel mask whenever a file has more than two channels or more than 16 bits. The reader walks the chunk list rather than assuming fmt-then-data, so LIST/INFO, fact and odd-sized chunks with their pad byte are skipped, and a truncated or unpatched data size yields what is actually there. RF64, ADPCM and 64-bit float are refused by name. shims/hound carries package name hound 3.5.1 over ec-riff, covering exactly what edith consumes: WavWriter::create/write_sample/finalize, WavSpec, SampleFormat and an Error with the incumbent's variants. Checks: cargo test -p ec-riff -p hound (10 tests), and the emitted oracle artifacts compared against ffmpeg's own decode - 5 written formats and the 6 wav fixtures all PASS at corr 1.000000, RMS delta 0.
feat(opus): range decoder and packet framingAhmet Kaan Gümüş · b05a16e
feat(opus): range decoder and packet framing RFC 6716 Section 4.1 range decoder (exact u32 arithmetic, raw bits from the frame end, ec_tell/ec_tell_frac) and Section 3 + Appendix B framing: TOC, codes 0-3, padding, and the self-delimiting variant multistream needs. Checks: symbol round-trip against a test-only range encoder written from Section 5.1, tell/tell_frac agreement, and a malformed-input sweep that must never panic.
feat(core): workspace + ec-core IR foundationAhmet Kaan Gümüş · a3c0049
feat(core): workspace + ec-core IR foundation
Cargo workspace (crates/*, shims/*, tools/*) and ec-core, the IR every
crate in the family builds on:
- timebase: reduced rational TimeBase + Timestamp, all i128-exact integer
math, four rounding modes. 24000/1001 is representable and stays exact;
cross-base ordering compares instants without rounding first.
- packet: Buf (refcounted byte range, cheap clone and slice) + Packet with
optional pts/dts/duration, flags and side data.
- frame: VideoFrame over validated planes (I420/I422/I444, 10-bit I010/
I210/I410, NV12/NV21, P010/P016, gray, packed RGB/BGRA) with CICP colour
code points, AudioFrame with named channel positions (5.1 = FL FR FC LFE
BL BR) interleaved or planar.
- bitio: MSB and LSB bit readers/writers, exp-Golomb ue/se both ways,
truncation reported as NeedMore instead of panicking, exp-Golomb prefix
bounded so a fuzzer cannot spin.
- error: NeedMore/Eof/Unsupported{what,why}/Corrupt{context}/Io; a refusal
always names what was refused and why.
- registry: CodecId for every codec edith touches (video, audio, subtitle),
CodecParameters/StreamInfo, and the Demuxer/Muxer/Decoder/Encoder
contracts. Codecs are push/pull (send_packet/receive_frame) because
packets and frames do not correspond one to one and end of stream has to
be drainable.
forbid(unsafe_code), warn(missing_docs), no dependencies, no async.