-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Document the internal image distinctness constraints #9752
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1663,6 +1663,12 @@ quantize2( | |
| return 0; | ||
| } | ||
|
|
||
| /** | ||
| * Quantize `im` down to at most `colors` palette entries, | ||
| * returning a newly allocated result. | ||
| * | ||
| * Contract: im is read-only. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, I don't see any
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here as above: this still documents the contract. Quantize was touched a bit in #9740, though not with |
||
| */ | ||
| Imaging | ||
| ImagingQuantize(Imaging im, int colors, int mode, int kmeans) { | ||
| int i, j; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this the contract? I expect that is how it is used, but I don't see any use of
restrictin here.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't get this far in the optimization series, looks like 😄
But this documents the contract nevertheless, that was never going to change with the series.
EDIT: See #10005. Turns out I had half-written optimizations but didn't push them before.