You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rust: Port the deinterlace draw plan in obs-source-deinterlace.c to obs-source #2130
Port the deinterlace draw decisions in libobs/obs-source-deinterlace.c.h to rust/obs-source, as a new module deinterlace_draw next to deinterlace_pacing. These decisions move:
get_effect: the mode-to-effect table. Rust returns an index; C keeps obs_load_effect and the effect slots.
deinterlace_linear_required.
In deinterlace_render:
the early return;
linear_srgb;
the technique and multiplier for each pair of source and current colour spaces;
obs_load_effect, convert_video_space and obs_get_video_sdr_white_level(). C passes their results in.
enable_deinterlacing, disable_deinterlacing and obs_enter_graphics.
Plan (one PR, separate commits)
A behaviour-neutral move into libobs/obs-source-deinterlace-draw.c.h, as hidden functions.
Characterization in test_deinterlace_draw_plan_steps. It covers:
every mode, plus -1 and 99, for the effect index and the linear rule;
the 4 × 4 space pairs, at SDR white levels of 80, 300 and 0;
frame2 at the threshold - 1, at the threshold, at + 1, and at the u64 wrap;
every mode change.
RED, then GREEN: the safe Rust core plus shims, in a libobs.ported-source-deinterlace-draw group. Exported symbols are unchanged.
Tier 3 parity against the original C. It is exhaustive over modes (including i32 values outside the enum), space pairs and flags, and adds a proptest over full-range u64 times and f32 white levels taken as bit patterns. Also a deliberate-break check and port_comparison numbers.
These real-libobs tests must stay green on every lane: test_deinterlace_2x_field_order, test_deinterlace_pacing_steps, test_deinterlace_mode_load and test_media_restart_first_frame.
Activity
rdoupe commentedon Oct 24, 2026
Claiming: #2130.
libobs: Move the deinterlace draw decisions into obs-source-deinterla…
test: Characterize the deinterlace draw decisions
obs-source: Add Tier 1 tests for the deinterlace draw port
obs-source: Port the deinterlace draw decisions
obs-source: Check the deinterlace draw port against the C
docs: Record the deinterlace draw port
obs-source: Port the deinterlace draw decisions (obs-rust#2153)