Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support funny sizes #4

Merged
merged 2 commits into from
Jun 21, 2024
Merged

support funny sizes #4

merged 2 commits into from
Jun 21, 2024

Conversation

scottlamb
Copy link
Collaborator

  • refine PlaneDims logic for uyvy dimension calculation
  • relax constraints on uyvy_to_i420::convert
  • process rows, not just blocks, with processors deferring to a fallback. In theory at least the AVX one could use masked instructions instead, but the fallback approach was easy.
  • test with miri

@scottlamb scottlamb requested a review from Xaeroxe June 21, 2024 04:01
* refine `PlaneDims` logic for uyvy dimension calculation
* relax constraints on `uyvy_to_i420::convert`
* process rows, not just blocks, with processors deferring to a
  fallback. In theory at least the AVX one could use masked instructions
  instead, but the fallback approach was easy.
* test with miri
Copy link

@Xaeroxe Xaeroxe left a comment

Choose a reason for hiding this comment

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

I'm trusting the tests to validate that the SIMD code does what it ought to. This looks good to me!

Comment on lines +36 to +49
miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: miri
- name: Cache
uses: Swatinem/rust-cache@v2
with:
key: miri
- run: cargo miri test
Copy link

Choose a reason for hiding this comment

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

Now this I like. I'll have to make use of miri in CI more often.

///
/// The caller must ensure that the frame is fully initialized, including
/// any padding bytes.
unsafe fn initialize(&mut self);
Copy link

Choose a reason for hiding this comment

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

Good catch moving this to the other trait

@scottlamb scottlamb merged commit e2320de into main Jun 21, 2024
3 checks passed
@scottlamb scottlamb deleted the weird-sizes branch June 21, 2024 21:09
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