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

Fix YUV 4:2:0, 4:2:2 large strides #2385

Merged
merged 2 commits into from
Nov 27, 2024
Merged

Conversation

awxkee
Copy link
Contributor

@awxkee awxkee commented Nov 26, 2024

If the stride is larger than the plane size, it might contain junk data beyond the actual valid region.
To avoid processing artifacts when working with odd-sized images, the buffers is reshaped to their actual size.

@awxkee
Copy link
Contributor Author

awxkee commented Nov 26, 2024

Looks like CI errors are unrelated to this PR

Copy link
Member

@HeroicKatora HeroicKatora left a comment

Choose a reason for hiding this comment

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

Nit: code style, we can use expressive methods since 1.73 so this shouldn't have an effect on our MSRV.

src/codecs/avif/yuv.rs Outdated Show resolved Hide resolved
Co-authored-by: Andreas Molzer <[email protected]>
@awxkee awxkee requested a review from HeroicKatora November 26, 2024 15:50
@HeroicKatora HeroicKatora merged commit 5080752 into image-rs:main Nov 27, 2024
30 of 32 checks passed
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