# IPU: the image processing unit (MPEG decoding) Sources: EEUM ch. 8 (Sony, DOC, facts only); ps2tek "Image Processing Unit" (tier 3). No hardware-captured judge exists among the pinned tests (ps2autotests has none for the IPU). ## What it does The IPU decodes from main memory to main memory: DMA channel 4 (toIPU) feeds its input FIFO, channel 3 (fromIPU) drains its output (EEUM §8.1, §5.1). It has no buffer of its own beyond its FIFOs. **Motion compensation is not done by the IPU but by the EE Core's multimedia instructions** (EEUM §8.1): FMV playback loads the EE as well as the IPU. Ten commands (EEUM §8.1.1): BCLR (clear the input FIFO), IDEC (intra decode: bit stream to RGB32/RGB16), BDEC (block decode to RAW16), VDEC (variable-length decode), FDEC (fixed-length decode), SETIQ, SETVQ, CSC (YCbCr RAW8 to RGB32/RGB16), PACK (RGB32 to RGB16 or INDX4), SETTH (alpha thresholds). The pipeline VLC -> IDCT -> CSC -> 4x4 ordered dither -> VQ is EEUM's figure in §8.1.1; the VLC tables are MPEG-2's (EEUM §8.5). ## Modelling (decision P9) - **Functional level for the data path** (charter axis B): the IDCT's exact arithmetic, the CSC coefficients and rounding, the dither matrix and the VQ search are what decide the pixels. EEUM §8.6 gives the CSC and dither in its own terms; the IDCT's precision (MPEG-2 allows a tolerance) is **U13**. The specification states the arithmetic from EEUM and marks every constant DOC or FITTED. - **Transaction level for timing**: the IPU's busy time per command and per macroblock is undocumented (**U14**); IPU_CTRL's BUSY bit and the FIFO levels are visible to the EE, so the timing model is part of the specification (FITTED; the first HYPOTHESIS is a fixed cost per macroblock). - **Producer potential**: once a command's input is complete in the FIFO and its busy time is computed without decoding (U14 decides whether it can be), the decode can run on another thread with a join at the fromIPU DMA or a status read (psx-python's MDEC decision P4, the same shape). ## Load (for the speed table) A 640 x 448 FMV at 30 frames/s is 40 x 28 = 1,120 macroblocks a frame, 33,600 a second (arithmetic). At 5,000-20,000 host cycles per macroblock for VLC + IDCT + CSC (HYPOTHESIS, the MDEC's estimate scaled for MPEG-2's VLC), 0.17-0.67 G cycles a second: a fraction of a producer thread. The EE's motion compensation is in the EE's own load.