On Sat, Feb 20, 2010 at 1:05 AM, Danny Robson <danny@xxxxxxxxxxx> wrote:
> On Fri, 19 Feb 2010 21:24:57 +0300
> Eugene Zagidullin <e.asphyx@xxxxxxxxx> wrote:
>
>> Yes, it's just what I mean. But this decomposition is a very
>> CPU-intensive operation. Is there a way to process whole image only
>> once, store output in a kind of cache and later update requested
>> region with cached data? Performing decomposition again and again
>> until whole image will be covered with ROIs and thus cached is waste
>> of time.
>
> I ran into the same problem with gegl:openraw-load. If get_bounding_box
> and importantly get_cached_region both return the entire image, then
> GEGL will submit one process request for the entire image and cache the
> result.
>
> I'm using this trick in a couple of ops currently, and while it
> doesn't appear to be explicitly documented anywhere, it always works.
This isn't a trick but how it is supposed to be done.
get_bounding_box returns the rectangle that has defined output pixels according
to this operation with its given inputs.
The documentation of get_cached_region used to say:
/* Adjust result rect, adapts the rectangle used for computing results.
* (useful for global operations like contrast stretching, as well as
* file loaders to force caching of the full raster).
*/
GeglRectangle (*get_cached_region) (GeglOperation *operation,
const GeglRectangle *roi);
I have changed it, and hopefully improved it, by making it:
/* The rectangular area that should be processed in one go, by default if not
* defined the output roi would be returned. This is useful for file loaders
* and operations like contrast stretching which is a point operation but we
* need parameters as the minimum/maximum values in the entire input buffer.
*/
GeglRectangle (*get_cached_region) (GeglOperation *operation,
const GeglRectangle *output_roi);
/Øyvind K.
--
«The future is already here. It's just not very evenly distributed»
-- William Gibson
http://codecave.org/ http://ffii.org/
_______________________________________________
Gegl-developer mailing list
Gegl-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gegl-developer
[Video For Linux]
[Photo]
[Yosemite News]
[Yosemite Photos]
[gtk]
[GIMP Users]
[KDE]
[Scanner]
[Gimp's Home]
[Gimp on Windows]
[Steve's Art]
[Webcams]