matrix composition in uyvy

Guilherme Martins's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

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

4295.maskellipse3.png
png
Christopher Dobrian's icon

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...

Guilherme Martins's icon

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!!

Rob Ramirez's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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.

Guilherme Martins's icon

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..