decomp(jpeg): improve RGB565420 edge declaration order to 97.85% #1075

Merged
coah80 merged 1 commits from agent/bittle/jpeg-edge-final into main 2026-10-03 07:22:08 +00:00
coah80 commented 2026-10-03 07:20:52 +00:00 (Migrated from github.com)

Scope

Reorders only the 20 existing uninitialized leading locals in TMCJPEGDEC_converterYUV420toRGB565edge. No executable expressions, initializers, types, helpers, linking flags, or data changes. Honest partial improvement, not an exact match.

Independently verified on 84d0c74f

  • Function fuzzy: 95.570175% → 97.850876%; unit: 96.58538% → 96.753555%
  • 114/114 instructions; 35 raw differences remain
  • All 12 sibling instruction streams preserved; 7/13 exact and 2648/6184 matched code bytes unchanged
  • Full 43U all_source/report/DOL gate passes; SHA1 26116613f624061ba99c8d1a299aaa6efa85670d
  • Full report comparison: only this function's fuzzy improves; no exact/code/data regressions
  • Pool empty and unchanged; literal audit: 12 functions, 0 arguments, no candidates/errors; pre-existing unequal-size set_converterRGB565 skipped
  • Independent original/current-main/candidate PPC interpreter audit: 8,721 vectors, 26,163 object executions; 808 edge dimensions, 256 dimension branches, 6,400 saturation vectors, 1,257 aligned input/output overlaps. All 114 instructions covered in each object, all compared outputs and guards pass. Bounded machine-level tests, not formal equivalence or Wii runtime validation

Search evidence

Unmodified repository declsearch.py, restricted to the declaration block. Initial 32- and 533-evaluation capped runs improved the candidate. A final separately bounded run naturally stopped at 533 evaluations: baseline plus all 532 immediate swap/move neighbors, no improvement. This establishes a local fixed point for the tool's structural/positional comparator, not global optimality or exhaustion of all permutations. Details and reproduction commands in the attempts log.

Parent publication tree matches the locally tested tree exactly: 764d5d9ca2. No merge or auto-merge requested.

Note

Reorder local declarations in TMCJPEGDEC_converterYUV420toRGB565edge for 97.85% decomp match

Moves existing automatic declarations (including chromaSkip, crValue, cbValue, and tileWidth) within the edge converter function to match the original source ordering. No executable code changes.

Macroscope summarized bff74f4.

## Scope Reorders only the 20 existing uninitialized leading locals in TMCJPEGDEC_converterYUV420toRGB565edge. No executable expressions, initializers, types, helpers, linking flags, or data changes. Honest partial improvement, not an exact match. ## Independently verified on 84d0c74f - Function fuzzy: 95.570175% → 97.850876%; unit: 96.58538% → 96.753555% - 114/114 instructions; 35 raw differences remain - All 12 sibling instruction streams preserved; 7/13 exact and 2648/6184 matched code bytes unchanged - Full 43U all_source/report/DOL gate passes; SHA1 26116613f624061ba99c8d1a299aaa6efa85670d - Full report comparison: only this function's fuzzy improves; no exact/code/data regressions - Pool empty and unchanged; literal audit: 12 functions, 0 arguments, no candidates/errors; pre-existing unequal-size set_converterRGB565 skipped - Independent original/current-main/candidate PPC interpreter audit: 8,721 vectors, 26,163 object executions; 808 edge dimensions, 256 dimension branches, 6,400 saturation vectors, 1,257 aligned input/output overlaps. All 114 instructions covered in each object, all compared outputs and guards pass. Bounded machine-level tests, not formal equivalence or Wii runtime validation ## Search evidence Unmodified repository declsearch.py, restricted to the declaration block. Initial 32- and 533-evaluation capped runs improved the candidate. A final separately bounded run naturally stopped at 533 evaluations: baseline plus all 532 immediate swap/move neighbors, no improvement. This establishes a local fixed point for the tool's structural/positional comparator, not global optimality or exhaustion of all permutations. Details and reproduction commands in the attempts log. Parent publication tree matches the locally tested tree exactly: 764d5d9ca2c43064c75de2045a89d5830cd0971a. 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 local declarations in `TMCJPEGDEC_converterYUV420toRGB565edge` for 97.85% decomp match > Moves existing automatic declarations (including `chromaSkip`, `crValue`, `cbValue`, and `tileWidth`) within the edge converter function to match the original source ordering. No executable code changes. > - Adds a detailed record of the declaration-order search, including commands, fuzzy-match results, and coverage calculations, in [allhands-jpeg-edge-declaration-search.attempts.md](https://github.com/coah80/wii-ipl/pull/1075/files#diff-c432370b7ef590200e6bb06469969bc17514b55f89c7b1c45545a8aa3c4e1e6b) > - Behavioral Change: none — declaration order only; logic, arithmetic, and pointer stepping in [Texture_MCUtoRGB565.c](https://github.com/coah80/wii-ipl/pull/1075/files#diff-5c9e5cd4d235724c9e4882611e36ba794e9821ede7e7396a48272a942676ee86) are unchanged > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized bff74f4.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 07:22:06 +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.