Skip to content

obs-source: port source frame initialization to Rust (Refs #5628) - #5637

Merged
zackees merged 2 commits into
masterfrom
port/5628-source-frame-init
Nov 25, 2026
Merged

zackees merged 2 commits into
masterfrom
port/5628-source-frame-init

Conversation

@zackees

@zackees zackees commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Refs #5628.

obs_source_frame_init now delegates null handling and initialization to a safe Rust core. Its thin ABI shim reuses the existing Rust video_frame_init allocation, then writes only format, width, height and all eight plane pointers/strides. Raw field writes preserve unrelated fields and padding without reading uninitialized boolean storage. Empty/unsupported allocations retain the existing fatal allocator boundary. No intentional behavior differences.

The C extraction remains unchanged for the reference library, in its own ported group/export fragment. An exact legacy copy supplies the independent C oracle, which calls the original C video allocator and compares every source-frame byte after normalizing only allocation addresses. Size, alignment and all 16 public field offsets are measured from the real C header. Existing C tests, public headers, WebSocket code, workflows and test executable inventory are unchanged. Tier 4 does not apply: there is no protocol change.

RED feda30e (original local eea4b1223, amended by ./push's stamp) fails all three new safe-core mirrors at the todo stub. GREEN 96b0a5dab passes all seven focused tests and the broader source suite (1,668 passed, five existing ignored). Tier 1 mirrors the C null diagnostic and 18 format/size combinations; Tier 3 additionally covers all 25 non-NONE formats, varied initial bytes, capped random dimensions, and allocation-relative plane offsets. A deliberate wrong-width mutation failed the property test with C byte-mismatch bitmask 4; the restored core passes.

Local Linux Tier 2: unchanged test_source_frame_init passed 25 repetitions on EACH C-reference/hybrid backend; independent loader output confirms the intended library in both modes, and the 1,769 dynamic exported symbols are identical. This was focused local validation, not the full Tier 2 suite. Native macOS/Windows execution and complete hosted Tier 2 remain required. Build-group checks pass 10/10; the sole primary clud-review reviewer found no findings. Full SOLDR_PORCELAIN=0 ./lint passed in 274.9 seconds. Final ./push client lint passed Clippy and Dylint for all six targets in 170.3 seconds; client-checks could not find xmllint, so ordinary required CI remains enabled. Published head 9f033fc has exactly the reviewed/tested GREEN product tree (96b0a5dab); only publication metadata changed.

Test cost: seven new cases in the existing obs-tests-core binary; 25 successful reduced-parity module repetitions, longest 0.01 seconds, peak RSS 22,960 KiB. No own threads; the global-log test re-executes the same category binary for isolation. No new executable.

Parent #5634 has merged. Only the two own RED/GREEN commits were replayed onto fresh master 8a19542; both are identical in range-diff. This draft remains unarmed until admission permits promotion. The prerequisite's SIMDe::SIMDe registration correction is retained unchanged.

Fresh landing validation on 2026-11-25: source::frame_init passes all seven focused Tier 1/layout/Tier 3 tests after own-range replay (local-test-ZiBDTY.log). No implementation changes were needed. Fresh six-target lint runs through ./push; this session's one standalone full lint was used for the weak-reference landing, per pool rule. Historical full source and Tier 2 runs above were not repeated in this landing pass.

Landing publication succeeded through ./push with an exact lease replacing 9f033fc. Published HEAD 819ba8e matches origin and the PR. Fresh six-target client lint passed (289.7 s, local-test-xLkmLH.log). Missing xmllint still prevents complete client-checks proof, so ordinary required PR CI remains enabled.

@zackees zackees added the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 25, 2026
@zackees zackees changed the title obs-source: mirror frame initialization against Rust stub (Refs #5628) obs-source: port source frame initialization to Rust (Refs #5628) Nov 25, 2026
@zackees zackees added pool-active Pool worker owns this PR; automated rebases must skip it and removed pool-active Pool worker owns this PR; automated rebases must skip it labels Nov 25, 2026
Ci-Attestation: {"at":1795607062,"gate":"general/all/client-lint","host":"linux-x86_64","key":"ad9ee3e00a624bc1a9ae305568f371467961927205805fcc89c5fe7def626cb0","lane":"client-lint","parents":["023619c5e7aab5f752e95660a6a6896d71963db2"],"secs":305,"stamp":"c244ed202e316add4b7858f0472480dc","tree":"e84831bbb222d85384ade4227812e46e6e7bbca7","v":1,"via":"run"}
Ci-Attestation: {"at":1795607063,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"ad9ee3e00a624bc1a9ae305568f371467961927205805fcc89c5fe7def626cb0","lane":"client-lint","parents":["023619c5e7aab5f752e95660a6a6896d71963db2"],"secs":305,"stamp":"8e3bf2b8e84a423adae0e698417385dc","tree":"e84831bbb222d85384ade4227812e46e6e7bbca7","v":1,"via":"run"}
Ci-Attestation: {"at":1795607063,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"ad9ee3e00a624bc1a9ae305568f371467961927205805fcc89c5fe7def626cb0","lane":"client-lint","parents":["023619c5e7aab5f752e95660a6a6896d71963db2"],"secs":305,"stamp":"a4185ff376808429d70f9004c11bf140","tree":"e84831bbb222d85384ade4227812e46e6e7bbca7","v":1,"via":"run"}
Ci-Attestation: {"at":1795607063,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"ad9ee3e00a624bc1a9ae305568f371467961927205805fcc89c5fe7def626cb0","lane":"client-lint","parents":["023619c5e7aab5f752e95660a6a6896d71963db2"],"secs":305,"stamp":"2a1d697dcb6f5baf3719852aedf00013","tree":"e84831bbb222d85384ade4227812e46e6e7bbca7","v":1,"via":"run"}
Ci-Attestation: {"at":1795607063,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"ad9ee3e00a624bc1a9ae305568f371467961927205805fcc89c5fe7def626cb0","lane":"client-lint","parents":["023619c5e7aab5f752e95660a6a6896d71963db2"],"secs":305,"stamp":"4b526ac2b09031a837bc8df50e76fd40","tree":"e84831bbb222d85384ade4227812e46e6e7bbca7","v":1,"via":"run"}
Ci-Attestation: {"at":1795607063,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"ad9ee3e00a624bc1a9ae305568f371467961927205805fcc89c5fe7def626cb0","lane":"client-lint","parents":["023619c5e7aab5f752e95660a6a6896d71963db2"],"secs":305,"stamp":"42998faf6d273d31a7e31858e113ec60","tree":"e84831bbb222d85384ade4227812e46e6e7bbca7","v":1,"via":"run"}
Ci-Attestation: {"at":1795607063,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"ad9ee3e00a624bc1a9ae305568f371467961927205805fcc89c5fe7def626cb0","lane":"client-lint","parents":["023619c5e7aab5f752e95660a6a6896d71963db2"],"secs":305,"stamp":"3fadcdd19e5c702111afaa44a691306c","tree":"e84831bbb222d85384ade4227812e46e6e7bbca7","v":1,"via":"run"}
Ci-Attestation: {"at":1795607063,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"ad9ee3e00a624bc1a9ae305568f371467961927205805fcc89c5fe7def626cb0","lane":"client-lint","parents":["023619c5e7aab5f752e95660a6a6896d71963db2"],"secs":305,"stamp":"542b566fa6430912f07d551b617e7e2a","tree":"e84831bbb222d85384ade4227812e46e6e7bbca7","v":1,"via":"run"}
Ci-Attestation: {"at":1795607063,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"ad9ee3e00a624bc1a9ae305568f371467961927205805fcc89c5fe7def626cb0","lane":"client-lint","parents":["023619c5e7aab5f752e95660a6a6896d71963db2"],"secs":305,"stamp":"bace0d3b04b9c236ebbdf1396ce8d2ff","tree":"e84831bbb222d85384ade4227812e46e6e7bbca7","v":1,"via":"run"}
Ci-Attestation: {"at":1795607063,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"ad9ee3e00a624bc1a9ae305568f371467961927205805fcc89c5fe7def626cb0","lane":"client-lint","parents":["023619c5e7aab5f752e95660a6a6896d71963db2"],"secs":305,"stamp":"bfb0c151cbb8e0296ab76a9ddacedd51","tree":"e84831bbb222d85384ade4227812e46e6e7bbca7","v":1,"via":"run"}
Ci-Attestation: {"at":1795607063,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"ad9ee3e00a624bc1a9ae305568f371467961927205805fcc89c5fe7def626cb0","lane":"client-lint","parents":["023619c5e7aab5f752e95660a6a6896d71963db2"],"secs":305,"stamp":"7cbd26658c00522ccd8c816fab00ca6b","tree":"e84831bbb222d85384ade4227812e46e6e7bbca7","v":1,"via":"run"}
Ci-Attestation: {"at":1795607062,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"ad9ee3e00a624bc1a9ae305568f371467961927205805fcc89c5fe7def626cb0","lane":"client-lint","parents":["023619c5e7aab5f752e95660a6a6896d71963db2"],"secs":305,"stamp":"3c77f0876c501d5a86bff1be5967c6cb","tree":"e84831bbb222d85384ade4227812e46e6e7bbca7","v":1,"via":"run"}
Ci-Attestation: {"at":1795607063,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"ad9ee3e00a624bc1a9ae305568f371467961927205805fcc89c5fe7def626cb0","lane":"client-lint","parents":["023619c5e7aab5f752e95660a6a6896d71963db2"],"secs":305,"stamp":"436f8ad6a1fd136eb92a355211c8fbfc","tree":"e84831bbb222d85384ade4227812e46e6e7bbca7","v":1,"via":"run"}
Ci-Attestation: {"at":1795615369,"gate":"general/all/client-lint","host":"linux-x86_64","key":"a01791cb984fac6cc08264029f9c3158e80c419df6e2ca3d50d8fa4bf8dce48c","lane":"client-lint","parents":["0c5380e35bdea9d0120a1163d468543bdc3a01c6"],"secs":289,"stamp":"5e2d74f0fc039966ae423a85fdbcf7ba","tree":"6d7a7ca98003ff0c94d45fea09a0fae799568dce","v":1,"via":"run"}
Ci-Attestation: {"at":1795615371,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"a01791cb984fac6cc08264029f9c3158e80c419df6e2ca3d50d8fa4bf8dce48c","lane":"client-lint","parents":["0c5380e35bdea9d0120a1163d468543bdc3a01c6"],"secs":289,"stamp":"4f6b02a3829e213aae1898c5f01f4882","tree":"6d7a7ca98003ff0c94d45fea09a0fae799568dce","v":1,"via":"run"}
Ci-Attestation: {"at":1795615371,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"a01791cb984fac6cc08264029f9c3158e80c419df6e2ca3d50d8fa4bf8dce48c","lane":"client-lint","parents":["0c5380e35bdea9d0120a1163d468543bdc3a01c6"],"secs":289,"stamp":"fd6183b834f9345d80ff7263f985b68c","tree":"6d7a7ca98003ff0c94d45fea09a0fae799568dce","v":1,"via":"run"}
Ci-Attestation: {"at":1795615370,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"a01791cb984fac6cc08264029f9c3158e80c419df6e2ca3d50d8fa4bf8dce48c","lane":"client-lint","parents":["0c5380e35bdea9d0120a1163d468543bdc3a01c6"],"secs":289,"stamp":"c7daa2140530fdccc0bf8db3217db9c1","tree":"6d7a7ca98003ff0c94d45fea09a0fae799568dce","v":1,"via":"run"}
Ci-Attestation: {"at":1795615371,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"a01791cb984fac6cc08264029f9c3158e80c419df6e2ca3d50d8fa4bf8dce48c","lane":"client-lint","parents":["0c5380e35bdea9d0120a1163d468543bdc3a01c6"],"secs":289,"stamp":"5d73645c07ae48bf93a0aeccf5eb2d80","tree":"6d7a7ca98003ff0c94d45fea09a0fae799568dce","v":1,"via":"run"}
Ci-Attestation: {"at":1795615369,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"a01791cb984fac6cc08264029f9c3158e80c419df6e2ca3d50d8fa4bf8dce48c","lane":"client-lint","parents":["0c5380e35bdea9d0120a1163d468543bdc3a01c6"],"secs":289,"stamp":"51d0ba0f49e5833cc6614ff05c88567d","tree":"6d7a7ca98003ff0c94d45fea09a0fae799568dce","v":1,"via":"run"}
Ci-Attestation: {"at":1795615370,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"a01791cb984fac6cc08264029f9c3158e80c419df6e2ca3d50d8fa4bf8dce48c","lane":"client-lint","parents":["0c5380e35bdea9d0120a1163d468543bdc3a01c6"],"secs":289,"stamp":"8de44d60e7cd06bac804a8cb20b68c0f","tree":"6d7a7ca98003ff0c94d45fea09a0fae799568dce","v":1,"via":"run"}
Ci-Attestation: {"at":1795615371,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"a01791cb984fac6cc08264029f9c3158e80c419df6e2ca3d50d8fa4bf8dce48c","lane":"client-lint","parents":["0c5380e35bdea9d0120a1163d468543bdc3a01c6"],"secs":289,"stamp":"221e65da589caa4c3094ee2a245f469c","tree":"6d7a7ca98003ff0c94d45fea09a0fae799568dce","v":1,"via":"run"}
Ci-Attestation: {"at":1795615371,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"a01791cb984fac6cc08264029f9c3158e80c419df6e2ca3d50d8fa4bf8dce48c","lane":"client-lint","parents":["0c5380e35bdea9d0120a1163d468543bdc3a01c6"],"secs":289,"stamp":"f44adb28cb5ca93cd68418a640bfbccc","tree":"6d7a7ca98003ff0c94d45fea09a0fae799568dce","v":1,"via":"run"}
Ci-Attestation: {"at":1795615370,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"a01791cb984fac6cc08264029f9c3158e80c419df6e2ca3d50d8fa4bf8dce48c","lane":"client-lint","parents":["0c5380e35bdea9d0120a1163d468543bdc3a01c6"],"secs":289,"stamp":"8ce891700bd83bc08fa8bf7914e74fbe","tree":"6d7a7ca98003ff0c94d45fea09a0fae799568dce","v":1,"via":"run"}
Ci-Attestation: {"at":1795615370,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"a01791cb984fac6cc08264029f9c3158e80c419df6e2ca3d50d8fa4bf8dce48c","lane":"client-lint","parents":["0c5380e35bdea9d0120a1163d468543bdc3a01c6"],"secs":289,"stamp":"9517d9854551947128b4d0e71cedcb8a","tree":"6d7a7ca98003ff0c94d45fea09a0fae799568dce","v":1,"via":"run"}
Ci-Attestation: {"at":1795615369,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"a01791cb984fac6cc08264029f9c3158e80c419df6e2ca3d50d8fa4bf8dce48c","lane":"client-lint","parents":["0c5380e35bdea9d0120a1163d468543bdc3a01c6"],"secs":289,"stamp":"2d0b89bf8686e19f87f1eca73c99c093","tree":"6d7a7ca98003ff0c94d45fea09a0fae799568dce","v":1,"via":"run"}
Ci-Attestation: {"at":1795615369,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"a01791cb984fac6cc08264029f9c3158e80c419df6e2ca3d50d8fa4bf8dce48c","lane":"client-lint","parents":["0c5380e35bdea9d0120a1163d468543bdc3a01c6"],"secs":289,"stamp":"e947fc6f835a70b0fb28757db56a1b58","tree":"6d7a7ca98003ff0c94d45fea09a0fae799568dce","v":1,"via":"run"}
@zackees
zackees force-pushed the port/5628-source-frame-init branch from 9f033fc to 819ba8e Compare November 25, 2026 14:03
@zackees zackees removed the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 25, 2026
@zackees
zackees marked this pull request as ready for review November 25, 2026 18:43
@zackees
zackees added this pull request to the merge queue Nov 25, 2026
@obs-rust-project-manager obs-rust-project-manager Bot moved this to In merge queue in obs-rust Multiview Nov 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures Nov 25, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.
@zackees
zackees added this pull request to the merge queue Nov 25, 2026
Merged via the queue into master with commit 76857f7 Nov 25, 2026
46 checks passed
@zackees
zackees deleted the port/5628-source-frame-init branch November 25, 2026 21:49
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In merge queue to Done in obs-rust Multiview Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant