JP2Grok: let Grok handle jp2 box read/write#14268
Conversation
|
I'm skeptical about the added benefit vs maintenance overhead. Would you have done this PR without AI assistance? They are pretty good at cluttering code bases... |
I hear your point, I appreciate your rapid code reviews, and don't want to flood the project with PRs. My plan, which is now easier with AI help, is to shift as much functionality as possible away from the driver and into the codec. Since Grok is already parsing the metadata, it isn't efficient to have the driver duplicate this effort with a second parse. After this PR, and a second one to shift Box rewrite to the library, there won't be any more significant code churn on the driver. Just bug fixes as they show themselves. |
yes but that actually turns into more code being written... I'm a bit skeptical about the performance impact of doing the JP2 boxes analysis twice. Is that significant compared to actual JPEG2000 decompression... ? |
You're right, there is more code. The way I see it is:
And, as I said, there only a few more iterations needed on the code and then it will enter maintenance mode. |
8be9856 to
7589a1f
Compare
|
@rouault I have reworked the PR to minimize code changes - it still avoids reading the JP2 header twice in the JP2Grok driver. |
|
Thanks for the reviews and merge! |
What does this PR do?
The current JP2Grok driver handles read, write and rewrite of JP2 boxes. This PR allows Grok to handle read
and write (not re-write), as it is more efficient to let the codec itself manage the boxes.
No new unit tests have been added as the existing ones will test these changes.
AI tool usage
Tasklist