Repository navigation
fix(scopes): compute waveform luma envelopes by image X column (#82) - #93
Merged
Mike-Solar merged 1 commit intoNov 20, 2026
Conversation
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.
Summary
Fixes #82.
Previously,
waveform_envelopesliced the row-majorlumabuffer into contiguous 1D runs, which aggregated horizontal rows (Y) rather than vertical image columns (X). This PR updates the waveform math and connects frame dimensions fromScopeDatathroughLumaDataSourceso each output column aggregates everyYrow at its corresponding imageXcoordinates.Changes
crates/oak-app/src/widgets/scopes/math.rs:waveform_envelopeto take(samples, width, height, columns)and compute per-X-column(min, max)luma envelopes across allYrows.width < columns), empty frames, zero dimensions/columns, truncated buffers, and non-finite (NaN/±Inf) samples safely.crates/oak-app/src/oakui/scopes.rs:widthandheightonScopeDataand populate them inanalyze_f32_rgbaandanalyze_bgra8.analyzed_samples_feed_the_scope_mathfor 2D X-column semantics and add a left/right split test viaanalyze_bgra8.crates/oak-app/src/widgets/scopes/mod.rs&crates/oak-app/src/panels/program_viewer.rs:LumaDataSource::luma_dimensionsand propagateScopeDatadimensions throughScopeStatetoWaveform::envelope(leavingHistogramandVectorscopebehavior unchanged).crates/oak-app/src/panels/program_viewer/tests.rs:ScopeStatereceives the expected frame width and height.Testing
rustc --edition 2024 --testonmath.rsandoakui/scopes.rs: 15/15 unit tests passed.rustfmt --edition 2024 --checkon all modified files: passed.python tooling/check_sdk_consumers.py: passed.cargo testrelies on CI (local checkout lacks thequercus-enginesubmodule and FFmpeg cache).