decomp(jpeg): refine RGBA422 luma/output allocation #1105

Merged
coah80 merged 1 commits from agent/bittle/rgba422-luma-output-order into main 2026-10-03 13:45:57 +00:00
coah80 commented 2026-10-03 13:45:31 +00:00 (Migrated from github.com)

Minimal declaration-only gain

Swap only the existing uninitialized lumaSkip/output declarations in normal RGBA422. Every assignment, expression, scope, type, initializer, memory access and sibling stays fixed.

  • Function: 88.060814% → 88.195946%, 148/148 instructions
  • Structural/positional score stays (10,80)
  • Unit: 90.60522% → 90.61734%
  • Both exact functions, code660/6596, allocated data and link measures unchanged

One fixed-center audit compiled baseline plus all782 unique neighbors,783 real compilations. These function orders repeat historical compilation: the previous fixed-point claim optimized structural/positional score, with no retained per-order official scores. Parent independently reproduced every official snapshot result, source/object hash and exact neighbor set. Unique best0027 is the minimal swap. No new-order novelty or winner fixed-point claim; only5/782 winner neighbors were observed.

Independent parent gates

Rebased and freshly rebuilt on07a021918e562e2b094f3f68787a575227b4e2c8. Tested tree0a5051e696ce947aac4ec4c8aea78a0106a5c8d7.

  • All1,027 current-main unit/function reports checked: no regressions; whole-object comparison changes only RGBA
  • All twelve sibling bodies and exact/data/link measures preserved
  • Sequential AR/GB pixel reference:12,889 vectors/38,667 executions, including4,473 contained halfword overlaps;148/148 coverage for candidate/original/baseline
  • Reference preserves cached chroma and each sequential luminance read/store under overlap
  • JPEG differential suite:9,456 paired cases passes with ABI checks
  • Pool identical; literal audit12 functions, no errors, existing unequal-size setter skip preserved
  • Full default build/progress,43U/ok, main/leaf/diff checks pass
  • DOL SHA1:26116613f624061ba99c8d1a299aaa6efa85670d

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

Note

Refine declaration order in RGBA422 luma/output allocation

Reorders local declarations in TMCJPEGDEC_converterYUV422toRGBA8 in Texture_MCUtoRGBA8.c so u16* output appears before s32 lumaSkip. No statements or logic change. Also adds an audit record of the declaration-order search in allhands-jpeg-rgba422-fixed-neighbors.attempts.md covering scoring, hashes, and regression results.

Macroscope summarized 68dc456.

## Minimal declaration-only gain Swap only the existing uninitialized lumaSkip/output declarations in normal RGBA422. Every assignment, expression, scope, type, initializer, memory access and sibling stays fixed. - Function: 88.060814% → 88.195946%, 148/148 instructions - Structural/positional score stays (10,80) - Unit: 90.60522% → 90.61734% - Both exact functions, code660/6596, allocated data and link measures unchanged One fixed-center audit compiled baseline plus all782 unique neighbors,783 real compilations. These function orders repeat historical compilation: the previous fixed-point claim optimized structural/positional score, with no retained per-order official scores. Parent independently reproduced every official snapshot result, source/object hash and exact neighbor set. Unique best0027 is the minimal swap. No new-order novelty or winner fixed-point claim; only5/782 winner neighbors were observed. ## Independent parent gates Rebased and freshly rebuilt on07a021918e562e2b094f3f68787a575227b4e2c8. Tested tree0a5051e696ce947aac4ec4c8aea78a0106a5c8d7. - All1,027 current-main unit/function reports checked: no regressions; whole-object comparison changes only RGBA - All twelve sibling bodies and exact/data/link measures preserved - Sequential AR/GB pixel reference:12,889 vectors/38,667 executions, including4,473 contained halfword overlaps;148/148 coverage for candidate/original/baseline - Reference preserves cached chroma and each sequential luminance read/store under overlap - JPEG differential suite:9,456 paired cases passes with ABI checks - Pool identical; literal audit12 functions, no errors, existing unequal-size setter skip preserved - Full default build/progress,43U/ok, main/leaf/diff checks pass - DOL SHA1:26116613f624061ba99c8d1a299aaa6efa85670d Bounded reference/interpreter diagnostics are not formal proof or hardware execution. Evidence: tools/decomp-assist/allhands-jpeg-rgba422-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] > ### Refine declaration order in RGBA422 luma/output allocation > Reorders local declarations in `TMCJPEGDEC_converterYUV422toRGBA8` in [Texture_MCUtoRGBA8.c](https://github.com/coah80/wii-ipl/pull/1105/files#diff-43f833baadaffaadab5e93ae34189875e88de77afa5d1f996fdd17d91497cf70) so `u16* output` appears before `s32 lumaSkip`. No statements or logic change. Also adds an audit record of the declaration-order search in [allhands-jpeg-rgba422-fixed-neighbors.attempts.md](https://github.com/coah80/wii-ipl/pull/1105/files#diff-5445847c82c7614ec341f4ff2e2283a33cfffa1ce3d3e3145f873fad246c2168) covering scoring, hashes, and regression results. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 68dc456.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 13:45:54 +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.