decomp(jpeg): refine RGB565411 width/luma allocation #1106

Merged
coah80 merged 1 commits from agent/bittle/rgb411-width-luma-order into main 2026-10-03 13:55:12 +00:00
coah80 commented 2026-10-03 13:54:40 +00:00 (Migrated from github.com)

Minimal declaration-only gain

Swap only existing uninitialized tileWidth/lumaSkip declarations in normal RGB565411. All other source bytes, types, scopes, initializers, assignments, operations and memory accesses are fixed.

  • Function: 91.129036% → 91.17512%
  • Unit: 96.88293% → 96.88939%
  • 217/217 instructions; positional differences142 → 141, structural21 unchanged
  • Twelve siblings, seven exact functions, code2648/6184, data and linking preserved
  • Aggregate displayed fuzzy can round away this small per-function gain

One fixed-center audit compiled baseline plus all782 unique neighbors,783 real builds and official scores. Parent independently reproduced every score/hash and the full neighbor set. Unique improving snapshot0118 is the minimal swap. Seven exact orders overlap prior manifests and reproduce their bytes/scores; older overlap is unknown. Only5/782 winner neighbors were observed, so no fixed-point claim.

Independent parent gates

Rebased and freshly rebuilt on c1b8318a1d. Tested tree68d1270de9a38ebf4b3f9441d7f1ceff57ff38b5.

  • All1,027 current-main reports/functions checked: no regressions; whole-object comparison changes only RGB
  • Sibling instruction/relocation streams and allocated non-code sections preserved
  • Sequential pixel reference:13,366 vectors/40,098 executions, including4,950 allocation-valid overlaps; full217-instruction coverage in candidate/original/baseline
  • JPEG differential suite:9,456 paired cases passes with ABI checks
  • Pool identical; literal audit12 functions, no errors, existing unequal-size setter skip preserved
  • Full default build/progress,43U/ok, main/leaf/diff checks pass
  • DOL SHA1:26116613f624061ba99c8d1a299aaa6efa85670d

Bounded reference/interpreter diagnostics are not formal proof or hardware execution. Evidence and complete scores: tools/decomp-assist/allhands-jpeg-rgb411-third-neighbors.attempts.md and results.csv. No original binaries/disassembly uploaded. Draft for human review; no merge or auto-merge requested.

Note

Reorder width/luma declarations in TMCJPEGDEC_converterYUV411toRGB565

Reorders two local variable declarations in Texture_MCUtoRGB565.c to match the original code. Types, assignments, and uses are unchanged. Also adds the decompilation audit report and results CSV in tools/decomp-assist documenting the candidate selection and validation for this change.

Macroscope summarized adb1b46.

## Minimal declaration-only gain Swap only existing uninitialized tileWidth/lumaSkip declarations in normal RGB565411. All other source bytes, types, scopes, initializers, assignments, operations and memory accesses are fixed. - Function: 91.129036% → 91.17512% - Unit: 96.88293% → 96.88939% - 217/217 instructions; positional differences142 → 141, structural21 unchanged - Twelve siblings, seven exact functions, code2648/6184, data and linking preserved - Aggregate displayed fuzzy can round away this small per-function gain One fixed-center audit compiled baseline plus all782 unique neighbors,783 real builds and official scores. Parent independently reproduced every score/hash and the full neighbor set. Unique improving snapshot0118 is the minimal swap. Seven exact orders overlap prior manifests and reproduce their bytes/scores; older overlap is unknown. Only5/782 winner neighbors were observed, so no fixed-point claim. ## Independent parent gates Rebased and freshly rebuilt on c1b8318a1d14145462f7add3c9415dace9b040bb. Tested tree68d1270de9a38ebf4b3f9441d7f1ceff57ff38b5. - All1,027 current-main reports/functions checked: no regressions; whole-object comparison changes only RGB - Sibling instruction/relocation streams and allocated non-code sections preserved - Sequential pixel reference:13,366 vectors/40,098 executions, including4,950 allocation-valid overlaps; full217-instruction coverage in candidate/original/baseline - JPEG differential suite:9,456 paired cases passes with ABI checks - Pool identical; literal audit12 functions, no errors, existing unequal-size setter skip preserved - Full default build/progress,43U/ok, main/leaf/diff checks pass - DOL SHA1:26116613f624061ba99c8d1a299aaa6efa85670d Bounded reference/interpreter diagnostics are not formal proof or hardware execution. Evidence and complete scores: tools/decomp-assist/allhands-jpeg-rgb411-third-neighbors.attempts.md and results.csv. No original binaries/disassembly uploaded. Draft for human review; no merge or auto-merge requested. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Reorder width/luma declarations in `TMCJPEGDEC_converterYUV411toRGB565` > Reorders two local variable declarations in [Texture_MCUtoRGB565.c](https://github.com/coah80/wii-ipl/pull/1106/files#diff-5c9e5cd4d235724c9e4882611e36ba794e9821ede7e7396a48272a942676ee86) to match the original code. Types, assignments, and uses are unchanged. Also adds the decompilation audit report and results CSV in `tools/decomp-assist` documenting the candidate selection and validation for this change. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized adb1b46.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 13:55:11 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.