Forums > Jitter

How can I get the best performance out of my CPU?

July 27, 2013 | 6:12 am

Hello,
I cannot for the life of me figure out how to keep the integrity of my video/image files while simultaneously getting the best performance out of my CPU. I have attached the program I’m working on. Currently, I am strictly concerned with the video portion of the program. I am using a jit.qt.movie object to bang through images as if they were frames of a movie. I’m using ‘loadram’ to read the images from memory as opposed to disk, but I’m using a high resolution because I do not want grainy images. Is there a way keep resolution without killing the CPU? Thanks for all the help!


Mike


July 31, 2013 | 9:30 am

If anyone is having the same problem I think I found a cure. Using Jpeg files that are 720 X 480 resolution on a Macbook Pro (2.53 Ghz Intel, 4GB memory), I have achieved 8% – 11% CPU usage on my activity monitor by using jit.gl.slab. Have a look at the patch I’ve attached. See if you get the same results.


Mike


August 1, 2013 | 2:16 am

There’s something you can try to optimize your patch.
First of all, you should try using a single [qmetro] object, using [send] and [receive] to route the bangs, and [speedlim] to change speed where you need.
I also noticed you (correctly) use uyvy as colormode. The highest quality method (according to what you read here:http://cycling74.com/forums/topic/slab-compositing-and-colormodes/) to send uyvy video to GPU is using the "cc.uyvy2rgba.jxs" shader, adding "@dest_dim 2 1" in jit.gl.slab (see below)
<code>

– Pasted Max Patch, click to expand. –

</code>

Also, I’m wondering if using the photo-jpeg codec for your videos in combination with the "frame" message to jit.qt.movie would be more efficient than loading a different files for every frame…you should have a try.

Or you can try using jit.gl.hap http://cycling74.com/toolbox/jit-gl-hap/, which seems to give better performance than jit.qt.movie, even with non-HAP videos (don’t know about stability and reliability, though).

And, last but not least, have you checked the classic Vade’s optimization hints?

http://abstrakt.vade.info/?p=147


August 6, 2013 | 8:22 am

Wow, great tips! I successfully routed my videos to the video card GPU. I’m now down to a little over 10% CPU processing while running two quicktime videos. Thanks so much for your help!


Mike
http://www.michaelpromeo.com


Viewing 4 posts - 1 through 4 (of 4 total)