Improve RGB565422 using official fuzzy scores #1116

Merged
coah80 merged 1 commits from agent/bittle/rgb422-official-fuzzy into main 2026-10-03 16:08:42 +00:00
coah80 commented 2026-10-03 16:08:10 +00:00 (Migrated from github.com)

Scope and result

43U only. Swap existing lumaSkip/output declarations in normal TMCJPEGDEC_converterYUV422toRGB565. Types, assignments, expressions, scope and all other source bytes are unchanged.

  • Function: 96.69118% → 96.76471%; unit: 96.91203% → 96.9185%
  • 136 instructions unchanged; structural/positional proxy worsens (0,58) → (0,59), but official fuzzy improves
  • Twelve sibling bodies and seven exact functions preserved; exact code2648/6184, all data/link metrics unchanged
  • Global fuzzy on rebased main:99.73174% →99.73176%. External #1115's new exact keyboard function is preserved; this PR adds no exact match.

Independent verification

Parent rebuilt full default43U and explicit ok, then rebased and rebuilt on 0fa58cf361 after external #1115. All1027 current-main objects/reports checked: only owned object/unit changes; no function/exact/code/data/link regressions. Candidate object equals frozen snapshot0066. Tested tree3e4466de6e5e7e0d13a077f00dc769130a5fc94c.

Independently regenerated all716 official scores and verified exact fixed-order enumeration: baseline plus715 neighbors. Two strict gains,178ties including baseline,536losses; unique highest0066 selected. Every snapshot preserves all file bytes outside the target function, section headers, relocation vectors and sibling bodies. These function orders repeat historical proxy-only closure; old per-order artifacts were lost, so no novelty claim. Winner coverage5/715, not a new fixed point.

Sequential pixel/alias oracle independently passes18283vectors/54849executions, including9867contained aliases and all136instructions, with preserved ABI. Full JPEG suite9456paired cases passes. These are bounded interpreter diagnostics under stated input bounds, not formal equivalence or Wii hardware tests.

Pool identical/empty; literal audit12functions without candidates/errors, unchanged unequal-sized setter skipped. DOL SHA1:26116613f624061ba99c8d1a299aaa6efa85670d. Worktree/diff checks pass. Full CSV/log committed; original executable artifacts stay local. No merge performed or requested.

Note

Apply official fuzzy-scored declaration order to RGB565 YUV422 converter

Reorders two local declarations in TMCJPEGDEC_converterYUV422toRGB565 in Texture_MCUtoRGB565.c so the output pointer now precedes the luma-skip integer. The order matches the best official fuzzy score from a bounded declaration-order search.

  • Adds audit documentation and a results CSV in tools/decomp-assist covering the search, fuzzy-score selection, validation checks, hashes, and final pass status.

Macroscope summarized f9e634f.

## Scope and result 43U only. Swap existing lumaSkip/output declarations in normal TMCJPEGDEC_converterYUV422toRGB565. Types, assignments, expressions, scope and all other source bytes are unchanged. - Function: 96.69118% → 96.76471%; unit: 96.91203% → 96.9185% - 136 instructions unchanged; structural/positional proxy worsens (0,58) → (0,59), but official fuzzy improves - Twelve sibling bodies and seven exact functions preserved; exact code2648/6184, all data/link metrics unchanged - Global fuzzy on rebased main:99.73174% →99.73176%. External #1115's new exact keyboard function is preserved; this PR adds no exact match. ## Independent verification Parent rebuilt full default43U and explicit ok, then rebased and rebuilt on 0fa58cf361f482f61e3db0acf78c4ad66d01fe7b after external #1115. All1027 current-main objects/reports checked: only owned object/unit changes; no function/exact/code/data/link regressions. Candidate object equals frozen snapshot0066. Tested tree3e4466de6e5e7e0d13a077f00dc769130a5fc94c. Independently regenerated all716 official scores and verified exact fixed-order enumeration: baseline plus715 neighbors. Two strict gains,178ties including baseline,536losses; unique highest0066 selected. Every snapshot preserves all file bytes outside the target function, section headers, relocation vectors and sibling bodies. These function orders repeat historical proxy-only closure; old per-order artifacts were lost, so no novelty claim. Winner coverage5/715, not a new fixed point. Sequential pixel/alias oracle independently passes18283vectors/54849executions, including9867contained aliases and all136instructions, with preserved ABI. Full JPEG suite9456paired cases passes. These are bounded interpreter diagnostics under stated input bounds, not formal equivalence or Wii hardware tests. Pool identical/empty; literal audit12functions without candidates/errors, unchanged unequal-sized setter skipped. DOL SHA1:26116613f624061ba99c8d1a299aaa6efa85670d. Worktree/diff checks pass. Full CSV/log committed; original executable artifacts stay local. No merge performed or 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] > ### Apply official fuzzy-scored declaration order to RGB565 YUV422 converter > Reorders two local declarations in `TMCJPEGDEC_converterYUV422toRGB565` in [Texture_MCUtoRGB565.c](https://github.com/coah80/wii-ipl/pull/1116/files#diff-5c9e5cd4d235724c9e4882611e36ba794e9821ede7e7396a48272a942676ee86) so the output pointer now precedes the luma-skip integer. The order matches the best official fuzzy score from a bounded declaration-order search. > - Adds audit documentation and a results CSV in [tools/decomp-assist](https://github.com/coah80/wii-ipl/pull/1116/files#diff-8a3653c1c2bcb3cc12bc860c28004192a5a278bf8f804beef70d1f07ddd79039) covering the search, fuzzy-score selection, validation checks, hashes, and final pass status. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized f9e634f.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 16:08:40 +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.