Skip to content

Make DeepData more safe for huge images where pixels() could overflow an int#2363

Merged
lgritz merged 3 commits into
AcademySoftwareFoundation:masterfrom
lgritz:lg-bigdeep
Oct 16, 2019
Merged

Make DeepData more safe for huge images where pixels() could overflow an int#2363
lgritz merged 3 commits into
AcademySoftwareFoundation:masterfrom
lgritz:lg-bigdeep

Conversation

@lgritz

@lgritz lgritz commented Oct 12, 2019

Copy link
Copy Markdown
Collaborator

No description provided.

@lgritz lgritz force-pushed the lg-bigdeep branch 2 times, most recently from 83f2b82 to 2754d29 Compare October 15, 2019 17:11
@lgritz lgritz merged commit d68ef4d into AcademySoftwareFoundation:master Oct 16, 2019
@lgritz lgritz deleted the lg-bigdeep branch October 16, 2019 23:41
luna-y-kim added a commit to luna-y-kim/OpenImageIO that referenced this pull request Jun 17, 2026
…ixel to int64_t

- Fix sort() using the front Z channel instead of Zback channel.
- Widen pixel indices from int to int64_t (leftover from AcademySoftwareFoundation#2363).
- Cleanup unreachable branches in merge_overlaps().

Signed-off-by: Luna Kim <177369799+luna-y-kim@users.noreply.github.com>
luna-y-kim added a commit to luna-y-kim/OpenImageIO that referenced this pull request Jun 17, 2026
…nt64_t

- Fix sort() using the front Z channel instead of Zback channel.
- Widen pixel indices from int to int64_t (leftover from AcademySoftwareFoundation#2363).
- Cleanup unreachable branches in merge_overlaps().

Signed-off-by: Luna Kim <177369799+luna-y-kim@users.noreply.github.com>
luna-y-kim added a commit to luna-y-kim/OpenImageIO that referenced this pull request Jun 17, 2026
…nt64_t

- Fix sort() using the front Z channel instead of Zback channel.
- Widen pixel indices from int to int64_t (leftover from AcademySoftwareFoundation#2363).
- Cleanup unreachable branches in merge_overlaps().

Signed-off-by: Luna Kim <177369799+luna-y-kim@users.noreply.github.com>
luna-y-kim added a commit to luna-y-kim/OpenImageIO that referenced this pull request Jun 18, 2026
…nt64_t

- Fix sort() using the front Z channel instead of Zback channel.
- Widen pixel indices from int to int64_t (leftover from AcademySoftwareFoundation#2363).
- Cleanup unreachable branches in merge_overlaps().

Signed-off-by: Luna Kim <177369799+luna-y-kim@users.noreply.github.com>
luna-y-kim added a commit to luna-y-kim/OpenImageIO that referenced this pull request Jun 21, 2026
Widen the srcpixel param of DeepData::merge_deep_pixels from int to int64_t.
This breaks ABI, hence the `!` mark.
Follow-up to AcademySoftwareFoundation#2363
Fixes AcademySoftwareFoundation#5242

Signed-off-by: Luna Kim <177369799+luna-y-kim@users.noreply.github.com>
luna-y-kim added a commit to luna-y-kim/OpenImageIO that referenced this pull request Jun 23, 2026
…nt64_t

- Fix sort(), incorrectly using the front Z channel instead of Zback channel.
- Widen pixel indices from int to int64_t (internal only, follow-up to AcademySoftwareFoundation#2363).
- Cleanup unreachable branches in merge_overlaps().

Signed-off-by: Luna Kim <177369799+luna-y-kim@users.noreply.github.com>
lgritz pushed a commit that referenced this pull request Jun 23, 2026
…nt64_t (#5241)

- Fix sort(), incorrectly using the front Z channel in a place where it should have instead used Zback channel.
- Widen pixel indices from int to int64_t (internal only, follow-up to #2363).
- Cleanup unreachable branches in merge_overlaps().

Modified the `DeepData::sort` test to include samples with a tied front
Z, so it verifies the Zback fallback.

Signed-off-by: Luna Kim <177369799+luna-y-kim@users.noreply.github.com>
lgritz pushed a commit to luna-y-kim/OpenImageIO that referenced this pull request Jun 23, 2026
To avoid breaking ABI, the old int overload is kept, but its declaration
is hidden behind `#ifdef OIIO_INTERNAL`. Downstream code only sees
the int64_t version, but old binaries still work. The forwarding wrapper
handles it until the next first-digit version changes.

Also, Python binding is adjusted using a wrapper to resolve the
overload ambiguity.

Follow-up to AcademySoftwareFoundation#2363
Fixes AcademySoftwareFoundation#5242

Signed-off-by: Luna Kim <177369799+luna-y-kim@users.noreply.github.com>
lgritz pushed a commit that referenced this pull request Jun 23, 2026
To avoid breaking ABI, the old int overload is kept, but its declaration
is hidden behind `#ifdef OIIO_INTERNAL`. Downstream code only sees the
int64_t version, but old binaries still work. The forwarding wrapper
handles it until the next first-digit version changes.

Also, the Python binding is adjusted using a wrapper to resolve the
overload ambiguity. While adding the wrapper, I noticed other bindings
still took `int pixel`, so widened them to `int64_t` for consistency.

Follow-up to #2363
Fixes #5242

Signed-off-by: Luna Kim <177369799+luna-y-kim@users.noreply.github.com>
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Jul 1, 2026
…nt64_t (AcademySoftwareFoundation#5241)

- Fix sort(), incorrectly using the front Z channel in a place where it should have instead used Zback channel.
- Widen pixel indices from int to int64_t (internal only, follow-up to AcademySoftwareFoundation#2363).
- Cleanup unreachable branches in merge_overlaps().

Modified the `DeepData::sort` test to include samples with a tied front
Z, so it verifies the Zback fallback.

Signed-off-by: Luna Kim <177369799+luna-y-kim@users.noreply.github.com>
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Jul 1, 2026
…ftwareFoundation#5252)

To avoid breaking ABI, the old int overload is kept, but its declaration
is hidden behind `#ifdef OIIO_INTERNAL`. Downstream code only sees the
int64_t version, but old binaries still work. The forwarding wrapper
handles it until the next first-digit version changes.

Also, the Python binding is adjusted using a wrapper to resolve the
overload ambiguity. While adding the wrapper, I noticed other bindings
still took `int pixel`, so widened them to `int64_t` for consistency.

Follow-up to AcademySoftwareFoundation#2363
Fixes AcademySoftwareFoundation#5242

Signed-off-by: Luna Kim <177369799+luna-y-kim@users.noreply.github.com>
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.

1 participant