Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie QC/CI questions - Image delays/Non-GPU code



Core image kernels can't carry any state from one invocation to the next.  They can't even test the result of other computations in the same iteration, since the order and the concurrency are not guaranteed by the GPU.  To keep data persistent, you have to buffer it, which in Quartz Composer means an Accumulator.  I have a couple of examples on my old site (http://www.samkass.com/blog/), such as "ghost" that might help.  (I haven't updated anything on my site in a year and a half, so hopefully the compositions still run.)

I have had some success with passing values outside the 0-1 range from core image kernel to core image kernel.  I think they are normalized only when they are rendered by an output patch, but I can't be sure.  Hopefully you can get guidance from Apple on that.

--Sam

On Feb 9, 2007, at 5:09 AM, Oliver Donald wrote:

Hi list,

 

I’ve only been playing with QC and CI for a week or so but as someone who enjoyed hacking up demos back in the Amiga days I’m having great fun! But I’ve got a couple questions that I couldn’t find clear answers to in any of the documentation.

 

First off, if I have an effect that requires some information to be persistant during a single frame, what is the best way to do this in a CIKernel image unit? I am trying to write a box-blur implementation that scans horizontally and vertically, adding pixels on the right/top and subtracting them from the left/bottom, but I’m not sure how to keep a running total going. How should I do this? Also, is it possible to keep data persistent across frames? I imagine the Accumulator could help but that isn’t very elegant, I’d rather do it in the code.

 

Secondly, I already asked this but got no answer, if I have a CIKernel image unit that writes values below zero and above 1.0, will these values be preserved or clipped? Will clipping only occur when the image is rendered or will it happen before then?

 

Thanks,

Oli

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

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

This email sent to email@hidden

References: 
 >Newbie QC/CI questions - Image delays/Non-GPU code (From: "Oliver Donald" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.