Using the IPU...

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Using the IPU...

Post by Shazz »

Just a question, is there somebody here who has tried to use the IPU (Image Processing Unit) to replay a Mpeg2 movie ????

Should we use the IOP to access the IPU ? I really have a lack of knowledge concerning this IPU... If someone can fill (a little) the gap...

Thx
- TiTAN Art Division -
http://www.titandemo.org
Guest

Post by Guest »

Well, the IPU is probably one of the rarest things for someone to touch.

The thing is, the IPU does not magically play back movies. To playback
a normal DVD type movie, requires several streams in and out of the IPU.
The sequence is something like this*

1. Stream in data via IOP to EE memory buffer
2. Stream out from EE memory buffer to IPU for IDCT
3. Stream output from IPU back to a second memory buffer
4. Use EE CORE MMI instructions to perform Motion Compensation
(this part of mpeg decoding is NOT done in hardware on the IPU)
5. Stream results of motion compensation back to IPU for Color Space Conversion
6. Stream CSC output from IPU back to memory, this is the final RGB image
7. Feed to the GS via GIF

There are variations on this. It might be possible to do SOME conversations via the MDEC on the IOP when reading from media, though the iop is resource limited. I don:t know if there is any use to using some of the preprocessing capabilities of VIF1 enroute to PATH2, and certainly if one wants to do anything extra they could send it into VU1 for additional post-processing then being kicked to the GIF.

But has anyone done this, homebrew ? I don:t think so...

Gorim
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post by Shazz »

Thanks Gorim !

Yep I really thought it was more 'magic' than that ! Maybe porting a simple MpegI decoder could be easier for the moment... and just to have a kind of "splash" movie screen :D..

But thanks again, that's very interesting and for sure a day a way to look at...
- TiTAN Art Division -
http://www.titandemo.org
Guest

Post by Guest »

FYI, I should cite that my flow summary comes from one of many such flow diagrams for the IPU, shown on the final page of the EE User's Manual. However, this manual can only be obtained from the Linux kit or from official PS2 developer kits, so if you have neither you are SOL with respective to seeing these.

The IPU isn't just used for MPEG2 video playback. (Can the IPU do audio also anyone ?). Another common use is simply decompressing jpegs of textures that often can even get further decompression post-processing at VIF1 enroute path2 to the GIF/GS for texture uploads. The idea is naturally to save memory space by decompressing textures before giving them to the GS.

Gorim
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

gorim wrote:Can the IPU do audio also anyone ?
AFAIK, no.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post by Shazz »

Thanks for the information Gorim... good to know !

I'm sure there is plenty of applications for the IPU :D

And obviously decompressing jpeg on the fly can be great... I wonder if libjpg uses it of is just a conversion of the JPG lib for the EE....

Have to look....

Pixel, is the IPU does not provide audio capaibilities, how the IPU decoder and the SPU are synchronized for video replay ? by hand ?

just curious....
- TiTAN Art Division -
http://www.titandemo.org
zerocom
Posts: 12
Joined: Tue Jun 08, 2004 7:45 am

Post by zerocom »

The IPU can do the following things:

- IDCT (for MPEG1/2 or JPEG)
- VLC decode
- FLC decode
- color conversion (YUV->RGB, RGB32->INDEX8)

The IPU can also do MPEG I-Frame decoding and converting to RGB in one step (for texture decompression)

To decode a full MPEG2 movie many things have to be done besides using the IPU, like parsing and motion compensation.

I made a mpeg1/2 decoding lib which fully uses the ipu some time ago....

Bye...
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Erm, the IPU's IDCT doesn't support JPEG decompression.
"He was warned..."
zerocom
Posts: 12
Joined: Tue Jun 08, 2004 7:45 am

Post by zerocom »

... you may right, but the idct itself should be the same as mpeg1/2, but you cannot use it as stand-alone. The IPU does always VLC-decode->IQ->IDCT....
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

I'm just trying to make it clear that there is no hardware JPEG decompression in the PS2, that's all.
"He was warned..."
Post Reply