Hi,
On Sep 5, 4:19 pm, Jon Brisbin <
jon.bris...@gmail.com> wrote:
> This would be awesome to have all around. I'd like to see if it's
> feasible, though, to port the code to an OS X 10.6 Framework that
> utilizes the new parallelization features of Snow Leopard like OpenCL
> and Grand Central Dispatch. To use this, the code would have to allow
> for processing only slices of the image, rather than operating on the
> entire image in every operation.
I am afraid that is not going to work that well. Tiling is not
possible for the slower tmos, as their need to operate on the entire
image (e.g. mantiuk06, fattal02, durand02). Tiling could be possible
for simpler, or global tmos, but these are probably fast enough.
> I haven't make a full review of all the tonemappers yet, but I also
> wonder if it would be possible to implement part of the code as a
> CoreImage filter. Not all of the code could work that way, but some of
> it could, depending on the operator.
You can always do it in your code (as long as you keep the GPL
license), but the code will not be portable anymore. I am always
reluctant to lock my code into one platform.
OpenCL is actually the best choice for performance improvements as it
can potentially give substantial gains and is cross-platform.
> I'm not sure changes like these could easily be incorporated into a
> library. As a first start, though, I'd like to be able to pull out the
> important code and put it into a Cocoa framework. Is there a summary
> of what the code does somewhere?
You usually want to wrap exiting functions into classes / objects of
your framework, you do not want to change / rewrite code if it is not
necessary. Check documentation in *.h files for each tmo. It should be
sufficient to write your own wrapper if you need it.
Rafal