wai-rs: jpegai_icci — the Haar wavelet domain of the eICCI post-filter #13

Merged
dcharlot merged 1 commit from feat/jpegai-dwt into main 2026-07-15 03:26:53 -04:00
Owner

First piece of eICCI, the last unported JPEG-AI decode stage. Its CNN operates in a wavelet domain rather than on pixels; this lands that transform.

A Haar wavelet on 2x2 blocks with 1/2 scaling, two levels: [1,H,W] → [4,H/2,W/2] → [16,H/4,W/4]. Stacking the three planes gives the 48 channels the network first conv consumes.

LL= a+b+c+d ; HL=-a-b+c+d ; LH=-a+b-c+d ; HH= a-b-c+d   (a..d pre-scaled by 1/2)

Perfect reconstruction: LL-HL-LH+HH = 4a, so the inverse recovers each sample exactly. Channel layout matches the reference cat order.

Unit tests: hand-checked 2x2 block, idwt∘dwt = id, two-level round-trip + 16-band shape, and the 48-channel stack.

First piece of **eICCI**, the last unported JPEG-AI decode stage. Its CNN operates in a wavelet domain rather than on pixels; this lands that transform. A Haar wavelet on 2x2 blocks with 1/2 scaling, two levels: `[1,H,W]` → `[4,H/2,W/2]` → `[16,H/4,W/4]`. Stacking the three planes gives the **48 channels** the network first conv consumes. ``` LL= a+b+c+d ; HL=-a-b+c+d ; LH=-a+b-c+d ; HH= a-b-c+d (a..d pre-scaled by 1/2) ``` Perfect reconstruction: `LL-HL-LH+HH = 4a`, so the inverse recovers each sample exactly. Channel layout matches the reference cat order. Unit tests: hand-checked 2x2 block, `idwt∘dwt = id`, two-level round-trip + 16-band shape, and the 48-channel stack.
First piece of eICCI, the last unported JPEG-AI decode stage. eICCI's CNN operates in
a wavelet domain rather than on pixels; this lands that transform.

A Haar wavelet on 2x2 blocks with 1/2 scaling, applied two levels: a plane [1,H,W]
becomes [4,H/2,W/2] then [16,H/4,W/4]. Stacking the three planes' subbands gives the
48 channels the network's first convolution consumes (cat(Y16,U16,V16)).

  LL =  a+b+c+d    (all pre-scaled by 1/2)
  HL = -a-b+c+d
  LH = -a+b-c+d
  HH =  a-b-c+d

Perfect reconstruction: LL-HL-LH+HH = 4a, so the inverse recovers each sample exactly.
Channel layout matches the reference cat order — one level emits [LL,HL,LH,HH]; two
levels emit x16[i*4..i*4+4] = the level-2 decomposition of level-1 band i.

Unit tests: hand-checked single 2x2 block, idwt.dwt = id, two-level round-trip with the
16-band shape, and the 48-channel plane stack.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Transaction-Science/open-standards!13
No description provided.