Skip to content

htj2k: Check for duplication file_index values when reading file header#2516

Open
palemieux wants to merge 2 commits into
AcademySoftwareFoundation:mainfrom
sandflow:issues/check-duplicate-file-index-values
Open

htj2k: Check for duplication file_index values when reading file header#2516
palemieux wants to merge 2 commits into
AcademySoftwareFoundation:mainfrom
sandflow:issues/check-duplicate-file-index-values

Conversation

@palemieux

Copy link
Copy Markdown
Collaborator

Replaces #2515

Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>

@kdt3rd kdt3rd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd really like to continue to try to move towards avoiding short lifetime heap allocations, and get back to the idea that the core library allows you to replace the memory allocator, replace the readers / writers, and you can make an embedded version of the core library work without going through the entire library (i.e. so someone could just use the exr library on an embedded device like a camera - we're not there yet, but it is a decent design goal, and makes the library a better citizen in the massively multi-threaded world we live in)


map.resize (header.pull_uint16 ());
map.resize (header.pull_uint16 (), {-1, 0});
std::unordered_set<int> seen(map.size());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we do this without extra memory allocs every chunk read (see my comment on 2515)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It is possible but will result in less maintainable and less readable code. Is this the right tradeoff? If yes, I am happy to implement it.

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