Repository navigation
obs-source: Port the deinterlace frame selection - #2329
Merged
Merged
Conversation
Behaviour-neutral extraction before the Rust port. The decisions of first_frame(), ready_deinterlace_frames(), deinterlace_get_closest_frames() and deinterlace_update_async_video() in obs-source-deinterlace.c.h move to libobs/obs-source-deinterlace-select.c.h, as eight functions on plain values declared in the new libobs/obs-source-deinterlace-select.h without EXPORT (hidden, as -fvisibility=hidden keeps them): - obs_source_deinterlace_select_first(): first_frame(), no last_frame_ts yet takes the front frame, flagged when two or more are queued; - obs_source_deinterlace_select_walk(): ready_deinterlace_frames() on the queued timestamps. Unbuffered: all but two frames dropped. Buffered: the out-of-bounds reset, the FRAME_TOLERANCE stop, the pairwise drop, the two-or-fewer exit and its obs-rust#2009 exception, the MAX_TS_VAR re-anchor and the final flag. It returns the frames to drop from the front, the new last_frame_ts, whether deinterlace_offset resets, the front frame's flag and whether a frame is ready; - obs_source_deinterlace_select_unbuffered_pair(): the "don't skip ahead" guard of an unbuffered source left with two frames, through the ported obs_source_deinterlace_pacing_wait_for_next() and _waiting_frame_ts(); - obs_source_deinterlace_select_take_reads_flag(), _take_pair(), _take_init_last() and _take_offset(): what deinterlace_get_closest_frames() does with the frame it takes; - obs_source_deinterlace_select_update(): upload the previous frame, swap the textures, or nothing. The walk becomes snapshot, decide, apply: ready_deinterlace_frames() copies the queued timestamps first (on the stack, or the heap past MAX_ASYNC_FRAMES, as get_closest_frame() has since the async pacing port), then erases the dropped frames from the front, each with da_erase() and then remove_async_frame(), in the walk's order, then stores last_frame_ts, deinterlace_offset and the front frame's flag. A queued frame's timestamp is never written after it is queued, and every reader of last_frame_ts and deinterlace_offset holds async_mutex or runs on the graphics thread, so each is stored once, with the walk's final value, instead of once per step (the reads and stores the plan's Risks section accepts). The plan's single take() and select() are split where a read would otherwise move: async_unbuffered is set without a lock (obs_source_set_async_unbuffered()), so each of its reads stays where it was: before the walk, again for an unbuffered source left with two frames (then deinterlace_offset), after the drops, and once more for the offset after a take. The taken frame's flag is read only with frames left, last_frame_ts only for a buffered source, as before. obs->video, the pacing helpers, set_async_texture_size(), update_async_textures(), the texture swaps and every prev_frame write on a frame stay in obs-source-deinterlace.c.h. All arithmetic is uint64_t and wraps as it did; nothing divides. The new file joins libobs.core-source with libobs.pch.h, which includes the new header; source-sets.json lists it. docs/rust-port/naming.md already maps libobs/obs-source*.c.h to rust/obs-source. The exported symbol set is unchanged (1766 on the C backend, the hybrid and libobs-c-reference); the eight functions are local. The deinterlace, async pacing and media tests (test_deinterlace_2x_field_order, test_deinterlace_mode_load, test_media_restart_stale_frame, test_media_restart_first_frame and 26 more) pass on all three. Checked in a scratch harness (not committed) that compiles origin/master's functions verbatim and this branch's next to the moved file and obs-source-deinterlace-pacing.c.h, on a stand-in source whose every field read and write is logged (a script rewrites each access into a logging accessor), with every da_erase(), remove_async_frame(), lock, refcount, set_async_texture_size(), update_async_textures() and frame release. async_unbuffered returns a scripted value per read (the field, or one that changes once, or any value per read). 160,000,000 random states: 50,000,000 each with GCC and Clang at -O2, 20,000,000 each at -O0, 10,000,000 each under ASan and UBSan (GCC -O0, Clang -O2), with queues of 0 to 11 and 28 to 35 frames, regular, jittered, backwards, wrapping and random timestamps, steps and clocks at FRAME_TOLERANCE and MAX_TS_VAR and one either side, and any offsets, half durations, current and previous frames and texture states. 16,296,508,900 events are equal, with the final state, after the one normalization the move needs: inside ready_deinterlace_frames(), frame timestamp reads are dropped, last_frame_ts and deinterlace_offset compare by whether and what they last stored, and whether last_frame_ts was read at all must match. The moved walk also reads every timestamp before its first erase, and last_frame_ts and deinterlace_offset at most once each. Twenty-one of twenty-two deliberately broken moves fail it (the offset read hoisted before the drops or without its async_unbuffered read, release before erase, last_frame_ts read when unbuffered, one async_unbuffered read for the take, the flag read with nothing left, the flag stored before deinterlace_frame_ts, and each decision changed); the one that passes is equivalent (take_pair() without its remaining > 0 test, which the guarded flag read already implies). Refs obs-rust#2315
test_deinterlace_select_steps compiles libobs/obs-source-deinterlace-select.c.h, and obs-source-deinterlace-pacing.c.h which it calls, into itself (ASan and UBSan) and calls only their hidden functions, through their headers. ready_deinterlace_frames(), first_frame() and deinterlace_get_closest_frames() are copied from obs-source-deinterlace.c onto a stand-in source with every erase, release and prev_frame write recorded, so the composition is pinned too. 20 cases pin: - the header's enum values and sizes and MAX_TS_VAR; - the first frame: no last_frame_ts takes the front frame, flagged with two or more queued, for 0 to 4 frames; any last_frame_ts walks; characterized, not endorsed: a frame at timestamp 0 leaves last_frame_ts at 0; - the unbuffered walk for queues of 0 to 5, 30 and 33 frames (all but two dropped, the front one the clock), whatever the clock and order; - the buffered walk: an empty queue; the out-of-bounds reset at MAX_TS_VAR and one either side, both ways; FRAME_TOLERANCE - 1, at it and + 1; the pairwise drop for 5, 6, 30 and 33 frames; the two-or-fewer exit for 1 to 5, 30 and 33 frames, with and without a taken frame (obs-rust#2009: a dropped frame is no pair); the MAX_TS_VAR re-anchor at - 1, at it and + 1, and across a jump with the front frame behind the clock; - characterized, not endorsed: a timestamp going backwards re-anchors (the u64 step wraps); sys_time before last_sys_timestamp moves the clock back; frames past UINT64_MAX compare as far behind a clock that has not wrapped; - the unbuffered pair guard with and without an offset, at the frame's end and either side, and with the next frame before the first (characterized, not endorsed: the duration wraps); - the take decisions and each update case; - the callers: the first frame with one and two queued, a buffered drop and pair ("E0 R0 E1 R1 F2=1 E2 E3"), obs-rust#2009's dropped previous frame, an unbuffered queue of 33 (past MAX_ASYNC_FRAMES), an unbuffered source waiting and pairing. The test is in the test graph, sorted. test_deinterlace_2x_field_order, test_media_restart_stale_frame and test_media_restart_first_frame cover the callers through the real libobs. Refs obs-rust#2315
Adds the deinterlace_select module to rust/obs-source with its API and every function as todo!(): MAX_TS_VAR, FRAME_TOLERANCE (the pacing module's), the First, State, Walk and Pair results, the OffsetKind and Update enums (with the C enums' values), first(), walk(), unbuffered_pair(), the four take_*() decisions and update(). tests/source/deinterlace_select.rs ports test_deinterlace_select_steps 1:1 (steps_*: the same 20 cases, inputs and expectations, with the stand-in source and the copies of the callers, every erase, release and prev_frame write recorded) and adds edge cases (edge_*): - the walk against ready_deinterlace_frames() as it was before the move, written out on a queue that is walked with a cursor and erased frame by frame: exhaustively over queues of 0 to 6 frames on 14 steps (FRAME_TOLERANCE and MAX_TS_VAR and one either side, backwards, u64::MAX, 2^63), 8 anchors, a clock at and around each frame, buffered and unbuffered, three offsets; and by proptest (20,000 cases) over any u64 timestamps, sorted, unsorted, regular from any start (wrapping) or jittered with gaps and steps back, and any state; - the walk's bounds (drops fewer than it was given, an unbuffered queue keeps two, a flagged front frame has a pair) for any input; - the pair guard and first() against their rules, for any input; the take and update decisions over every input. RED: soldr cargo test -p obs-data --test obs-tests-core source::deinterlace_select: 1 passed (the enum values), 25 failed, each on a todo!() (obs_source_deinterlace_select_walk, _first, _unbuffered_pair, _take_reads_flag and _update are the first reached). Refs obs-rust#2315
Ports libobs/obs-source-deinterlace-select.c.h, the deinterlace frame
selection of first_frame(), ready_deinterlace_frames(),
deinterlace_get_closest_frames() and deinterlace_update_async_video(),
to the deinterlace_select module of rust/obs-source.
obs-source-deinterlace.c.h stays C around it: async_mutex, the timestamp
copy, the async_frames queue, da_erase(), remove_async_frame() and the
cache, every prev_frame write, the frame pointers, each read of the
source's fields where it was (async_unbuffered, set without a lock, once
per read), obs->video, the pacing helpers it already called and the
textures. The hybrid libobs drops the C file and links the Rust shims in
its place.
Safe core (src/deinterlace_select.rs):
- first(): First { first, flag_front } from last_frame_ts and the count;
- walk(&[u64], sys_time, State) -> Walk { drop_front, last_frame_ts,
offset_reset, pairs, flag_front, ready }: the unbuffered drop to two,
the out-of-bounds reset, the FRAME_TOLERANCE stop, the pairwise drop
(a cursor over the slice for the C's erases), the two-or-fewer exit
and its obs-rust#2009 exception, the MAX_TS_VAR re-anchor; an empty slice
keeps last_frame_ts and takes nothing;
- unbuffered_pair() -> Pair { prev_frame, frame_ts: Option<u64> },
through deinterlace_pacing::wait_for_next() and waiting_frame_ts()
in-crate;
- take_reads_flag(), take_pair(), take_init_last(), take_offset() ->
OffsetKind and update() -> Update, with the C enums' values. Every sum
and difference is wrapping_add()/wrapping_sub(), as uint64_t in the C;
nothing divides, so no MSVC trap is possible. The module denies
clippy's arithmetic, indexing, as, unwrap, expect, panic,
unimplemented and unreachable lints, keeps no state and takes no lock.
Shims (src/ffi/source_deinterlace_select.rs): the eight functions keep
the C signatures; the three results are #[repr(C)] mirrors of the C
structs, the enums go back as u32. Only the timestamps cross, by pointer
and count. Intentional difference: a null timestamps with a count above
0 is an empty queue (the C reads through it; libobs never passes one).
C side: the file leaves libobs.core-source for its own group,
libobs.ported-source-deinterlace-select (LIBOBS_PORTED_SOURCES), whose
PCH is obs-source-deinterlace-select.h and
obs-source-deinterlace-pacing.h; libobs.pch.h keeps the header for
obs-source-deinterlace.c. The functions are not EXPORT, so the shims are
hidden: rust-hidden.txt, the local: list of rust-exports.map and
rust-unexports-macos.txt. libobs-rust already links the crate's ffi. The
exported symbol sets are unchanged and equal: 1766 on the C backend, the
hybrid and libobs-c-reference; the eight functions are local in all
three, and the hybrid's come from the Rust archive (the group's object
is built only for libobs-c-reference). ci/test_ported_sources.py checks
the group on every host.
test_deinterlace_select_steps still compiles the C file into itself,
unchanged, and test_deinterlace_select_steps_rust runs the same test
source against libobs_rust-static alone: the obs-source member links on
its own, as for test_deinterlace_pacing_steps_rust.
Tier 1 obs_source::deinterlace_select passes 26/26.
Refs obs-rust#2315
Adds the C oracle of the unchanged libobs/obs-source-deinterlace-select.c.h (rust/obs-c-oracle, oracle/source_deinterlace_select.c, its functions renamed to oracle_*, and the two pacing functions it calls renamed to the C pacing oracle's, so the oracle is C throughout) and tests/source/deinterlace_select_parity.rs, which gives every input to the oracle, the shims and the core and compares the bytes the C lays out: drop_front and the timestamps as integers, each bool as the byte the C stores (0 or 1, and equal), the enums as the u32 the C returns. - the constant, the enum values, the three result structs' sizes and offsets and the enum sizes against the C header; - the walk exhaustively over queues of 0 to 6 frames x buffered and unbuffered x nine last_frame_ts (0, at, around and MAX_TS_VAR from the front frame, u64::MAX) on 16 steps (FRAME_TOLERANCE and MAX_TS_VAR and one either side, backwards, wrapping, 0, 1, 2^63, u64::MAX) from three starts, with the clock at and around each frame (145,152 walks, each outcome reached over 1,000 times); every queue of 7 to 40 frames on the steps; - proptests (20,000 cases each) over full-range u64 timestamp vectors of 0 to 40 frames (any, sorted, regular from any start with any step, wrapping, jittered with steps back and threshold gaps) and any state; and first(), the pair guard and the take and update decisions over any input; - first(), the pair guard (14^4 edge combinations), the take and update decisions exhaustively over their edges; - sequences through a model of the deinterlaced async_tick() as obs-source-deinterlace.c.h now calls the functions (the queue, its erases and releases, the flags, the 30-frame cache reset and the source's fields), one copy driven by the C and one by the shims: 25, 29.97, 50 and 59.94 fields into 30, 50 and 59.94 fps, buffered and unbuffered, clean and with jitter, bursts, stalls, late and missed ticks, a canvas clock going back, jumps of MAX_TS_VAR, steps back and random timestamps (86,400 ticks; holds, resets, waits, pairs and releases each reached over 100 times). The steps and the state after every tick must match. MSVC x64: nothing here divides or reaches util_mul_div64(), so no input needs a guard. Intentional difference (not compared): a null timestamps with a count above 0 is an empty queue for the shim. Mutation check (not committed): 27 mutants, each run against Tier 1 (26 tests) and Tier 3 (7). | Area | Mutants | Tier 1 kills | Tier 3 kills | Survivors | |---|---|---|---|---| | first (one frame flagged, last_frame_ts of 1 as none) | 2 | 2 | 2 | 0 | | unbuffered walk (keeps three, clock from the last frame) | 2 | 2 | 2 | 0 | | buffered walk (out of bounds at MAX_TS_VAR or keeping the offset, no sys_offset, tolerance <=, no obs-rust#2009 exception, exit at three or keeping the offset, step of one behind a pair, re-anchor at MAX_TS_VAR or without the front offset, frame_offset not updated, flag from frame, wrapping compare) | 13 | 13 | 13 | 0 | | pair guard (waits without an offset, frame_ts not moved back) | 2 | 2 | 2 | 0 | | take and update (flag read with nothing left, init_last inverted, swap before upload) | 3 | 3 | 3 | 0 | | shims (frame_ts kept when not waiting, set_frame_ts inverted, the two clocks swapped, offset kind inverted, take_pair ignoring remaining) | 5 | 0 | 5 | 0 | Tier 1 26/26 and Tier 3 7/7 pass. Refs obs-rust#2315
- rust/README.md: the obs-source crate row lists libobs/obs-source-deinterlace-select.c.h, and a new row for it in the ported file table: the eight decisions, why the plan is split (each read of the unlocked async_unbuffered and of the guarded fields stays where it was), what stays C, the characterized and not endorsed cases, the intentional difference and the tests; - rust/obs-source: the crate description and the lib.rs docs name the new file and the deinterlace_select module; - rust/obs-c-oracle: a port_comparison bench file, port_comparison/source_deinterlace_select.rs, in the sorted modules![...] list: 1024 ticks through first(), the walk, the pair guard and the take decisions on both sides (1 to 8 queued frames, and 33 past MAX_ASYNC_FRAMES), checked equal by a checksum first. Measured (x86_64 Linux, GCC, release, not pinned to a core, load average about 7; median per 1024 ticks): select_tick Rust 24.8 us, C 22.0 us; long_queue Rust 37.5 us, C 29.4 us, a few ns more per tick for each deinterlaced source. Its fixtures are plain vectors and allocate nothing through bmem, so the bench's free check holds. docs/rust-port/naming.md already maps libobs/obs-source*.c.h to rust/obs-source, so it needs no new row. The port changes no behaviour a user can see, so docs/features.md has no line for it. Fixes obs-rust#2315
rdoupe
force-pushed
the
port/deinterlace-select
branch
from
October 25, 2026 03:58
e5e439d to
d78b0c8
Compare
rdoupe
marked this pull request as ready for review
October 25, 2026 03:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2315
What and why
Ports the deinterlace frame selection of
libobs/obs-source-deinterlace.c.htorust/obs-source, as a new moduledeinterlace_selectnext todeinterlace_pacing(#1954) anddeinterlace_draw(#2153). Every deinterlaced async source (capture cards, interlaced media) runs these decisions once a tick, underasync_mutex. They choose which queued frames the source drops, which it takes as its current and previous frame, and what happens to the textures:first_frame(): a source with nolast_frame_tsyet takes its front frame, paired with the next one when two or more are queued;ready_deinterlace_frames():MAX_TS_VARfrom its clock. Otherwise it moves its clock by the canvas time since the last tick and walks the queue: it stops withinFRAME_TOLERANCEof the next frame, drops frame by frame behind a taken pair, stops with two frames or fewer left and shows the front one alone (bug: libobs: buffered 2x deinterlacing flags a recycled frame and skips fields after it falls behind #2009, libobs: Show every 2x deinterlaced frame after a buffered source falls behind #2048), and re-anchors its clock on a step of more thanMAX_TS_VAR;deinterlace_get_closest_frames(): whether the taken frame's flag is read, whether it takes a pair, whetherlast_frame_tsstarts there, and which offset rule applies;deinterlace_update_async_video(): upload the previous frame, swap the textures, or neither.The plan's API was adjusted. The plan sketched four calls:
select(),first(),take()andupdate(). They became eight functions, because a singleselect()ortake()would hoist reads that the C makes later:async_unbufferedis set by other threads without a lock (obs_source_set_async_unbuffered()). The C reads it before the walk, again for an unbuffered source left with two frames (after the drops, and thendeinterlace_offset), and once more after a take for the offset rule. Each of those reads stays where it was.last_frame_tsonly for a buffered source, as before.The functions:
obs_source_deinterlace_select_first(),_walk()(the whole queue walk, on a copy of the timestamps),_unbuffered_pair()(the guard, through the already ported pacing helpers),_take_reads_flag(),_take_pair(),_take_init_last(),_take_offset()and_update().The walk is now snapshot, decide, apply.
ready_deinterlace_frames()copies the queued timestamps first, on the stack, or the heap pastMAX_ASYNC_FRAMES(asget_closest_frame()has since the async pacing port). It then erases the dropped frames from the front, each withda_erase()and thenremove_async_frame(), in the walk's order. Last it storeslast_frame_ts,deinterlace_offsetand the front frame's flag. These are the moves the plan's Risks section accepts:last_frame_tsanddeinterlace_offsetholdsasync_mutexor runs on the graphics thread, so each is stored once, with the walk's final value, instead of once per step.These stay in C, in their order and under their conditions:
async_mutex, theasync_framesqueue,da_erase(),remove_async_frame()and the cache, everyprev_framewrite on a frame, the frame pointers,obs->video, the pacing calls,set_async_texture_size(),update_async_textures()and the texture swaps.Six commits:
Move (behaviour-neutral): the decisions go to
libobs/obs-source-deinterlace-select.c.h, declared in the newobs-source-deinterlace-select.hwithoutEXPORT, so they are hidden.The move was checked against the original code. A scratch harness (not committed) compiles origin/master's functions verbatim next to this branch's, the moved file and
obs-source-deinterlace-pacing.c.h. A script rewrites every field access into a logging accessor on a stand-in source.da_erase(),remove_async_frame(), lock, refcount,set_async_texture_size(),update_async_textures()and frame release, in order.async_unbufferedreturns a scripted value: the field, one that changes once, or any value per read, as another thread could set it.-O2, 20,000,000 each at-O0, and 10,000,000 each under ASan and UBSan (GCC-O0, Clang-O2).FRAME_TOLERANCEandMAX_TS_VARand one either side; any offsets, half durations, current and previous frames and texture states.ready_deinterlace_frames(), frame timestamp reads are dropped,last_frame_tsanddeinterlace_offsetcompare by whether and what they last stored, and whetherlast_frame_tswas read at all must match. The moved walk is also checked to read every timestamp before its first erase, andlast_frame_tsanddeinterlace_offsetat most once each.22 deliberately broken moves were tried; 21 fail the harness:
async_unbufferedread;last_frame_tsread when unbuffered;async_unbufferedread for the whole take;deinterlace_frame_ts;The one that passes is equivalent:
take_pair()without itsremaining > 0test, which the guarded flag read already implies.Characterization:
test_deinterlace_select_steps, 20 cases. It compiles the moved file andobs-source-deinterlace-pacing.c.h(ASan and UBSan) and calls only their functions. The callers are copied onto a stand-in source with every erase, release andprev_framewrite recorded. It pins:FRAME_TOLERANCE− 1, at it and + 1, and atMAX_TS_VAR− 1, at it and + 1;E0 R0 E1 R1 F2=1 E2 E3), bug: libobs: buffered 2x deinterlacing flags a recycled frame and skips fields after it falls behind #2009's dropped previous frame, an unbuffered queue of 33, an unbuffered source waiting and pairing.It is in the test graph, sorted.
RED: Tier 1 against
todo!(). It ports the 20 C cases 1:1 and adds edge tests: the walk againstready_deinterlace_frames()as it was before the move, written out on a queue that is erased frame by frame (exhaustive over queues of 0 to 6 frames on a grid of steps and clocks, and a proptest over anyu64timestamps and state), the walk's bounds, and the small decisions over every input.GREEN: the safe core and eight
#[no_mangle]shims, in a newlibobs.ported-source-deinterlace-selectgroup whose PCH is the new header and the pacing header.source-sets.json, the unity lists, the three export lists andci/test_ported_sources.py, each in sorted place.test_deinterlace_select_steps_rust, which linkslibobs_rust-staticalone, astest_deinterlace_pacing_steps_rustdoes.Tier 3: a C oracle of the unchanged file (calling the C pacing oracle), the parity tests and a mutation check.
Docs: the README rows, the crate's description,
lib.rsand aport_comparisonbench file.docs/rust-port/naming.mdalready mapslibobs/obs-source*.c.htorust/obs-source.The core denies clippy's arithmetic, indexing,
as, unwrap, expect, panic, unimplemented and unreachable lints. It keeps no state and takes no lock.sys_timebeforelast_sys_timestampmoves the clock back;u64::MAXcompare as far behind a clock that has not wrapped;last_frame_tsat 0, so the next tick takes the first frame again.timestampswith a count above 0 is an empty queue for the shim; the C reads through it. libobs never passes one. It is listed in the parity test header, the shim docs andrust/README.md.u64and wraps in C; the port useswrapping_add/wrapping_sub. Nothing divides or reachesutil_mul_div64()(the pacing helpers this calls halve by a constant, already ported), so no input can trap and nothing is guarded.Bench (x86_64 Linux, GCC, release, not pinned to a core, load average about 7; median per 1024 ticks):
select_tickRust 24.8 µs, C 22.0 µs;long_queue(33 frames) Rust 37.5 µs, C 29.4 µs. That is a few ns more per tick for each deinterlaced source.RED → GREEN
5ee69654d(obs-source: Test the deinterlace_select port;e5e439d8bbefore the rebase ontoe389f2fed).soldr cargo test -p obs-data --test obs-tests-core source::deinterlace_select: 1 passed (the enum values), 25 failed, each on atodo!(). On that commitlocal_gate --lane lintwas clean and--test-diff origin/masterfailed only on those 25 cases.7f0067a1d): Tier 1 26/26. Tier 3 (6ad1c7cb1) 7/7: the constant, enum values, struct layouts; the walk exhaustively over queues of 0 to 6 frames × buffered/unbuffered × ninelast_frame_ts× 16 steps × clocks (145,152 walks) and every queue of 7 to 40 frames; proptests (20,000 cases each) over full-rangeu64timestamp vectors (sorted, unsorted, wrapping, jittered); the pair guard over 14^4 edge combinations; 86,400 ticks of sequences through a model of the deinterlacedasync_tick(), C against the shims, every step and the state after every tick.d78b0c896, rebased one389f2fed):libobs-c-reference, identical; the eight functions are local in all three, and the hybrid's come from the Rust archive (the group's object is built only forlibobs-c-reference);test_deinterlace_select_steps,test_deinterlace_2x_field_order,test_deinterlace_mode_load,test_media_restart_stale_frame,test_media_restart_first_frame,test_deinterlace_pacing_steps,test_async_frame_pacing_stepsand 23 more): 30/30 on the C backend, 35/35 on the hybrid and onlibobs-c-reference(with the_ruststeps variants);test_pulse_default_follow,test_v4l2_vivid_replug,test_v4l2_vivid_stall); C backend 498/499, the one failuretest_view, whoseobs_startup()could not open the X display under load (XOpenDisplay failed during hotkey initialization); it passes alone on all three.local_gate --lane lint,--lane crossand--test-diff origin/master(3937 tests passed) pass; Windows clippy (--target x86_64-pc-windows-msvc --all-targets -D warnings) is clean;soldr cargo test -p obs-c-oracle --bench port_comparisonpasses.Checklist
masterdocs/features.mdis added or updated (not applicable: no user-visible change)-W..., ratchets): not applicable