From fc1d445d691c638fbcdf71e2dc56d7de1c4cde7c Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Tue, 6 Oct 2026 22:18:33 -0400 Subject: [PATCH] atrac3: keep the second window table out of small IRAM b7170e03c4 added window_lookup_mid, 512 bytes, to IRAM on every target. On the targets with 48KB of IRAM for a codec that left the ATRAC3 codecs 48 bytes too large to link (iPod Color and the other PP502x players with 96KB of IRAM). Put the table in IRAM only on the targets with more, like the decoder's other large tables. Nothing changes there. Built for iPod Color, where the two codecs now have 476 bytes of IRAM to spare, and for the iriver H120. Co-Authored-By: Claude Opus 5.5 --- lib/rbcodec/codecs/libatrac/atrac3data_fixed.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rbcodec/codecs/libatrac/atrac3data_fixed.h b/lib/rbcodec/codecs/libatrac/atrac3data_fixed.h index 54ec832880..2bc1316547 100644 --- a/lib/rbcodec/codecs/libatrac/atrac3data_fixed.h +++ b/lib/rbcodec/codecs/libatrac/atrac3data_fixed.h @@ -79,8 +79,9 @@ static const int32_t window_lookup[128] ICONST_ATTR MEM_ALIGN_ATTR = { /* The window above is the first 128 points of the 512 point mdct window. * Points 128..255 are these values plus one, scaled by 2^31; they rise to * 1.207 and fall back to 1. The second half of the window mirrors the - * first. */ -static const int32_t window_lookup_mid[128] ICONST_ATTR MEM_ALIGN_ATTR = { + * first. In IRAM only where there is room: with it the codec does not fit + * the 48KB of the smaller targets. */ +static const int32_t window_lookup_mid[128] ICONST_ATTR_LARGE_IRAM MEM_ALIGN_ATTR = { 0x00c7d1c8, 0x024fd962, 0x03cd6738, 0x05401bc8, 0x06a79e95, 0x08039e75, 0x0953d1d1, 0x0a97f6df, 0x0bcfd3c6, 0x0cfb36c3, 0x0e19f636, 0x0f2bf0a8, 0x10310cc9, 0x11293955, 0x12146d01, 0x12f2a64e, 0x13c3eb59, 0x148849a0,