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 libobs/media-io/format-conversion.c to obs-media-io #183
Phase 5, media-io item 6 in the approved order on #45. Requirements are from the maintainer's approval: #45 (comment) (see its format-conversion.c section). Independent of item 5, video-frame.c, #151; the maintainer noted the two can be swapped.
Dependencies and existing tests
No unit dependencies: the six functions are pure buffer transforms and format-conversion.c doesn't include or call video-frame.h. No cmocka characterization test exists, so test/cmocka/test_format_conversion.c lands first, passing with ENABLE_RUST_LIBOBS OFF and ON. Nothing in the tree calls these functions; they are exported API only, so that test is the only Tier 2 coverage.
The SIMD is SSE2 integer only, so parity is exact byte equality (no ULP allowance). The Rust core is scalar with no core::arch: luma/chroma byte extraction, chroma averaged as (a + b + c + d) >> 2.
The oracle's sse-shim/simde/x86/sse2.h only has the float __m128 ops for non-x86. It needs the __m128i ops this file uses (_mm_set1_epi32/epi16, _mm_and_si128, _mm_srli_si128, _mm_packs_epi32, _mm_packus_epi16, _mm_add_epi64, _mm_shuffle_epi32, _mm_shufflelo_epi16, _mm_srai_epi16, _mm_load_si128), lane by lane, for the macOS arm64 job.
Parity inputs: 16-byte-aligned buffers with in_linesize % 16 == 0, widths that are multiples of 4, even row ranges. Inputs outside that read or write past the line in C, so they are excluded and listed.
Output buffers are canary-filled and compared in full, so stray writes show up. decompress_* stores native-endian uint32_t, so expectations use to_ne_bytes.
Claiming: libobs/media-io/format-conversion.c (item 6 on #45). One PR, port/format-conversion:
Characterization: test/cmocka/test_format_conversion.c, passing OFF and ON.
RED: Tier 1 tests in obs-media-io porting it 1:1 against a todo!() core, plus the __m128i ops in the oracle's sse2 shim and oracle_* parity scaffolding.
GREEN: a scalar safe core plus FFI for the six exports in a new rust-exports.d fragment, with Tier 3 byte-exact parity using canary-filled buffers.
I expect to open the PR within 48 hours. I don't have permission to add labels, so this issue is missing claimed, port and enhancement.
Activity
swilk19 commentedon Oct 11, 2026
Claiming:
libobs/media-io/format-conversion.c(item 6 on #45). One PR,port/format-conversion:test/cmocka/test_format_conversion.c, passing OFF and ON.obs-media-ioporting it 1:1 against atodo!()core, plus the__m128iops in the oracle's sse2 shim andoracle_*parity scaffolding.rust-exports.dfragment, with Tier 3 byte-exact parity using canary-filled buffers.I expect to open the PR within 48 hours. I don't have permission to add labels, so this issue is missing
claimed,portandenhancement.rust: Port media-io/format-conversion.c to obs-media-io (GREEN)
test/cmocka: Add format-conversion characterization test
rust: Add format-conversion shims and tests to obs-media-io (RED)
rust: Port media-io/format-conversion.c to obs-media-io (GREEN)