[Gegl-developer] speeding up GEGL operations in GIMP
Jan Heller
jan.heller at matfyz.cz
Wed May 14 08:36:48 PDT 2008
Hi,
On 11:19, Wed 14 May 08, Richard Kralovic wrote:
> I just had a short look into the babl code; it looks like there is a
> float->u8 conversion implemented using the 16bit lookup table in
> extensions/gegl-fixups.c. In fact, it looks like the same algorithm as
> described in the pdf paper. I do not have much time to look at it now, I
> just noticed that the function gggl_float_to_index16 (line 130) is not
> inlined, but I guess it should be. Could you try to check if that helps?
The gegl-fixups.c code deals with gamma corrected RGB u8
conversions, so the inlining would affect RGBA float -> R'G'B' u8 conversion.
However, after loading a jpeg file into gimp-2.5 and
the using a color tool, conversions from RGB u8->RGBA float
and RGBA float -> RGB u8 are requested, that is non-gamma
corrected RGB u8. Is there a simple way how to make gimp
request conversions from/to R'G'B'u8 space?
> > On 09:14, Wed 14 May 08, Sven Neumann wrote:
> >> Hi,
> >>
> >> currently the GEGL operations in GIMP are very slow. I have done some
> >> basic profiling yesterday and it appears that the main problem is the
> >> conversion from floating point to 8bit. Here is where the most time is
> >> being spent. So it doesn't really make much sense to optimize the
> >> operations in GIMP or the point filters in GEGL. We need to look at the
> >> babl conversions first.
As you correctly pointed out on IRC, there is currently no
speedup code to conform to 0.0001 default BABL error
setting, so the RGBA float -> RGB u8 is handled by
ReferenceFish and that is the reason the code is so slow.
After setting the BABL_ERROR env. variable to 0.1, the
RGBA float->RGB float->RGB u8 is selected, making it a bit
faster. There is already RGBA float->RGB u8 shortcut in the
babl codebase in the gggl-lies extension, however this one seems
to work slower and introducing higher error than the
RGBA float->RGB float->RGB u8 path.
The RGB u8->RGBA float conversion is correctly handled by
the gimp-8bit extension, performing approx. twice as fast as
the RGBA float->RGB float->RGB u8 path.
Regards
Jan
More information about the Gegl-developer
mailing list