Media Engine and Mp3 decoding
Media Engine and Mp3 decoding
I am working with an application that uses the media engine for extra CPU power. I would like to move mp3 decoding from the main CPU and use the media engine hardware method cooleyes discovered. Is it possible to do that or are there some restrictions I should know about before I start working on it? Thanks for the help.
Most probably the second processor for *EITHER* decoding mp3 audio, or h.264 video *OR* running your own code and not *BOTH*. In both cases, you need a processor to wait for events. Due to the fact that official developers cannot run any code on the second processor, there is very few chances for us to be able to inject our own code to run them when the mp3/h.264 decoding code is idling without messing up.Shapyi wrote:Yeah I know you could. But I know Sony's PRX sets up the media engine for decoding mp3 audio, or h.264 video. My question is, when the ME is in that state and decoding "media" can I still run my own code on it by using threads or some other method?
Then what is the VME for? I was given to believe that the whole point of the VME was to hardware decode Atract and possibly other music codecs, and for applying equalizer effects.
I'm sure the ME handles the video decoding though, cos the VME is only audio. Though I have a feeling, the ME runs the code to "manage" the VME in the case of audio, but the actual decoding is on VME.
I'm sure the ME handles the video decoding though, cos the VME is only audio. Though I have a feeling, the ME runs the code to "manage" the VME in the case of audio, but the actual decoding is on VME.
More likely to be the other way around... the ME can't possibly be decoding the video - a 333 MHz MIPS cannot decode 720x480 h.264 in real-time. The VME MUST be doing most of the work. The ME is probably used for decoding the container, moving data, and colorspace conversion at most. It may also be decoding audio formats the VME doesn't understand.
Well, looking at the block diagram, the AVC decoding is shown as a different block, but it's certainly not being decoded by the ME. It's a hardware module doing the heavy lifting. :)hitchhikr wrote:There's a specific hw component in the console to decode such videos, nothing to do with the VME which is only used for sound, i think.
It'd probably barely manage the 5MBytes/s Bluray spec on CPU alone. No way it'd play 10+ MBps videos from the XMB if it was just CPU. It can't use the RSX either cos it doesn't support CUDA. 20MBps footage brings my C2Q @ 3.52GHz to its knees, decoding on 3 cores.Wally4000 wrote:Uhh its PPC.. PPC is hot damn digitty, its about 2x as powerful as your CPU xD
The hardware is called SPE(s) ;)Torch wrote:The PS3 must have dedicated H264 decoding hardware too. There's no way a crappy 3.2GHz CPU that's not half as powerful as a desktop 3.2GHz CPU can decode 1080p. My old 3200+ couldn't.
Ask and it will be given to you; seek and you will find; knock and the door will be opened to you.
Probably not. The ME is almost certainly used to pass data to/from the VME/AVC decoders, among other tasks. It's clear that Sony loads ME controlling software as part of the codecs, and since the ME is doing the controlling, that's why it's called an ME codec. The ME might not be doing that actual decoding itself, but it's in control of the whole process.Shapyi wrote:Well for my project I would only need Mp3 decoding using Sony's modules while using the media engine CPU for other operations. Anyone know if that is possible?
The code we use to run stuff on the ME was based on parts of the code used by Sony to start their stuff on the ME as part of those codecs, so it's a dead certainty they interfere with each other. One or the other, not both.
Makes sense. I haven't been able to get anything running, even as a sample.J.F. wrote:Probably not. The ME is almost certainly used to pass data to/from the VME/AVC decoders, among other tasks. It's clear that Sony loads ME controlling software as part of the codecs, and since the ME is doing the controlling, that's why it's called an ME codec. The ME might not be doing that actual decoding itself, but it's in control of the whole process.Shapyi wrote:Well for my project I would only need Mp3 decoding using Sony's modules while using the media engine CPU for other operations. Anyone know if that is possible?
The code we use to run stuff on the ME was based on parts of the code used by Sony to start their stuff on the ME as part of those codecs, so it's a dead certainty they interfere with each other. One or the other, not both.
So the ME actually, controls the VME... does that mean it might be possible to use the VME? Has anyone been able to access that piece of hardware for use? I know Sony can do as they wish with the VME, but has anyone been able to do anything with it in terms of homebrew?
I am trying to write a media player for PSP and I would like to off load as much to hardware as possible. Sony's modules are too limited in terms of MPEG4 and AVC decoding (resolution restrictions, etc). I read that the VME is a FPGA. I was wondering if it would be possible to access it in order to offload audio decoding, color space conversion and idct in order to save CPU cycles.
Thank you for the answer and keeping this on topic.
AFAIK, no one knows what the VME or the AVC really are. There's probably a DCT accelerator in there somewhere, but how to use it and what else is in there, Sony only knows.So the ME actually, controls the VME... does that mean it might be possible to use the VME? Has anyone been able to access that piece of hardware for use? I know Sony can do as they wish with the VME, but has anyone been able to do anything with it in terms of homebrew?
I don't think there's any evidence for that.I read that the VME is a FPGA
Maybe not an fpga as it were, but it does seem to be reconfigurable under software control in perhaps a similar manner.:
Some slides:
http://www.extremetech.com/slideshow/0, ... 950,00.asp
And some interesting reading from the horse's mouth, on the vme:
http://www.sony.net/Products/SC-HP/cx_n ... view42.pdf
Other than that, there doesn't seem to be a lot out there, but I can guess that reversing the configuration bitstream format from a Sony module to the point of being able to emit custom ones ... would be difficult.
Some slides:
http://www.extremetech.com/slideshow/0, ... 950,00.asp
And some interesting reading from the horse's mouth, on the vme:
http://www.sony.net/Products/SC-HP/cx_n ... view42.pdf
Other than that, there doesn't seem to be a lot out there, but I can guess that reversing the configuration bitstream format from a Sony module to the point of being able to emit custom ones ... would be difficult.
Damn, I need a decent signature!
-
- Posts: 5
- Joined: Wed Nov 25, 2009 2:52 am
ME/VME...could this be possible?
hi.I know some parts of this has been posted before in several post but I dont know where asked it and if it could be an silly question.(correct me if i mistake,please)
First i know we can use me as other cpu (thanks to several people of this forum,using j.f / crazyc prx/samples as StrmnNrmn has done on daedalus.)
I read on a older post StrmnNrmn created a 'job manager' on top mediaengine.prx, which coordinates batches of work between the main CPU and the ME.
he uses J.F.'s MediaEngine.prx ,(i also have read it is not "finished" because some problem as not being able to stop the unit and other things)
The other way we can use is as cooleyes demos/programs using sony'prx and being able to decoder multimedia with hardware (they are many doubts how internally it works,how vme works...)
as PspPet said in a older post (2005):
"It appears the VME software is tied into the ME (Media Engine).
Suggestions/speculation:
If interested in the ME software, take a look at the "mebooter.prx" and "mebooter_umdvideo.prx" system files. Both of these files contain a GZIP copy of the ME software at the end (the mebooter.prx version is bigger, over 800KB).
(ie. the ME code is unziped, saved to memory, and the ME is reset).
You can disassemble this with a MIPS disassembler (the ME is the 2nd MIPS CPU). About half of it is MIPS code. The other half is data, some of which looks like it *might* be FPGA initialization data for the VME. It could also be general data tables (for the ME CPU), and/or code/data for the AVC (MPEG4 decoder).
A lot of reverse engineering required to figure it out."
I imagine the fist part of code of mebooter.prx initialized the ME and pass the data/instruction to vme and load/wait other prx with codec (aac,mp3..) is loaded.
could be posible create other 'job manager' into J.F.'s MediaEngine.prx
and use some parts of this disasmed code also ,making a "multitasking" mediaengine.prx able to use both extra cpu and as sony uses as vme starter/coordinator.
I am not talking to trying to understand the vme code,only reuse (imagine modificating something) the sony's dissasmed code .
dani
First i know we can use me as other cpu (thanks to several people of this forum,using j.f / crazyc prx/samples as StrmnNrmn has done on daedalus.)
I read on a older post StrmnNrmn created a 'job manager' on top mediaengine.prx, which coordinates batches of work between the main CPU and the ME.
he uses J.F.'s MediaEngine.prx ,(i also have read it is not "finished" because some problem as not being able to stop the unit and other things)
The other way we can use is as cooleyes demos/programs using sony'prx and being able to decoder multimedia with hardware (they are many doubts how internally it works,how vme works...)
as PspPet said in a older post (2005):
"It appears the VME software is tied into the ME (Media Engine).
Suggestions/speculation:
If interested in the ME software, take a look at the "mebooter.prx" and "mebooter_umdvideo.prx" system files. Both of these files contain a GZIP copy of the ME software at the end (the mebooter.prx version is bigger, over 800KB).
(ie. the ME code is unziped, saved to memory, and the ME is reset).
You can disassemble this with a MIPS disassembler (the ME is the 2nd MIPS CPU). About half of it is MIPS code. The other half is data, some of which looks like it *might* be FPGA initialization data for the VME. It could also be general data tables (for the ME CPU), and/or code/data for the AVC (MPEG4 decoder).
A lot of reverse engineering required to figure it out."
I imagine the fist part of code of mebooter.prx initialized the ME and pass the data/instruction to vme and load/wait other prx with codec (aac,mp3..) is loaded.
could be posible create other 'job manager' into J.F.'s MediaEngine.prx
and use some parts of this disasmed code also ,making a "multitasking" mediaengine.prx able to use both extra cpu and as sony uses as vme starter/coordinator.
I am not talking to trying to understand the vme code,only reuse (imagine modificating something) the sony's dissasmed code .
dani
-
- Posts: 110
- Joined: Tue Feb 27, 2007 9:43 pm
- Contact:
The ME firmware was only embedded into those prxs upto 2.00. From 2.50 onwards they are stored in /kd/resource/me_xxx.img
No one has really documented the ME firmware extensively. It's quite complicated and relies heavily upon some type of MMIO at 0x4000000 (which on the main CPU is mapped to the EDRAM of the GE to be used as VRAM). This MMIO on the ME hasn't been documented either.
So at the moment, no one really knows how the VME works or how it's used.
No one has really documented the ME firmware extensively. It's quite complicated and relies heavily upon some type of MMIO at 0x4000000 (which on the main CPU is mapped to the EDRAM of the GE to be used as VRAM). This MMIO on the ME hasn't been documented either.
So at the moment, no one really knows how the VME works or how it's used.