Forums > Jitter

Jit.movie with hap engine – unique parameter not working?


Dec 14 2016 | 8:48 am

Hi,

I have my own media server that I’ve written in Max, and I’m trying to integrate the hap engine into this in order to boost playback performance. This is working well, but I have one problem. In some instances, I want to load still image files – jpegs, PSDs, etc – into my jit.movie, and I get a bad performance hit when I do this. It seems that with the engine set to ‘hap’ the jit.movie doesn’t respond as I would expect to the ‘unique 1’ parameter, so even with a still image loaded, it is loading the file from disk and onto the GPU on every bang. I guess that because the still images aren’t in a hap encoded file, this is hitting the CPU hard. Is there any way around this? Or do I have to encode all my still images into a HAP format if I’m going to use the same jit.movie for stills and video?

Thanks in advance for any insight!

Tom

Dec 14 2016 | 8:53 am

Edit!

I have discovered that the problem isn’t consistent between file types. PSD and JPEG files read by the jit.movie @engine hap DO work as expected, but PNG files don’t. This provides a workaround for me for the time being (avoid PNG!) but still seems like an odd behaviour: I expect it’s something to do with PNG files which is beyond my understanding…

Dec 14 2016 | 10:28 am

mac or windows?

Dec 14 2016 | 10:51 am

Mac

Dec 14 2016 | 11:40 am

i can’t reproduce, please provide a patch

Dec 14 2016 | 12:16 pm
— Pasted Max Patch, click to expand. —
Attachments:
  1. mask_circle

    mask_circle.png

Dec 14 2016 | 12:18 pm

Ah, couldn’t post the PSD file equivalent for the test – here is is:

https://www.dropbox.com/s/tbr4j5q6vud6pg5/mask_circle.psd?dl=0

Cheers

Tom

Feb 24 2017 | 3:45 am

Hi,

I’m raising this again as it’s causing me some problems and I think I’ve narrowed down the issue: it may be to do with image sizes. Here is an example patch with two jpegs – both from the same source, but with different dimensions. When I choose the 1024×768 image, the ‘unique’ parameter behaves as expected, with the jit.movie only outputting the frame once. With the slightly larger image, the jit.movie produces output on every bang. Seems only to be a problem with @engine hap.

I’m working on Max 7.3.2 on OSX 10.12.3

Many thanks

Tom

— Pasted Max Patch, click to expand. —
Attachments:
  1. Example-Camera-Shot-1024-x-768

    Example-Camera-Shot-1024-x-768.jpg

  2. Example-Camera-Shot-reduced-size

    Example-Camera-Shot-reduced-size.jpg

Feb 24 2017 | 8:51 am

hi Tom W.
yeah this looks like a bug. i’ll see if i can get it fixed up, but in the meantime it looks like your best option is to create some logic that disables automatic mode when a still image is loaded (e.g. framecount == 1).

Feb 24 2017 | 8:55 am

Thanks Rob, much appreciated. I’ll use the frame count trick in the meantime, good plan.

Cheers

Tom

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

Forums > Jitter