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

Optimize sampling for empty images #2342

Merged
merged 2 commits into from
Oct 12, 2024
Merged

Optimize sampling for empty images #2342

merged 2 commits into from
Oct 12, 2024

Commits on Oct 11, 2024

  1. Optimize sampling for empty images

    This is a tip of an iceberg of better sampling, but the most critical
    case. Up-sampling in general may in the implementation allocate a larger
    temporary buffer than its input. Of course this makes little semantic
    sense here: after all, the actual information can not increase by this.
    
    If one dimension increases while the other decreases the unfortunate
    consequence is that callers may somewhat reasonably expect a small
    buffer but internally will get a very large buffer. The approach of
    swapping sampling orders accordingly (first down, then up) might address
    the memory issue but is lossy.
    
    So instead let's fix the most pressing issue: if no information was
    present in the input, nothing can be lost and we can pretend to perform
    everything by a very small intermediate image.
    HeroicKatora committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    15b6e87 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2024

  1. Configuration menu
    Copy the full SHA
    e62349b View commit details
    Browse the repository at this point in the history