decomp(jpeg): improve RGBA422 declaration order to 88.06% #1080

Merged
coah80 merged 1 commits from agent/bittle/rgba422-final into main 2026-10-03 08:22:25 +00:00
coah80 commented 2026-10-03 08:21:55 +00:00 (Migrated from github.com)

Scope

Only reorders existing uninitialized leading locals in TMCJPEGDEC_converterYUV422toRGBA8. No expressions, initializers, types, scopes, helpers, data or linking changes. Honest partial improvement, not exact.

Independent parent verification on f3f295c6

  • Function fuzzy: 87.72298% → 88.060814%; unit: 90.40206% → 90.43238%
  • 148/148 instructions, raw differences 84 → 80
  • All 12 sibling instruction streams unchanged; 2/13 exact and 660 matched code bytes preserved
  • Full report comparison has no regressions and only this function improves
  • All 1027 allocated objects compared: only this unit's text changes; all 24 relocations and nontext data unchanged
  • Parent separately rebuilt and reran the independent scalar 4:2:2 pixel model against original/current-main/candidate objects: 10,013 vectors, 30,039 executions, including 6,400 saturation vectors and 3,165 contained aligned input/output overlaps. All 148 instructions covered in each object, output and guard checks pass. Bounded machine-level interpreter checks, not a formal proof or Wii hardware test
  • Worker additionally reran the repository's 9,456-case differential audit
  • Pool empty and identical; literal audit 12 functions / 0 arguments, no candidates/errors; pre-existing unequal-size setter skipped
  • Full 43U all_source/progress/report/ok, worktree and diff gates pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d

Bounded search evidence

The current expression context differs from the old capped search by two later retained OR tests; these expressions remain unchanged here. One unchanged official declsearch run on lines 368–391 hit its 1000-evaluation cap after (10,84) → (10,81) → (10,80). The validated candidate was committed before one separately authorized continuation. That continuation naturally stopped after 783 evaluations: baseline plus all 782 immediate swap/move neighbors, no improvement. This is a local fixed point for the tool comparator, not global/permutation-space exhaustion. The 1783 total evaluations across both runs are not claimed to be unique across runs. No further search.

Final candidate object SHA256 aed45d927441d5b370678d4543249760a7ef00ee21cb59d54245e72c4f60b598 remains byte-identical to independently tested candidate. Uploaded tree a2b217c3cb equals tested tree. Detailed evidence and limitations in attempts log. No merge or auto-merge requested.

Note

Reorder declarations in TMCJPEGDEC_converterYUV422toRGBA8 to 88.06%

Reorders the declarations of the tile-row and tile-width local variables in TMCJPEGDEC_converterYUV422toRGBA8 to improve the decompilation match to 88.06%. No executable code, types, or control flow changed.

Macroscope summarized 9162c0b.

## Scope Only reorders existing uninitialized leading locals in TMCJPEGDEC_converterYUV422toRGBA8. No expressions, initializers, types, scopes, helpers, data or linking changes. Honest partial improvement, not exact. ## Independent parent verification on f3f295c6 - Function fuzzy: 87.72298% → 88.060814%; unit: 90.40206% → 90.43238% - 148/148 instructions, raw differences 84 → 80 - All 12 sibling instruction streams unchanged; 2/13 exact and 660 matched code bytes preserved - Full report comparison has no regressions and only this function improves - All 1027 allocated objects compared: only this unit's text changes; all 24 relocations and nontext data unchanged - Parent separately rebuilt and reran the independent scalar 4:2:2 pixel model against original/current-main/candidate objects: 10,013 vectors, 30,039 executions, including 6,400 saturation vectors and 3,165 contained aligned input/output overlaps. All 148 instructions covered in each object, output and guard checks pass. Bounded machine-level interpreter checks, not a formal proof or Wii hardware test - Worker additionally reran the repository's 9,456-case differential audit - Pool empty and identical; literal audit 12 functions / 0 arguments, no candidates/errors; pre-existing unequal-size setter skipped - Full 43U all_source/progress/report/ok, worktree and diff gates pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d ## Bounded search evidence The current expression context differs from the old capped search by two later retained OR tests; these expressions remain unchanged here. One unchanged official declsearch run on lines 368–391 hit its 1000-evaluation cap after (10,84) → (10,81) → (10,80). The validated candidate was committed before one separately authorized continuation. That continuation naturally stopped after 783 evaluations: baseline plus all 782 immediate swap/move neighbors, no improvement. This is a local fixed point for the tool comparator, not global/permutation-space exhaustion. The 1783 total evaluations across both runs are not claimed to be unique across runs. No further search. Final candidate object SHA256 aed45d927441d5b370678d4543249760a7ef00ee21cb59d54245e72c4f60b598 remains byte-identical to independently tested candidate. Uploaded tree a2b217c3cbf9f5198e32c9a4a5cad00385829876 equals tested tree. Detailed evidence and limitations in attempts log. 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_converterYUV422toRGBA8` to 88.06% > Reorders the declarations of the tile-row and tile-width local variables in `TMCJPEGDEC_converterYUV422toRGBA8` to improve the decompilation match to 88.06%. No executable code, types, or control flow changed. > > - Adds a declaration-order search report in [rgba422-declaration-context.attempts.md](https://github.com/coah80/wii-ipl/pull/1080/files#diff-60c58f5f596ca1e8ec553f355b1581d92f9c49be051591cf9d2d7aa25cad269d) documenting the candidate, build verification, and differential audits. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 9162c0b.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 08:22:23 +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.