Skip to content

chore: cleanup#1

Merged
uqio merged 7 commits into
mainfrom
chore/cleanup
May 12, 2026
Merged

chore: cleanup#1
uqio merged 7 commits into
mainfrom
chore/cleanup

Conversation

@uqio
Copy link
Copy Markdown
Contributor

@uqio uqio commented May 12, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs a broad API cleanup/refactor across videoframe, notably unifying width-alignment validation errors, expanding/adjusting Bayer support APIs, and adding initial HSV plane wrapper types under source.

Changes:

  • Replace OddWidth / WidthNotMultipleOf4 with a unified WidthAlignment + WidthAlignmentRequirement across multiple frame families and update tests accordingly.
  • Add/expand Bayer-related APIs (patterns, WB/CCM validation types, row/walker plumbing) and remove the standalone cfa module.
  • Add source::hsv types (HsvPlane, HsvFrame, HsvFrameMut) and expose them from source::mod.

Reviewed changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
videoframe/src/source/walker_macro.rs Makes generated row constructors/accessors pub const fn and cleans up comments.
videoframe/src/source/mod.rs Exposes new hsv module from source.
videoframe/src/source/hsv.rs Adds HSV plane/frame wrapper types (but currently contains compile-blocking move/borrow issues).
videoframe/src/lib.rs Removes pub mod cfa export.
videoframe/src/frame/yuva/sub_4_2_2.rs Switches odd-width validation to WidthAlignment.
videoframe/src/frame/yuva/sub_4_2_0.rs Switches odd-width validation to WidthAlignment.
videoframe/src/frame/y2xx.rs Switches odd-width validation to WidthAlignment and updates panic mapping.
videoframe/src/frame/v210.rs Switches odd-width validation to WidthAlignment and updates panic mapping.
videoframe/src/frame/tests/y2xx.rs Updates tests to assert WidthAlignmentRequirement::Even.
videoframe/src/frame/tests/v210.rs Updates tests to assert WidthAlignmentRequirement::Even.
videoframe/src/frame/tests/subsampled_4_2_0_high_bit.rs Updates odd-width tests to WidthAlignment.
videoframe/src/frame/tests/semi_planar_8bit.rs Updates odd-width tests to WidthAlignment.
videoframe/src/frame/tests/planar_8bit.rs Updates odd-width / multiple-of-4 tests to WidthAlignment.
videoframe/src/frame/tests/packed_yuv_8bit.rs Updates packed 4:2:2 odd-width tests to WidthAlignment.
videoframe/src/frame/tests/packed_yuv_4_1_1.rs Updates packed 4:1:1 multiple-of-4 tests to WidthAlignment.
videoframe/src/frame/tests/bayer.rs Adds behavioral tests for Bayer walkers and sample-range validation.
videoframe/src/frame/subsampled_high_bit_pn.rs Switches odd-width validation to WidthAlignment.
videoframe/src/frame/subsampled_high_bit_planar.rs Switches odd-width validation to WidthAlignment (and updates docs).
videoframe/src/frame/semi_planar_8bit.rs Switches odd-width validation to WidthAlignment.
videoframe/src/frame/planar_8bit.rs Switches odd-width / multiple-of-4 validation to WidthAlignment.
videoframe/src/frame/packed_yuv_8bit.rs Switches odd-width validation to WidthAlignment.
videoframe/src/frame/packed_yuv_4_1_1.rs Switches multiple-of-4 validation to WidthAlignment.
videoframe/src/frame/mod.rs Introduces WidthAlignment + WidthAlignmentRequirement and removes the older payload structs.
videoframe/src/frame/bayer.rs Major expansion: Bayer pattern/demosaic/WB/CCM types + walkers/rows; includes a broken intra-doc link.
videoframe/src/cfa.rs Removed (previously housed BayerPattern).
videoframe/Cargo.toml Bumps crate version to 0.2.0 and pins rust-version = 1.95.0.
Cargo.toml Workspace lint formatting change only.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread videoframe/src/source/hsv.rs Outdated
Comment on lines +45 to +47
pub const fn hsv(&mut self) -> (&mut [u8], &mut [u8], &mut [u8]) {
(self.h, self.s, self.v)
}
Comment on lines +57 to +59
pub const fn h(&mut self) -> &mut [u8] {
self.h
}
Comment thread videoframe/src/frame/bayer.rs Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@uqio uqio merged commit 19477ad into main May 12, 2026
42 of 43 checks passed
@uqio uqio deleted the chore/cleanup branch May 12, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants