decomp(jpeg): refine RGB565420 green/stride allocation #1109

Merged
coah80 merged 1 commits from agent/bittle/rgb420-green-stride-order into main 2026-10-03 14:47:09 +00:00
coah80 commented 2026-10-03 14:45:50 +00:00 (Migrated from github.com)

Minimal declaration-only gain

Swap only existing uninitialized greenOffset/lumaSkip declarations in normal RGB565420. All other source bytes, types, scopes, initializers, expressions and memory accesses stay fixed; closed411 and edge siblings are unchanged.

  • Function:95.17731% → 95.28369%,141/141 instructions
  • Unit:96.88939% → 96.89909%
  • Structural/positional score stays(6,81)
  • Seven exact functions, code2648/6184, data and linking preserved

One fixed-center audit compiled baseline plus all782 neighbors,783 real builds and official scores. All orders deliberately repeat historical structural-ranked coverage to obtain missing official scores. Parent independently reproduced all reports/hashes and the complete set. Best0251 is the minimal swap; only5/782 winner neighbors were observed, so no fixed-point claim.

Independent parent gates

Rebased and freshly rebuilt on d124cf0530. Tested tree86e07bfc1c57660057a15eb789114f3df88c93fb.

  • All1,027 current-main reports/functions checked: no regressions; whole-object comparison changes only RGB
  • Twelve sibling bodies, allocated non-code data/relocations and exact/link measures preserved
  • Sequential pixel reference:15,260 vectors/45,780 executions, including7,068 contained halfword aliases;141/141 instruction coverage in candidate/original/baseline
  • Reference preserves paired chroma observation, evolving-memory luminance reads and packed stores; all tested reads/writes remain in their allocations
  • 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-rgb420-fuzzy-neighbors.attempts.md and results.csv. No original binaries/disassembly uploaded. Draft for human review; no merge or auto-merge requested.

Note

Reorder greenOffset and lumaSkip declarations in RGB565420 converter

Swaps the declaration order of two local variables in TMCJPEGDEC_converterYUV420toRGB565. No runtime behavior changes.

Macroscope summarized 22535b6.

## Minimal declaration-only gain Swap only existing uninitialized greenOffset/lumaSkip declarations in normal RGB565420. All other source bytes, types, scopes, initializers, expressions and memory accesses stay fixed; closed411 and edge siblings are unchanged. - Function:95.17731% → 95.28369%,141/141 instructions - Unit:96.88939% → 96.89909% - Structural/positional score stays(6,81) - Seven exact functions, code2648/6184, data and linking preserved One fixed-center audit compiled baseline plus all782 neighbors,783 real builds and official scores. All orders deliberately repeat historical structural-ranked coverage to obtain missing official scores. Parent independently reproduced all reports/hashes and the complete set. Best0251 is the minimal swap; only5/782 winner neighbors were observed, so no fixed-point claim. ## Independent parent gates Rebased and freshly rebuilt on d124cf0530ecc04998f611c8a39c76c53f55982a. Tested tree86e07bfc1c57660057a15eb789114f3df88c93fb. - All1,027 current-main reports/functions checked: no regressions; whole-object comparison changes only RGB - Twelve sibling bodies, allocated non-code data/relocations and exact/link measures preserved - Sequential pixel reference:15,260 vectors/45,780 executions, including7,068 contained halfword aliases;141/141 instruction coverage in candidate/original/baseline - Reference preserves paired chroma observation, evolving-memory luminance reads and packed stores; all tested reads/writes remain in their allocations - 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-rgb420-fuzzy-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 `greenOffset` and `lumaSkip` declarations in RGB565420 converter > Swaps the declaration order of two local variables in `TMCJPEGDEC_converterYUV420toRGB565`. No runtime behavior changes. > > - The swap matches a decompilation audit in [allhands-jpeg-rgb420-fuzzy-neighbors.attempts.md](https://github.com/coah80/wii-ipl/pull/1109/files#diff-d88aae49c816282741e0917455fb5915b8fef997358e6afc9deffdd84ad0ff3e) and is supported by the results in [allhands-jpeg-rgb420-fuzzy-neighbors.results.csv](https://github.com/coah80/wii-ipl/pull/1109/files#diff-e41326893a1e4c05f472bbf6a25a8f408d07a438a715816f5572695557dd8de4) > - Behavioral Change: none — types, assignments, and uses are unchanged > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 22535b6.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 14:47:07 +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.