Skip to content

Take the jpeg2000 release that holds one buffer a component - #97

Merged
tannevaled merged 1 commit into
mainfrom
bump-jpeg2000-v0120
Sep 29, 2026
Merged

tannevaled merged 1 commit into
mainfrom
bump-jpeg2000-v0120

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

go-images/jpeg2000 v0.12.0 dequantizes, synthesizes and converts the 9/7
coefficients in one buffer a component, where it held a float32 plane and
an int32 plane of the same size beside each other. That is the reference’s own
arrangement: OpenJPEG gives a tile-component a single OPJ_INT32* (tcd.h),
casts it to OPJ_FLOAT32* for the 9/7 synthesis (dwt.c), and converts in
place (tcd.c).

Decoding one codestream and nothing else, minimum of three:

v0.11.1 v0.12.0
grey, 46.3 Mpx 563 MB 397 MB
colour, 31.6 Mpx 986 MB 638 MB

Over four releases the decoder has gone from 19.8 to 8.6 bytes a pixel on a
grey page and 76.4 to 20.2 on a colour one.

Nothing in this repository changes. All 3215 documents of the measured
corpus render byte-identically (0 different, 66 drawn by neither, population
floor 3000), rendered by exactly this pair, and the module in the cache was
diffed against the tree that was proved. The jpeg2000 suite is clean under
-race, which matters because the shared buffer is written by parallel EBCOT
workers.

Speed is not claimed: glpi-agent was at 94% of a core throughout, and a timing
taken under that describes the agent.

🤖 Generated with Claude Code

v0.12.0 dequantizes, synthesizes and converts the 9/7 coefficients in ONE
buffer a component, where it held a float32 plane and an int32 plane of the
same size beside each other. That is the reference's own arrangement: OpenJPEG
gives a tile-component a single OPJ_INT32*, casts it to OPJ_FLOAT32* for the
9/7 synthesis, and converts in place.

Decoding one codestream alone, peak RSS: a 5868x7885 grey scan 563 -> 397 MB, a
4559x6942 colour one 986 -> 638 MB. Over four releases the decoder has gone from
19.8 to 8.6 bytes a pixel on a grey page and 76.4 to 20.2 on a colour one.

Nothing here changes: all 3215 documents of the measured corpus render
byte-identically, rendered by exactly this pair.
@tannevaled
tannevaled merged commit ef76c1b into main Sep 29, 2026
9 checks passed
@tannevaled
tannevaled deleted the bump-jpeg2000-v0120 branch September 29, 2026 07:08
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