decomp(jpeg): improve RGB565420 declaration order to 95.18% #1081

Merged
coah80 merged 1 commits from agent/bittle/rgb420-final into main 2026-10-03 08:40:44 +00:00
coah80 commented 2026-10-03 08:39:12 +00:00 (Migrated from github.com)

Scope

Reorders only the 24 existing uninitialized leading declarations of TMCJPEGDEC_converterYUV420toRGB565. Initializers, expressions, types, scopes, helpers and linking remain unchanged. Honest partial improvement, not exact.

Independent parent verification on dc3eede8

  • Function fuzzy 94.60993% → 95.17731%; unit 96.753555% → 96.805305%
  • 141/141 instructions; all 12 sibling instruction streams unchanged
  • Seven exact functions, 2648 matched code bytes and empty data preserved
  • Full 1027-unit report comparison: only this function improves, no regressions; merged RGBA422 improvement explicitly preserved
  • All allocated objects compared: only owned text changes, all 24 relocations and nontext data unchanged
  • Parent freshly rebuilt and reran independent original/current-main/candidate pixel model: 7,280 vectors / 21,840 executions, including 6,400 saturation vectors and 432 contained aligned input/output overlaps. All 141 instructions covered in each object; outputs/guards pass. Bounded interpreter tests, not a formal proof or Wii runtime test
  • Worker additionally passed 9,456-case repository differential audit
  • Pool empty/identical; literal audit 12 functions / 0 arguments, no candidates/errors; pre-existing unequal-size setter skipped
  • Full default progress build plus all_source/report/ok, worktree and diff gates pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d

One unchanged official run hit its 1000-evaluation cap after (6,86) → (6,84) → (6,81). The validated candidate was committed, rebased and freshly rebuilt before one separately authorized continuation. That run stopped naturally after 783 evaluations: baseline plus all 782 immediate swap/move neighbors, no improvement. Local fixed point applies to the tool comparator, not all permutations or plateau paths. No further run.

The evidence log explicitly corrects an interim worker report that had retained an older unrelated NonMatching RGBA object. A default full progress rebuild superseded it; the owned RGB565 object and pixel evidence were unchanged. Parent independently used current main and confirmed all 1027 units.

Uploaded tree 081b906a74 equals tested tree. No merge or auto-merge requested.

Note

Reorder declarations in TMCJPEGDEC_converterYUV420toRGB565 to 95.18% decomp match

  • Reorders the 24 local scalar and pointer declarations in TMCJPEGDEC_converterYUV420toRGB565 in Texture_MCUtoRGB565.c to match the original binary, reaching 95.18%. No executable code, types, or control flow change.
  • Adds allhands-jpeg-rgb420-declarations.attempts.md, which records the search process, score trajectory, build and differential-test results, and handoff status.

Macroscope summarized e849d0f.

## Scope Reorders only the 24 existing uninitialized leading declarations of TMCJPEGDEC_converterYUV420toRGB565. Initializers, expressions, types, scopes, helpers and linking remain unchanged. Honest partial improvement, not exact. ## Independent parent verification on dc3eede8 - Function fuzzy 94.60993% → 95.17731%; unit 96.753555% → 96.805305% - 141/141 instructions; all 12 sibling instruction streams unchanged - Seven exact functions, 2648 matched code bytes and empty data preserved - Full 1027-unit report comparison: only this function improves, no regressions; merged RGBA422 improvement explicitly preserved - All allocated objects compared: only owned text changes, all 24 relocations and nontext data unchanged - Parent freshly rebuilt and reran independent original/current-main/candidate pixel model: 7,280 vectors / 21,840 executions, including 6,400 saturation vectors and 432 contained aligned input/output overlaps. All 141 instructions covered in each object; outputs/guards pass. Bounded interpreter tests, not a formal proof or Wii runtime test - Worker additionally passed 9,456-case repository differential audit - Pool empty/identical; literal audit 12 functions / 0 arguments, no candidates/errors; pre-existing unequal-size setter skipped - Full default progress build plus all_source/report/ok, worktree and diff gates pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d ## Bounded search One unchanged official run hit its 1000-evaluation cap after (6,86) → (6,84) → (6,81). The validated candidate was committed, rebased and freshly rebuilt before one separately authorized continuation. That run stopped naturally after 783 evaluations: baseline plus all 782 immediate swap/move neighbors, no improvement. Local fixed point applies to the tool comparator, not all permutations or plateau paths. No further run. The evidence log explicitly corrects an interim worker report that had retained an older unrelated NonMatching RGBA object. A default full progress rebuild superseded it; the owned RGB565 object and pixel evidence were unchanged. Parent independently used current main and confirmed all 1027 units. Uploaded tree 081b906a74928cecb24b5c778478afbb04a2a03d equals tested tree. 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 declarations in `TMCJPEGDEC_converterYUV420toRGB565` to 95.18% decomp match > - Reorders the 24 local scalar and pointer declarations in `TMCJPEGDEC_converterYUV420toRGB565` in [Texture_MCUtoRGB565.c](https://github.com/coah80/wii-ipl/pull/1081/files#diff-5c9e5cd4d235724c9e4882611e36ba794e9821ede7e7396a48272a942676ee86) to match the original binary, reaching 95.18%. No executable code, types, or control flow change. > - Adds [allhands-jpeg-rgb420-declarations.attempts.md](https://github.com/coah80/wii-ipl/pull/1081/files#diff-e2e8674476ef555c53a10f678f4694457871abe50e32fa232d46ebcdc06a818b), which records the search process, score trajectory, build and differential-test results, and handoff status. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized e849d0f.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 08:40:42 +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.