fix(TMC_JPEG): make sampling-table declarations consistent #1222

Merged
coah80 merged 1 commits from agent/fix/jpeg-sample-array-types into main 2026-10-05 14:34:02 +00:00
coah80 commented 2026-10-05 14:32:59 +00:00 (Migrated from github.com)

Source correction

Use consistent const u8[6][4] declarations and definitions for SampleH_N/SampleV_N. The parser already indexes these tables in two dimensions, but #1218 left the defining translation unit declaring one-dimensional arrays. Preserve all initializer bytes, table offsets, and consumers. The independent SampleComps condition remains untouched.

Independent verification

Tested base: bf65a26b5e
Tested tree: 202555e8ad

  • Parent forced the header-dependent rebuild, then revalidated after rebasing
  • All 1,027 source objects retain identical allocated sections and relocation records versus current main
  • Full progress report identical; no matching or linking score inflation
  • jdec_main 13/13 exact; all 13 ctxdiff comparisons zero; all 15 dependent pools identical
  • Full 43U build and explicit ok target pass
  • Original and built DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d
  • Existing jpformat .sdata2 tail padding remains unchanged (6 source bytes, 8 original with two zero padding bytes)

Audit: tools/decomp-assist/jpeg-sample-array-types.audit.md. Repository-wide completion still fails; this is a source type correction, not a completion claim. Original binaries remain local. No merge or auto-merge requested.

Note

Fix sampling-table declarations in TMC_JPEG to use 6x4 array shape

Changes the TMCJPEGDEC_SampleH_N and TMCJPEGDEC_SampleV_N tables in jpformat.c from flat 24-element initializers to six rows of four bytes. Initializer values are unchanged. Updates the matching declarations in tmc_jpeg_internal.h and removes the conditional flat-form declaration used when TMC_JPEG_FRAME_PARSER was not defined. The SampleComps conditional is untouched. Adds an audit document at jpeg-sample-array-types.audit.md with build and validation evidence.

  • Risk: none expected — the byte layout in memory is identical; only the declaration shape changed in tmc_jpeg_internal.h and jpformat.c

Macroscope summarized 379c84d.

## Source correction Use consistent const u8[6][4] declarations and definitions for SampleH_N/SampleV_N. The parser already indexes these tables in two dimensions, but #1218 left the defining translation unit declaring one-dimensional arrays. Preserve all initializer bytes, table offsets, and consumers. The independent SampleComps condition remains untouched. ## Independent verification Tested base: bf65a26b5e38cddaa37b0e12e15e55ba61f57dd9 Tested tree: 202555e8ade246604a64c21adaffaf4436acda03 - Parent forced the header-dependent rebuild, then revalidated after rebasing - All 1,027 source objects retain identical allocated sections and relocation records versus current main - Full progress report identical; no matching or linking score inflation - jdec_main 13/13 exact; all 13 ctxdiff comparisons zero; all 15 dependent pools identical - Full 43U build and explicit ok target pass - Original and built DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d - Existing jpformat .sdata2 tail padding remains unchanged (6 source bytes, 8 original with two zero padding bytes) Audit: tools/decomp-assist/jpeg-sample-array-types.audit.md. Repository-wide completion still fails; this is a source type correction, not a completion claim. Original binaries remain local. 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] > ### Fix sampling-table declarations in `TMC_JPEG` to use 6x4 array shape > Changes the `TMCJPEGDEC_SampleH_N` and `TMCJPEGDEC_SampleV_N` tables in [jpformat.c](https://github.com/coah80/wii-ipl/pull/1222/files#diff-ebb61cddc992e10b7a6c72aa40b2dc860f07ccd3183894123f4902f5dcd4ea9a) from flat 24-element initializers to six rows of four bytes. Initializer values are unchanged. Updates the matching declarations in [tmc_jpeg_internal.h](https://github.com/coah80/wii-ipl/pull/1222/files#diff-c013fea87b4deb76411c275419d80f4f470a823e4ce088abe799a49d5b5eeb6b) and removes the conditional flat-form declaration used when `TMC_JPEG_FRAME_PARSER` was not defined. The `SampleComps` conditional is untouched. Adds an audit document at [jpeg-sample-array-types.audit.md](https://github.com/coah80/wii-ipl/pull/1222/files#diff-2383985af49273b80bd24f776b249045f419f71385638189756cbb1f166ee21e) with build and validation evidence. > - Risk: none expected — the byte layout in memory is identical; only the declaration shape changed in `tmc_jpeg_internal.h` and `jpformat.c` > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 379c84d.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-05 14:33:59 +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.