Large matrix performance issues?

Jun 7, 2012 at 7:28am

Large matrix performance issues?

Hi all!

I have a show approaching in which a visualisation will be projected onto a hi def 1280 720 screen. The issue is that the project requires video, however i have found that matrices of these dimensions grind the performance down to a halt! I am usng a small number of jit.gl.gridshapes simultaneously, but surely there must be a method of over/underlaying video that wont cause that much destruction?!?

I have a macbook pro with 8 gig of ram 2gHz i7 processor and the ATI Radeon 9460 (i think) so id be surprised if it cant cope? Any advice is really welcome at this stage!

#51957
Jun 7, 2012 at 10:22am

Not a Jitter master here, but some (probably obvious) considerations: Are you creating matrixes of HD size to combine the gridshapes and video? That will be slow… It’s faster to render directly to OpenGL, adding video via Jit.gl.videoplane. Also, unless the resolution of your video is actually 1280 * 720, you can scale the image up if needed. Also if you’ve already done that and/or still need to squeeze yet more performance, look at uyvy colormode for the video…

#186435
Jun 7, 2012 at 10:50am

What’s your rendering flow like? Post a patch maybe? As spectro says, do everything in OpenGL (and keep it there, no readback to matrices!) and you should be fine. With video and 3D it’s very easy to destroy framerate if not taking care of these things.

See Jitter tutorial 49 for UYVY and jit.gl.videoplane.

#186436
Jun 7, 2012 at 11:55am

well heres the issue:

my patch includes opengl and currently everything is being rendered on videoplanes straight to window. the issue is that amongst having a few jit.gl.gridshapes floating about, i’m actually using some dynamically resizing gl circles as video masks to allow another video to come through. the method i’m using is derived from this:

– Pasted Max Patch, click to expand. –

however as you can see, the mask is generated using a matrix. is there any other effective way around video masking that doesesnt use a matrix?

cheers! i’m in a real pickle here!

#186437
Jun 7, 2012 at 11:56am

trust me! i’ve searched!

#186438
Jun 7, 2012 at 1:01pm

> is there any other effective way around video masking that doesesnt use a matrix?

sure, draw you mask shape in GL, over the videoplane etc. set blend_enable and the correct blend_mode and you should get similar results.

not sure but i wouldn’t be surprised if an andrew benson jitter recipe does this kind of stuff.

#186439
Jun 7, 2012 at 1:17pm

actually, i reckon i might have cracked the ideal method! i’ll post if anyone is interested!

#186440
Jun 7, 2012 at 1:57pm

please do…

come to think of it: you can do the alphaglue thing with shader and textures as well.

#186441
Jun 7, 2012 at 2:59pm

well.. i say “i’ve cracked it”.. what i meant was i found this:

– Pasted Max Patch, click to expand. –

and adjusted it a little!

#186442
Jun 8, 2012 at 9:26am

Hi,

I tried to do the same, unfortunately without success… Processing large matrix will cause fps to drop, significantly.
Anyway, any new ideas how to make large matrix process lighter?

Luis Marques

#186443
Jun 8, 2012 at 10:18am

There’s many approaches, depends on what you wanna do. Do you have a patch/description?

#186444
Jun 8, 2012 at 10:50am

I’m looking for an effective way to playback 2 HD (1920×1080) movies, and process one of them in OpenGL. I got satisfactory results when I resize the videos to 320×40. However loses high quality when I blend the videos after process one of them.

Sending the patch.

– Pasted Max Patch, click to expand. –

Luis Marques

#186445
Jun 8, 2012 at 12:38pm

For starters, get rid of all the pwindows. The pwindow after each of your slabs forces Max to copy the texture (GPU) back to a matrix (CPU) for displaying. How does it run without all of those?

#186446
Jun 8, 2012 at 3:36pm

thanks for that, i’ve actually already got rid of the pwindows, and we’re running beautifully. cheers!

#186447
Jun 8, 2012 at 4:00pm

see that’s what i meant with “it’s very easy to destroy framerate if not taking care of these things” ;)

#186448
Jun 10, 2012 at 2:38am

Yes, without all pwindows framerate is about 30fps which is good. But that’s not the point, because the movies were resized to 320×240 at the output of jit.qt.movie. What I really want to find is a effective way to process large matrices (1920×1080) without the need to resize the movies before process them. Resize causes loss of quality, I’m trying to avoid that loss.

Luis Marques

#186449
Jun 10, 2012 at 1:59pm

Some questions:

- what codec are your movies?
- is your CPU maxed out when running this?
- have you tried in UYVY mode?

#186450
Jun 10, 2012 at 2:47pm

I record videos using jitter and JPEG codec.
In this patch I got 30fps without all pwindows. Load and process 1920×1080 videos the framerate is significantly lower (5fps/10fps). Although, resizing and processing 320×240 videos got a good framerate but, do not make the playback natural, without mentioning the loss of quality.
UYVY could be an option, I just have to try it.

#186451
Jun 10, 2012 at 3:07pm

- is your CPU maxed out when running this?

I’m asking this to know if the bottleneck is on the CPU or GPU side.

> UYVY could be an option, I just have to try it.

Please do.

Btw, you have interp, fsaa and other settings on your jit.window. Try removing all that. Might be some fps choppers in there.

#186452
Jun 11, 2012 at 4:31pm

Hi.

Your tips did work!
I got 30fps whit 1920×1080 videos plus processing!

Thanks

Luis Marques

#186453

You must be logged in to reply to this topic.