Skip to content

Request for comment: add support for compressor/decompressor-specific init/destroy#2128

Closed
palemieux wants to merge 2 commits into
AcademySoftwareFoundation:mainfrom
sandflow:rd/improve-compressor-api
Closed

Request for comment: add support for compressor/decompressor-specific init/destroy#2128
palemieux wants to merge 2 commits into
AcademySoftwareFoundation:mainfrom
sandflow:rd/improve-compressor-api

Conversation

@palemieux

Copy link
Copy Markdown
Collaborator

WIP

Problem

The current C API does not allow compressors and decompressors to allocate/destroy internal resources that can be reused across calls on a given image, beyond very specific memory buffers (through calls to internal_encode_alloc_buffer()).

Solution

Add a per-pipeline and user-configurable initialization and teardown functions:

  • decompress_init_fn
  • decompress_destroy_fn
  • compress_init_fn
  • compress_destroy_fn

These functions are initialized to default in exr_decoding_choose_default_routines().

These functions are called in exr_decoding_initialize(), exr_decoding_destroy(), exr_encoding_initialize() and exr_encoding_destroy().

Add support for compressor init/destroy
@kthurston

Copy link
Copy Markdown
Contributor

@palemieux - sorry, am traveling so only looking at this in the web UI which is not my fave - I think I'd prefer this is done a bit differently, I will have a look and submit an alternative if so when I get home - could be I am just misreading your WIP.

@cary-ilm

Copy link
Copy Markdown
Member

@palemieux and @kdt3rd, is this addressed by #2440?

@palemieux

Copy link
Copy Markdown
Collaborator Author

@cary-ilm Yes #2440 supersedes this.

@cary-ilm cary-ilm closed this Jun 12, 2026
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.

3 participants