matrix composition in uyvy

Aug 12, 2012 at 11:21pm

matrix composition in uyvy

I am working on a composition that mixes a masked movie and a background movie into the same matrix, I absolutely need that the final end to be merged on a matrix.. for the sake of performance I would like to change the colormode to uyvy but I am still a bit noob working with shaders and GPU, any help will be much appreciated

don't forget to download the attached .png file to see exactly what I am doing..

– Pasted Max Patch, click to expand. –

[attachment=201344,4295]

Attachments:
  1. maskellipse3.png
#63948
Aug 13, 2012 at 4:17am

These are old examples, and don’t really answer all your questions, but they might be helpful.
http://music.arts.uci.edu/dobrian/IAP2006/examples.htm
Scroll down to the examples titled “make a mask image”, “mask by multiplication”, and “mask by alphablend”.

I could be wrong, but I think the GPU advantages you gain by doing the alphablending in GL would be mitigated somewhat if you convert the result back to a jit.matrix. So the way shown in these examples might be as good as any…

#230596
Aug 13, 2012 at 9:44am

I understand the point that the final conversion to a jit.matrix is not the best thing to do.. perhaps I will do all the composition in argb, and after the final result I will convert everything to uyvy and go to the gl land.
Oh, and thanks for pointing this good set of examples!!

#230597
Aug 13, 2012 at 6:50pm

hello.
here is a patch that performs an alphablend on the GPU using a very simple jit.gl.pix gen-patch.
it also shows how to properly use @colormode uyvy to read quicktime movies, and convert them to rgba textures.

– Pasted Max Patch, click to expand. –
#230598
Aug 14, 2012 at 11:55pm

Hello Robert, thank you so much for this example, I am going to digest it now and try to understand the gen patch wich is something very new for me..

#230599

You must be logged in to reply to this topic.