Skip to content

fix an off by one error in rank #4610

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

Merged
merged 3 commits into from
Jul 16, 2025
Merged

fix an off by one error in rank #4610

merged 3 commits into from
Jul 16, 2025

Conversation

jcupitt
Copy link
Member

@jcupitt jcupitt commented Jul 16, 2025

only there for three years sigh

see #4609

only there for three years sigh

see #4609
*/
const int next = bands * rank->width;
Copy link
Member Author

@jcupitt jcupitt Jul 16, 2025

Choose a reason for hiding this comment

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

this is the fix, it was bands * (rank->width - 1)

@jcupitt
Copy link
Member Author

jcupitt commented Jul 16, 2025

I reformatted to our more modern style, which make the fix hard to spot, but see the comment above.

The error only really shows when running large rank filters on binary images, so maybe the three year discovery time is not so bad.

I checked vips_hist_local() (also has a rolling histogram) and it's fine.

jcupitt added 2 commits July 16, 2025 05:10
I'd left the demand hint for rank as smalltile from some debugging. I've
set the whole of morphology to sequential mode, which should be safe,
cf. the convolution base class.
@kleisauke
Copy link
Member

Was 8.17 intentionally used as the base branch? It looks like we should drop commit cc61cb2 and merge this directly into master via the CLI instead.

@jcupitt jcupitt merged commit 62a8564 into master Jul 16, 2025
12 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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy