Hello Achim,

I'm joining the discussion as I've been working on this issue with Boris.

Actually we've been facing 2 problems with Quartz Composer:

1. The first one was something like 'ghost' images appearing in a composition frame where images from a QuickTime source movie were rendered. The rest of the composition is made of still images representing banners, logos, illustration images, etc.. . The QC composition is quite complex and the total number of rendering patches (Sprites or Billboards) reaches 15 and even more (more than 15 levels of overlayed images). We use the QC composition in a Cocoa application with a QCRenderer initialized 'off-screen', and we write images (NSImage objects) from the source movie (via a QTMovie object) on a published image input of the composition. Then we call the snapshotImage: method of the QCRenderer to get ouput images from the composition and put them in an ouput QTMovie. As explained, we sometimes (not always) have 'ghost' images appearing in the output movie, in the frame where the source video is rendered. This ghost images randomly and sparsely occur (3 or 4 times per minutes of generated video), and they correspond to other images used in the composition (banners, logos,..), always appearing in their original side, color, orientation, etc., so they may correspond to input image buffers, substituing an output buffer... . Furthermore, these ghost images usually appear in groups of 3 or 4, each separated from the following one with a single 'expected' source movie image.
We had no memory leak issue with this setup, only 'ghost' images


2. The second problem was the one explained by Boris: to by-pass the first problem of 'ghost' images, we tried to reduce the number of rendering modules (sprites and/or billboards) in the composition and using Core Image filters embeded in the composition to do the image compositing (image overlay). We tried 2 things for that : 1) simply using a CISourceOverCompositing filter in the 'edit filter function' of the Core Image Quartz Composer patch. 2) coding the following Core Image kernel in the CI QC patch :

kernel vec4 coreImageKernel(sampler bckImage, sampler topImage)
{
    vec4 bckPix, topPix;
    topPix = sample(topImage, samplerCoord(topImage));
    bckPix = sample(bckImage, samplerCoord(bckImage));

    return topPix + (1.0 - topPix.a) * bckPix;
}


Both of these solutions did the overlay work correctly but both lead to a big memory leak, in particular with HD source movie images, rendered in HD ouput images: in this case the 24 GBytes of our MacPro was eaten in a few tens of seconds, while our Cocoa application doesn't use more than 1,5GBytes of memory (according to the activity monitor of the Mac).

My hypothesis is that Quartz Composer actually does the image compositing in GPU when using the rendering patches like sprites and billboards, but that Core Image filters embeded in a QC composition does not, thus working in RAM and causing the observed memory leak.

I have no idea now how to do our compositing work with these to issue, wich really look like bugs in Quartz Composer...
Any suggestion would be appreciated.

Best,

Mathieu


*De : *Achim Breidenbach <ac...@boinx.com <mailto:ac...@boinx.com>>
*Objet : **Rép : Quartz Composer memory leak*
*Date : *27 mars 2012 09:28:04 HAEC
*À : *Boris Rousseau <boris.rouss...@powedia.com <mailto:boris.rouss...@powedia.com>> *Cc : *quartzcomposer-dev@lists.apple.com <mailto:quartzcomposer-dev@lists.apple.com>

Hello Boris,

in my experience QuartzComposer does all the graphics processing in the GPU not in the CPU. If your RAM goes up, this is usually caused by the inputs you are using. E.g. a H264 video has a big memory footprint. Can you describe in more detail, what your composition does and what sources are you using? What does "suddenly" mean to you (after certain seconds, randomly)?

best,

Achim Breidenbach
Boinx Software

On 27.03.2012, at 08:42, Boris Rousseau wrote:

Hello,

I am facing a memory leak while using Quartz Composer to process and generate videos. Quartz Composer starts processing the video in HD starting from 700Mb and suddenly raises over the RAM limit until the Mac Pro swaps. Apparently, the issue is probably link to Core Image processing while converting or rescaling images to HD but I am not sure about it.

Did anyone already have this problem, please ?
How do I debug Quartz Composer memory leak, please ?

Thanks for your help.

--
*Boris Rousseau*
<Pièce jointe Mail.png>

12A Avenue des Peupliers
35510 Cesson-Sévigné, France
fixe: +(33) 2 30 96 12 83
mobile: +(33) 6 19 12 65 54
www.powedia.com <http://www.powedia.com/>




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list (Quartzcomposer-dev@lists.apple.com <mailto:Quartzcomposer-dev@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/quartzcomposer-dev/achim%40boinx.com

This email sent to ac...@boinx.com <mailto:ac...@boinx.com>



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to