decomp(jpeg): refine RGBA411 output allocation #1102

Merged
coah80 merged 1 commits from agent/bittle/rgba411-output-order into main 2026-10-03 13:04:33 +00:00
coah80 commented 2026-10-03 13:03:34 +00:00 (Migrated from github.com)

Minimal declaration-only gain

Swap only existing uninitialized output/greenOffset declarations in the normal RGBA411 converter. All expressions, types, scopes, initializers, assignments, memory accesses and siblings remain fixed.

  • RGBA411 normal: 82.6033% → 82.70661%, 242/242 instructions
  • Unit: 90.59006% → 90.60522%
  • All twelve sibling bodies and both exact functions preserved
  • Exact/code/data/link totals unchanged; this is a fuzzy-only gain

One fixed-center audit compiled baseline plus all 852 unique swap/move neighbors, 853 real compilations. Every immutable snapshot was officially scored without structural filtering. Parent independently reproduced all official reports, source/object hashes and the complete neighbor set. Retained first best0243 is the minimal swap. Historical capped proxy-ranked coverage is disclosed; no novelty or new-winner fixed-point claim.

Independent parent verification

Fresh build on 17e497e06d. Tested tree be22ba7e61.

  • All 1,027 unit/function reports checked: no regressions, only target improves
  • Sibling code, allocated non-code data/relocations and exact/link measures preserved
  • Separate sequential pixel reference: 11,245 vectors / 33,735 object executions, including 2,829 allocation-valid input/output overlaps; full 242-instruction coverage for candidate/original/baseline
  • Model preserves cached chroma pairs, sequential luminance reads and tiled AR/GB stores; no out-of-allocation alias claims
  • JPEG differential suite: 9,456 paired cases pass with ABI checks
  • Pool identical; literal audit checks twelve functions with no errors. Existing unequal-size setter skip remains
  • Full default build/progress, 43U/ok, main/leaf/diff checks pass
  • DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d

Bounded interpreter/reference diagnostics are not a formal proof or hardware execution. Evidence: tools/decomp-assist/allhands-jpeg-rgba411-fixed-neighbors.attempts.md. No original binaries/disassembly uploaded. Draft for human review; no merge or auto-merge requested.

Note

Reorder local declarations in TMCJPEGDEC_converterYUV411toRGBA8

Swaps the declaration order of s32 greenOffset and u16* output in Texture_MCUtoRGBA8.c. This matches decompilation output; the fuzzy score improves from 82.6033% to 82.70661%. Types, initializers, and conversion logic are unchanged.

Adds an audit record in allhands-jpeg-rgba411-fixed-neighbors.attempts.md with the selection process, validation steps, and reproducibility artifacts.

Macroscope summarized dbd616d.

## Minimal declaration-only gain Swap only existing uninitialized output/greenOffset declarations in the normal RGBA411 converter. All expressions, types, scopes, initializers, assignments, memory accesses and siblings remain fixed. - RGBA411 normal: 82.6033% → 82.70661%, 242/242 instructions - Unit: 90.59006% → 90.60522% - All twelve sibling bodies and both exact functions preserved - Exact/code/data/link totals unchanged; this is a fuzzy-only gain One fixed-center audit compiled baseline plus all 852 unique swap/move neighbors, 853 real compilations. Every immutable snapshot was officially scored without structural filtering. Parent independently reproduced all official reports, source/object hashes and the complete neighbor set. Retained first best0243 is the minimal swap. Historical capped proxy-ranked coverage is disclosed; no novelty or new-winner fixed-point claim. ## Independent parent verification Fresh build on 17e497e06d6793662fd32eb58f69a710e4b71c71. Tested tree be22ba7e61fe6aa5a37684977efa5e870f0276c6. - All 1,027 unit/function reports checked: no regressions, only target improves - Sibling code, allocated non-code data/relocations and exact/link measures preserved - Separate sequential pixel reference: 11,245 vectors / 33,735 object executions, including 2,829 allocation-valid input/output overlaps; full 242-instruction coverage for candidate/original/baseline - Model preserves cached chroma pairs, sequential luminance reads and tiled AR/GB stores; no out-of-allocation alias claims - JPEG differential suite: 9,456 paired cases pass with ABI checks - Pool identical; literal audit checks twelve functions with no errors. Existing unequal-size setter skip remains - Full default build/progress, 43U/ok, main/leaf/diff checks pass - DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d Bounded interpreter/reference diagnostics are not a formal proof or hardware execution. Evidence: tools/decomp-assist/allhands-jpeg-rgba411-fixed-neighbors.attempts.md. 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 local declarations in `TMCJPEGDEC_converterYUV411toRGBA8` > Swaps the declaration order of `s32 greenOffset` and `u16* output` in [Texture_MCUtoRGBA8.c](https://github.com/coah80/wii-ipl/pull/1102/files#diff-43f833baadaffaadab5e93ae34189875e88de77afa5d1f996fdd17d91497cf70). This matches decompilation output; the fuzzy score improves from 82.6033% to 82.70661%. Types, initializers, and conversion logic are unchanged. > > Adds an audit record in [allhands-jpeg-rgba411-fixed-neighbors.attempts.md](https://github.com/coah80/wii-ipl/pull/1102/files#diff-4cdf870eb6efec014cd9d8425e5d516ebb93157f89c024013e2decc20906ad3b) with the selection process, validation steps, and reproducibility artifacts. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized dbd616d.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 13:04:31 +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.