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 source draw plan in obs-source.c to obs-source #2187
Port the source draw decisions in libobs/obs-source.c.h to rust/obs-source, as a new module draw_plan. It reuses the draw technique enum from the deinterlace draw port (#2153). These decisions move:
obs_source_render_async_video: for each pair of colour spaces, the technique, the multiplier, linear_srgb and the non-linear alpha choice.
source_render: for each pair of colour spaces, the conversion technique and multiplier, and whether to render through color_space_texrender.
These stay in C: every gs_* call, convert_video_space, obs_get_video_sdr_white_level() (C passes in the value), gs_get_format_from_space and the texrenders.
Plan (one PR, separate commits)
A behaviour-neutral move into libobs/obs-source-draw-plan.c.h, as hidden functions.
Characterization in test_source_draw_plan_steps. It covers:
every source/current space pair, with SDR white levels of 80, 300 and 0;
linear sRGB on and off, and linear alpha on and off;
rotations 0, 90, 180 and 270, plus a non-multiple of 90, with non-square sizes.
RED, then GREEN: the safe Rust core plus shims, in a libobs.ported-source-draw-plan group. Exported symbols are unchanged.
Tier 3 parity against the original C: exhaustive over spaces and flags, plus a proptest over f32 white levels as bit patterns and full-range sizes. Also a deliberate-break check and port_comparison numbers.
These real-libobs tests must stay green on every lane:
Activity
rdoupe commentedon Oct 24, 2026
Claiming: #2187.
libobs: Move the source draw decisions into obs-source-draw-plan.c
test: Characterize the source draw decisions
obs-source: Add Tier 1 tests for the source draw plan port
obs-source: Port the source draw decisions
obs-source: Check the source draw plan port against the C
docs: Record the source draw plan port
obs-source: Port the source draw decisions (obs-rust#2206)