fast mjpeg?

Started by delt0r, April 03, 2010, 14:58:52

Previous topic - Next topic

delt0r

I want to have some FMV in my game. I don't need much in terms of bitrate performance, but something decent in CPU. MJPEG fits the bill when decoded with things like mplayer/ffmpeg. However  when i use java's jpeg methods (ImageIO) I have a pretty big performance hit.

I just load one file after another at the frame rate and page flip. I get about 90% CPU on one core and profiling shows that all in the jpeg decode. While using mplayer i get only 4% CPU. I guess theres some MMX/SSE stuff the jdk does not bother with.

I guess i could do a JNI myself to some code pulled from ffmpeg or something. But it seems that some else may have done that? Anybody know of anything? (supporting Mac/Windows/Linux).

Theora is hitting my cpu pretty hard in the java decoders as well by the way.
If you want a plot read a book and leave Hollywood out of it.