Commits
Commits on
8dbd683068d7f87f21dcc4ed1dfdca786d82c52bFiltered to crates/ec-av1/src/motion.rsClear filter2026-08-27
fix(av1): clamp inter MC reads to the reference's true extent, not its coding strideAhmet Kaan Gümüş · 8d520ef
fix(av1): clamp inter MC reads to the reference's true extent, not its coding stride sequence_round_trips_at_a_non_multiple_size (160x96) failed on inter-frame chroma/luma content: a spec decoder's reference buffer holds exactly FrameWidth x FrameHeight (mi_cols*4 x mi_rows*4) -- a superblock's partition stops early at has_cols/has_rows and never codes syntax for padding columns/rows beyond the true edge, so those samples are never part of the decoded picture. MC's Clip3 (spec 7.11.3.4) must clamp reference reads to that true extent, replicating the true edge, not to this crate's own padded-to-SUPERBLOCK coding surface. `mc::sample`/`mc::predict` used one width/height pair for both the buffer's row stride and the Clip3 clamp bound, conflating the two; split into a `stride` param (the buffer's real row length, unchanged) plus `true_width`/`true_height` (the clamp bound, now `Plane::true_width`/ `true_height` at the call site) threaded through `motion::search` and `encode::mc_trial`. Gate: 126 passed/1 failed/4 ignored -> 127 passed/0 failed/4 ignored.
2026-08-26
feat(av1): diamond/log integer + half/quarter-pel motion searchAhmet Kaan Gümüş · 5986059
feat(av1): diamond/log integer + half/quarter-pel motion search Adds crates/ec-av1/src/motion.rs: a log/diamond integer-pel search over one reference plane through mc::predict, refined by one half-pel then one quarter-pel round. Cost is SAD + lambda * mv_bits, where mv_bits prices the MV residual (joint/class/bit/fraction/hp) by interval-narrowing through encode::symbol_bits against the cdf::MV_* tables, matching the tile writer's own convention rather than a per-entry probability lookup. SEARCH_INITIAL_STEP_PEL=8 landed from a three-way sweep (4/8/16) recorded in motion.rs's own inline test. SAD chosen over SSE per a doc-comment measurement.