Difference between revisions of "Hacking:Porting filters to GEGL"

From GIMP Developer Wiki
Jump to: navigation, search
(Processing, color grading and effects)
(Port of new GEGL ops to OpenCL)
 
(169 intermediate revisions by 12 users not shown)
Line 1: Line 1:
 +
Last updated: see tab 'history'
 +
 
= How to port =
 
= How to port =
  
This is the general process to write a new GEGL operation:
+
== GEGL part ==
 +
This is the general process for writing a new GEGL operation:
  
# Gather information.
+
# Gather information:
## Read the plugin you want to port, understand the algorithm hidden in it.
+
## Go over the source code of the plugin you wish to port. Understand the algorithm it implements.
## Read carefully the [http://gegl.org/ GEGL website]. There is lot of information here.
+
## Read the [http://gegl.org/ GEGL website] carefully. There is lot of information there.
## Read the [http://gegl.org/babl/ Babl website] and understand the difference between color models.
+
## Read the [http://gegl.org/babl/ babl website]. Understand the differences between color models.
## You may want to find a similar existing operation and get inspiration from it.
+
## You may wish to find a similar existing operation and get inspiration from it.
# Choose a [http://gegl.org/#_operation_api base class]. This is the general structure of your operation, the number of input/output, what kind of optimization GEGL can do.
+
# Choose a [http://gegl.org/#_operation_api base class]. This is the general structure of your operation, the number of inputs and outputs, and what kind of optimizations GEGL can do.
# Create a new file for your operation. No need to register it in some Makefile, the build system will build every C file present in the operations directory. The exact directory where you should put your file is explained in the GEGL website.
+
# Create a new file for your operation. The exact directory where you should put your file into is explained at [http://www.gegl.org/#_directory_overview GEGL's website].
# Copy another operation with the same base class and clean it to have your operation skeleton. GEGL use a macro system called GEGL chant, that avoid you to write all the GObject boilerplate, and register easily parameters for your op. Look other operation to see how it works.
+
# Register the operation in Makefile.am. Exactly how this is done depends on which directory you're placing your files into. For operations in operations/common/ (should be most operations), you need to add a single line mentioning your operation to the variable op_LTLIBRARIES. For example, if your c file is named edge.c, you would add a line that says "edge.la \". Please keep it in alphabetical order.
# Use the prepare function to indicate what color model your op will operate, for each input/output.
+
# Copy another operation with the same base class and clean it up to have your operation skeleton. GEGL uses a macro system called [https://git.gnome.org/browse/gegl/plain/gegl/gegl-chant.h GEGL chant]. It makes it unnecessary for you to write all the GObject boilerplate, and eases your work registering parameters for your operation. Look at other operations to see how it works.
# Create your op's parameter using the chant system. You can have integer, floats, string, color, curve, enum ... There is some predefined enum in the GEGL core, for instance GeglSamplerType. You can register your own, like in the ripple op.
+
# Use the '''prepare function''' to specify which color model your op will operate with for each input/output.
# Write your operation in the process function. Some tips here:
+
# Create your operation's parameters using the chant system. You can have integer, floats, string, color, curve, enum ... There are some predefined [https://git.gnome.org/browse/gegl/plain/gegl/gegl-enums.h enums] in the GEGL core, for instance '''GeglSamplerType'''. You can register your own like in the [https://git.gnome.org/browse/gegl/plain/operations/common/ripple.c Ripple op].
## GEGL store data in tile, so it impose some restriction, especially for transform op. You usually need to write your algorithm backward, ie iterate over the output, compute where the data come from, use a sampler to get it and affect the output.
+
# Write your operation in the '''process function'''. Here are some hints:
## ROI mean region of interest, it's the area your are currently working on.
+
## GEGL stores data in tiles. This imposes some restrictions, especially for transform operations. You usually need to write your algorithm backwards, i.e. iterate over the output, compute where the data come from, and use a sampler to get it and affect the output.
## Sometimes you need to know the size of the full input, not just the roi. You can have it using gegl_operation_source_get_bounding_box.
+
## '''ROI''' means region of interest. It's the area you are currently working on.
## Rather than carry a lot of parameter in you different functions, you can register a custom structure in the chant system, like the WarpPrivate structure in the warp op.
+
## Sometimes you need to know the size of the full input, not just the ROI. You can have it using '''gegl_operation_source_get_bounding_box'''.
## When you fetch data outside of the input buffer (in it's abyss) you get by default zeroed memory. The abyss policy allow you to chose what you want here, and in particular, you can choose to clamp to the border, loop in the buffer extent ... It allows to write more clever algorithm. For instance, see the ripple op. Setting the abyss policy to GEGL_ABYSS_LOOP add the tileability to the op for free.  
+
## Rather than carrying a lot of parameters in your various functions, you can register a custom aggregate structure in the chant system, like the '''WarpPrivate''' structure in the [https://git.gnome.org/browse/gegl/plain/operations/common/warp.c Warp operation].
# Test your operation. You can use the gegl binary to run an xml file, or use the GEGL tool in GIMP.
+
## If you fetch data from outside of the input buffer (in its '''abyss'''), you get zeroed memory by default. The abyss policy allows you to chose what you want here. In particular you can choose to clamp to the border, loop in the buffer extent, or it allows you to implement a more intelligent algorithm. For instance see the [https://git.gnome.org/browse/gegl/plain/operations/common/ripple.c Ripple operation]. Setting the abyss policy to '''GEGL_ABYSS_LOOP''' adds the tileability to the operation for free.  
 +
# Test your operation. You can use the GEGL binary to run an XML file or use the GEGL tool in GIMP.
 +
 
 +
== GIMP part ==
 +
'''Alternative 1:'''
 +
Use a GeglBuffer to work on. For instance see [https://git.gnome.org/browse/gimp/tree/plug-ins/common/file-aa.c /plug-ins/common/file-aa.c].
 +
 
 +
'''Alternative 2:'''
 +
In your program, create a GEGL graph and let it call gegl_node_process on it. See the column 'GEGL operation' below to see what has already been done in GEGL. For instance, see [https://git.gnome.org/browse/gimp/tree/plug-ins/common/file-gegl.c /plug-ins/common/file-gegl.c].
 +
 
 +
For more inspiration, see the other files that have already been ported.
 +
 
 +
= Porting matrix =
 +
'''Legend'''
 +
 
 +
<u>Columns 'GEGL port', 'OpenCL version':</u>
 +
{|
 +
! scope="col" width="50px" |
 +
|-
 +
| {{no|}} || completely unimplemented yet
 +
|-
 +
| {{wip|  }} || implementation unfinished
 +
|-
 +
| {{yes|  }} || implementation finished, no matter of the test results
 +
|-
 +
| {{unknown| }} || doesn't need porting
 +
|}
 +
 
 +
 
 +
<u>Columns 'Test result':</u>
 +
{|
 +
! scope="col" width="50px" |
 +
|-
 +
| {{no|}} || tests failed (please also describe the failure shortly
 +
in the comment field or link to a Bugzilla bug report)
 +
|-
 +
| {{wip|  }} || tests unfinished
 +
|-
 +
| {{yes|  }} || tests ok
 +
|-
 +
| {{unknown| }} || not tested at all yet
 +
|}
  
= Porting matrix (as of 14.05.2013) =
 
  
 
You can sort the following tables by clicking the little arrow symbol in the column headers. If that doesn't work out of the box, please activate Javascript for this page.
 
You can sort the following tables by clicking the little arrow symbol in the column headers. If that doesn't work out of the box, please activate Javascript for this page.
 +
 +
 +
== GIMP core (Layer modes, Transformation and Color Adjustment Tools) ==
 +
The GIMP core is already migrated to GEGL. See [http://gimpfoo.de/2012/04/17/goat-invasion-in-gimp/ Michael Natterers blogposting] and an [http://libregraphicsworld.org/blog/entry/gimp-2.8-released-next-version-to-get-high-bit-depth-precision article at libgregraphicsworld.org].
  
 
== Processing, color grading and effects ==
 
== Processing, color grading and effects ==
Line 29: Line 76:
 
{| class="wikitable sortable" style="text-align: left;"
 
{| class="wikitable sortable" style="text-align: left;"
 
!'''GIMP filter'''
 
!'''GIMP filter'''
!style="text-align: center;"|[https://git.gnome.org/browse/gimp/log/plug-ins '''GEGL operation''']
+
!style="text-align: center;"|[https://git.gnome.org/browse/gegl/log/operations '''GEGL operation''']
 +
!style="text-align: center;"|[https://git.gnome.org/browse/gimp/log/plug-ins '''GEGL port''']
 +
! style="text-align: center;"| '''Test result'''
 
!style="text-align: center;"|[https://git.gnome.org/browse/gegl/log/opencl '''OpenCL version''']
 
!style="text-align: center;"|[https://git.gnome.org/browse/gegl/log/opencl '''OpenCL version''']
 +
! style="text-align: center;"| '''Test result'''
 
!'''Comment'''
 
!'''Comment'''
 
|-
 
|-
|Alien Map || {{no}} || {{no}} ||
+
|Alien Map || {{yes|alien-map }} || {{yes}} || {{unknown|untested}}||{{yes}} || {{unknown|untested}}||
 
|-
 
|-
|Align Visible Layers || {{no}} || {{no}} ||
+
|<strike>Align Visible Layers </strike>|| {{unknown| }} || {{unknown| }} || {{unknown|}}|| {{unknown|}} ||{{unknown|}}|| Doesn't need porting
 
|-
 
|-
|Antialias || {{unknown}} || {{no}} ||
+
|Animation Playback || {{unknown| }} ||  {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Apply Canvas || {{no}} || {{no}} ||
+
|Antialias || {{yes|antialias }} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Apply Lens || {{no}} || {{no}} ||
+
|Apply Canvas || {{yes|texturize-canvas }} || {{wip}} || {{unknown|untested}}||{{yes}} ||{{unknown|untested}}||texturize-canvas should be more generic and allow any input texture instead of the hard-coded one only.
 
|-
 
|-
|Assign Color Profile || {{no}} || {{no}} ||
+
|Apply Lens || {{yes|apply-lens}} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||get_required_for_output and get_invalidated_by_change methods need a better implementation
 
|-
 
|-
|Autocrop Image || {{no}} || {{no}} ||
+
|Assign Color Profile || {{unknown| }} ||  {{no}} ||{{unknown|untested}}|| {{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Autocrop Layer || {{no}} || {{no}} ||
+
|Autocrop Image || {{unknown| }} || {{yes}} ||{{unknown|untested}}|| {{no}} ||{{unknown|untested}}||Done in core
 
|-
 
|-
|Border Average || {{no}} || {{no}} ||
+
|Autocrop Layer || {{unknown| }} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||Done in core
 
|-
 
|-
|Bump Map || {{no}} || {{no}} ||
+
|Border Average || {{unknown| }} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Cartoon ||{{yes}} || {{no}} ||
+
|Bump Map || {{yes|bump-map }}|| {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Channel Mixer || {{no}} || {{no}} ||
+
|Cartoon || {{wip|cartoon }} || {{wip}} || {{unknown|untested}} ||{{no}} ||{{unknown|untested}}|| Result is a bit different compared to original plugin, because it uses another color format to proceed (Y'CbCr instead of HSL)
 
|-
 
|-
|Checkerboard ||{{yes}} || {{no}} || Missing Psychobilly Option
+
|Channel Mixer || {{yes|channel-mixer }} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|CML Explorer || {{no}} || {{no}} ||
+
|Checkerboard || {{wip|checkerboard }} || {{wip}} || {{unknown|untested}} ||{{no}} || {{unknown|untested}}||Missing Psychobilly Option
 
|-
 
|-
|Color Enhance || {{no}} || {{no}} ||
+
|CML Explorer || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Color Exchange || {{no}} || {{no}} ||
+
|Color Enhance || {{yes|color-enhance}} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Color to Alpha ||{{yes}} || {{no}} ||
+
|Color Exchange || {{yes|color-exchange}} || {{yes}} || {{unknown|untested}}||{{yes}} ||{{unknown|untested}}||
 
|-
 
|-
|Colorcube Analysis || {{no}} || {{no}} ||
+
|Color to Alpha || {{wip|color-to-alpha }} || {{wip}} || {{unknown|untested}}||{{yes}} ||{{unknown|untested}}|| The pdb wrapper needs some more love (see comment in there)
 
|-
 
|-
|Compose || {{no}} || {{no}} ||
+
|Colorcube Analysis || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Convert to Color Profile || {{no}} || {{no}} ||
+
|Compose || {{unknown| }} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}|| Compatibility with 2.8 is currently not maintained : An image decomposed in 2.8 won't be recomposed correctly in 2.10. Also it's inconsistent with gimp's gamma policy. Nobody know who is right currently.
 
|-
 
|-
|Convolution Matrix || {{wip}} || {{no}} ||  
+
|Convert to Color Profile || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Crop Tool ||{{yes}} || {{no}} ||
+
|Convolution Matrix || {{wip|convolution-matrix }} || {{no}} || {{unknown|untested}}||{{no}} || {{unknown|untested}}|| Not sure the wip GEGL operation is the right approach for that op. Shouldn't that matrix be given as an aux input, instead of the chant property ?
 
|-
 
|-
|CSS stylesheet || {{no}} || {{no}} ||
+
|Cubism || {{wip|cubism }} || {{wip}} || {{unknown|untested}}||{{no}} || {{unknown|untested}}|| It doesn't honnor the GeglOperationAreaFilter class properly
 
|-
 
|-
|Cubism || {{wip}} || {{no}} ||  
+
|Curve Bend || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Curve Bend || {{no}} || {{no}} ||
+
|Decompose || {{unknown| }} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}|| inconsistent with gimp's gamma policy currently. Nobody know who is right currently. See also Compose
 
|-
 
|-
|Decompose || {{no}} || {{no}} ||
+
|Deinterlace || {{wip|deinterlace }} || {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}|| The current GEGL implementation is wrong (just try it on a black/white 1px grid), and not sure what the parameter size is for...
 
|-
 
|-
|Deinterlace || {{wip}} || {{no}} ||
+
|Depth Merge || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Depth Merge || {{no}} || {{no}} ||
+
|Despeckle || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Despeckle || {{no}} || {{no}} ||
+
|Destripe || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Destripe || {{no}} || {{no}} ||
+
|Difference of Gaussians || {{wip|difference-of-gaussians }} || {{wip}} || {{unknown|untested}} ||{{no}} || {{unknown|untested}}||The port is missing Normalize and Invert options
 
|-
 
|-
|Difference of Gaussians ||{{yes}} || {{no}} || The port is missing Normalize and Invert options
+
|Diffraction Patterns || {{yes|diffraction-patterns }} || {{yes}} || {{unknown|untested}}||{{yes}} ||{{unknown|untested}}||
 
|-
 
|-
|Diffraction Patterns || {{no}} || {{no}} ||
+
|Dilate || {{unknown| }} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||Provided by the value-propagate operation
 
|-
 
|-
|Dilate || {{no}} || {{no}} ||
+
|Displace || {{yes|displace}} || {{yes}} ||{{unknown|untested}}|| {{wip}} ||{{unknown|untested}}||Is currently being ported by some students as an university project focused on OpenCL. Results can be expected in 2015.
 
|-
 
|-
|Displace || {{no}} || {{no}} ||
+
|Drop Shadow || {{wip|dropshadow }} || {{wip}} || {{unknown|untested}} ||{{no}} || {{unknown|untested}}||Shadow effect only seen in transparent areas inside the layer bounds.
 
|-
 
|-
|Drop Shadow ||{{yes}} || {{no}} || The GEGL port doesn't have an option for the shadow color and doesn't seem to work in the Mac build.
+
|Edge-Detect (Edge...) || {{yes|edge}}  || {{yes}} || {{unknown|untested}}||{{no}} || {{unknown|untested}}||
 
|-
 
|-
|Edge... || {{no}} || {{no}} ||  
+
|Edge-Detect (Laplace) || {{yes|edge-laplace}} || {{yes}} || {{unknown|untested}}||{{yes}} ||{{unknown|untested}}||
 
|-
 
|-
|Emboss || {{wip}} || {{no}} ||
+
|Edge-Detect (Neon) || {{unknown| }} || {{no}} ||{{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Engrave || {{no}} || {{no}} ||
+
|Edge-Detect (Sobel) || {{wip|edge-sobel}} || {{wip}} ||{{unknown|untested}}||{{yes}} ||{{unknown|untested}}||
 
|-
 
|-
|Erode || {{no}} || {{no}} ||
+
|Emboss || {{wip|emboss }} || {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Filmstrip || {{no}} || {{no}} ||
+
|Engrave || {{yes|engrave }} || {{yes}} ||{{unknown|untested}}|| {{wip}} ||{{unknown|untested}}||Is currently being ported by some students as an university project focused on OpenCL. Results can be expected in 2015.
 
|-
 
|-
|Filterpack || {{no}} || {{no}} ||
+
|Erode || {{unknown| }} || {{yes}} ||{{unknown|untested}}|| {{no}} ||{{unknown|untested}}||Provided by the value-propagate operation
 
|-
 
|-
|Flame || {{no}} || {{no}} ||
+
|Filmstrip || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Foreground Select Tool ||{{wip}} || {{no}} || See patches to bugs #699780 and #699834.
+
|Filterpack || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Fractal Explorer ||{{yes}} || {{no}} ||
+
|Flame || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Fractal Trace || {{wip}} || {{no}} ||
+
|Fractal Explorer || {{wip|fractal-explorer}} || {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|From Webpage || {{no}} || {{no}} || Probably doesn't need porting
+
|Fractal Trace || {{wip|fractal-trace}} || {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Gaussian blur ||{{yes}} ||{{yes}} || Needs abyss policy
+
|<strike>From Webpage</strike>|| {{unknown| }} || {{unknown| }} || {{unknown|untested}}||{{unknown| }} || {{unknown| }}||Doesn't need porting
 
|-
 
|-
|Gfig || {{no}} || {{no}} || Probably doesn't need porting
+
|Gaussian blur || {{wip|gaussian-blur}} || {{wip}} ||{{unknown|untested}}||{{wip}} || {{unknown|untested}}||https://bugzilla.gnome.org/show_bug.cgi?id=721396
 
|-
 
|-
|GIMPressionist || {{no}} || {{no}} ||
+
|<strike>Gfig</strike> || {{unknown| }} || {{unknown| }} || {{unknown| }}||{{unknown| }} || {{unknown| }}||Doesn't need porting
 
|-
 
|-
|Glass Tile || {{no}} || {{no}} ||
+
|GIMPressionist || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Gradient Flare || {{no}} || {{no}} ||
+
|Glass Tile || {{yes|tile-glass }} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Gradient Map || {{no}} || {{no}} ||
+
|Gradient Flare || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Grey ||{{yes}} ||{{yes}} ||
+
|Gradient Map || {{unknown| }} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||Ported as a gimp plug-in
 
|-
 
|-
|Grid ||{{yes}} || {{no}} || Missing intersection option, is it needed ?
+
|Grey || {{wip|grey}} || {{no}} ||{{unknown|untested}}||{{yes}} ||{{unknown|untested}}||Similar to the Desaturation tool, but without its options
 
|-
 
|-
|Hot || {{no}} || {{no}} ||
+
|Grid || {{wip|grid }} || {{wip}} || {{unknown|untested}}||{{no}} || {{unknown|untested}}||Missing intersection option, is it needed ?
 
|-
 
|-
|HSV Noise ||{{yes}} || {{no}} ||
+
|Hot || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Hurl ||{{yes}} || {{no}} ||
+
|IFS Fractal || {{unknown| }} || {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|IFS Fractal || {{no}} || {{no}} ||
+
|Illusion || {{yes|illusion}} || {{yes}} || {{yes}}||{{wip}} ||{{unknown|untested}}||Is currently being ported by some students as an university project focused on OpenCL. Results can be expected in 2015.
 
|-
 
|-
|Illusion || {{no}} || {{no}} ||
+
|Image Map || {{unknown| }} ||  {{no}} ||{{unknown|untested}}|| {{no}} || {{unknown|untested}}||Deprecated code has to be ported to gegl (GimpDrawable, GimpPixelRgn, ...)
 
|-
 
|-
|Image Map || {{no}} || {{no}} || Probably doesn't need porting
+
|Invert || {{wip|invert-gamma }} || {{no}} ||{{unknown|untested}}||{{yes}} ||{{unknown|untested}}||The pdb documentation needs to be updated. Apart from that it's done.
 
|-
 
|-
|Invert ||{{yes}} ||{{yes}} ||
+
|<strike> iWarp </strike> || {{unknown| }} || {{unknown| }} || {{unknown| }}|| {{unknown| }} || {{unknown| }}||To be replaced with Warp Transform tool
 
|-
 
|-
|iWarp || {{no}} || {{no}} || To be replaced with Warp Transform tool
+
|Jigsaw || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Java map || {{no}} || {{no}} || Probably doesn't need porting
+
|Lens Distortion || {{yes|lens-distortion }} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Jigsaw || {{no}} || {{no}} ||
+
|Lens Flare || {{yes|lens-flare }} ||  {{yes}} || {{yes}} ||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Laplace ||{{yes}} || {{no}} ||
+
|Lighting Effects || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Lens Distortion ||{{yes}} || {{no}} ||
+
|Make Seamless || {{yes|tile-seamless }} ||  {{yes}} ||{{unknown|untested}}|| {{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Lens Flare || {{no}} || {{no}} ||
+
|<strike>Maximum RGB</strike> || {{unknown| }} || {{unknown| }} || {{unknown| }}|| {{unknown| }} || {{unknown| }}||Will be removed without replacement
 
|-
 
|-
|Levels Tool ||{{yes}} ||{{yes}} ||
+
|Maze || {{yes|maze}} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Lighting Effects || {{no}} || {{no}} ||
+
|Mosaic || {{wip|mosaic }} ||  {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}|| The GEGL op tries to allocate the whole input.
 
|-
 
|-
|Make Seamless || {{no}} || {{no}} ||
+
|Motion Blur (circular)|| {{wip|motion-blur-circular}} ||  {{yes}} || {{unknown|untested}} ||{{no}} || {{unknown|untested}}||Is allocating the whole input
 
|-
 
|-
|Maximum RGB || {{no}} || {{no}} || Will be removed without replacement
+
|Motion Blur (linear)|| {{wip|motion-blur-linear}} || {{yes}} || {{unknown|untested}} ||{{yes}} || {{unknown|untested}}||Is allocating the whole input
 
|-
 
|-
|Maze || {{no}} || {{no}} ||
+
|Motion Blur (zoom) || {{wip|motion-blur-zoom}} ||  {{yes}} || {{unknown|untested}} ||{{no}} || {{unknown|untested}}||Is allocating the whole input
 
|-
 
|-
|Mosaic || {{no}} || {{no}} ||
+
|Newsprint || {{yes|newsprint}} ||  {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}|| Reimplementation of scratch of most of the functionality of GIMP's newsprint plug-in with additional color based modulation of halftoned results. More documentation/exampels of this op will appear at https://pippin.gimp.org/spachrotyzer/
 
|-
 
|-
|Motion Blur ||{{yes}} ||{{yes}} || The GEGL port is incomplete (no type and center selection)
+
|NL Filter || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Neon || {{no}} || {{no}} ||
+
|Noise (HSV Noise) || {{yes|noise-hsv}} || {{yes}} || {{unknown|untested}}||{{yes}} ||{{unknown|untested}}||The GEGL implementation is not strictly identical to the legacy one, but similar enough...
 
|-
 
|-
|Newsprint || {{no}} || {{no}} ||
+
|Noise (Hurl) || {{yes|noise-hurl }} || {{yes}} || {{yes}}||{{yes}} ||{{yes}}||
 
|-
 
|-
|NL Filter || {{no}} || {{no}} ||
+
|Noise (Pick) || {{yes|noise-pick }} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Normalize || {{no}} || {{no}} ||
+
|Noise (RGB Noise) || {{wip|noise-rgb }} || {{wip}} ||{{unknown|untested}}|| {{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Noise Spread || {{wip}} || {{no}} ||
+
|Noise (Slur) || {{yes|noise-slur}} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Oilify ||{{yes}} ||{{yes}} ||
+
|Noise (Spread) || {{yes|noise-spread}} || {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Optimize (Difference) || {{no}} || {{no}} ||
+
|Normalize || {{unknown| }} ||  {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||Provided by the stretch-contrast operation when "keep colors" is checked
 
|-
 
|-
|Optimize (for GIF) || {{no}} || {{no}} ||
+
|Oilify || {{wip|oilify }} || {{wip}} ||{{unknown|untested}}||{{yes}} ||{{unknown|untested}}||
 
|-
 
|-
|Pagecurl || {{no}} || {{no}} ||
+
|Optimize (Difference) || {{unknown| }} ||  {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Palette Map || {{no}} || {{no}} ||
+
|Optimize (for GIF) || {{unknown| }} ||  {{no}} ||{{unknown|untested}}|| {{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Paper Tile || {{no}} || {{no}} ||
+
|Pagecurl || {{unknown| }} ||  {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Photocopy ||{{yes}} || {{no}} ||
+
|Palette Map || {{unknown| }} ||  {{yes}} ||{{unknown|untested}}|| {{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Pick ||{{yes}} || {{no}} ||
+
|Paper Tile || {{yes|tile-paper}} ||  {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Pixelize ||{{yes}} ||{{yes}} || Needs abyss policy
+
|Photocopy || {{wip|photocopy }} || {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Plasma || {{wip}} || {{no}} ||
+
|Pixelize || {{yes|pixelize }} || {{yes}} ||{{unknown|untested}}||{{yes}} || {{unknown|untested}}||
 
|-
 
|-
|Playback || {{no}} || {{no}} || Probably doesn't have to be ported ?
+
|Plasma || {{yes|plasma }} ||  {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Polar Coordinates ||{{yes}} || {{no}} ||
+
|Polar Coordinates || {{wip|polar-coordinates}} || {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}|| Currently renders partially garbage
 
|-
 
|-
|Posterize Tool ||{{yes}} || {{no}} ||
+
|Qbist || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Qbist || {{no}} || {{no}} ||
+
|Rearrange Colormap || {{unknown| }} ||  {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}|| Not to be confused with GEGL's 'remap' operation.
 
|-
 
|-
|Recompose || {{no}} || {{no}} ||
+
|Recompose || {{unknown| }} ||  {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}|| See compose
 
|-
 
|-
|Red Eye Removal || {{wip}} || {{no}} ||
+
|Red Eye Removal || {{wip|red-eye-removal }} || {{wip}} || {{unknown|untested}}||{{yes}} ||{{unknown|untested}}||
 
|-
 
|-
|Retinex || {{no}} || {{no}} ||
+
|Retinex || {{unknown| }} ||  {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|RGB Noise ||{{yes}} || {{no}} ||
+
|Ripple || {{yes|ripple}} || {{yes}} || {{unknown|untested}}||{{no}} || {{unknown|untested}} ||  
 
|-
 
|-
|Ripple ||{{yes}} || {{no}} || Complete in abyss branch
+
|Rotate Colors || {{wip|color-rotate}} || {{no}} || {{unknown|untested}}|| {{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Rotate Colors || {{wip}} || {{no}} ||
+
|Sample Colorize || {{unknown| }} || {{no}} ||  {{unknown|untested}}|| {{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Sample Colorize || {{no}} || {{no}} ||
+
|Screenshot || {{unknown| }} ||  {{yes}} ||  {{unknown|untested}}|| {{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Selective Gaussian Blur || {{no}} || {{no}} ||
+
|Selection to Path || {{unknown| }} ||  {{yes}} ||  {{unknown|untested}}|| {{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Shift ||{{yes}} || {{no}} ||
+
|Selective Gaussian Blur || {{yes|gaussian-blur-selective }} || {{yes}} || {{unknown|untested}}||{{yes}} ||{{unknown|untested}}||
 
|-
 
|-
|Sinus || {{no}} || {{no}} ||
+
|Set Colormap || {{unknown| }} ||  {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}|| Not to be confused with GEGL's 'remap' operation.
 
|-
 
|-
|Slur ||{{yes}} || {{no}} ||
+
|Shift || {{yes|shift }} || {{yes}} || {{yes}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Smooth Palette || {{no}} || {{no}} ||
+
|Sinus || {{yes|sinus}} ||  {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Sobel ||{{yes}} ||{{yes}} ||
+
|Smooth Palette || {{unknown| }} ||  {{wip}} ||{{unknown|untested}}|| {{yes}} ||{{unknown|untested}}|| See https://bugzilla.gnome.org/show_bug.cgi?id=774807 and https://bugzilla.gnome.org/show_bug.cgi?id=749220
 
|-
 
|-
|Softglow ||{{yes}} || {{no}} ||
+
|Softglow || {{wip|softglow }} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||Also it uses a different intensity function (Y' instead of (max(R', G', B') + min (R', G', B')) / 2). I suggest the new behaviour is better.
 
|-
 
|-
|Solid Noise || {{no}} || {{no}} ||
+
|Solid Noise || {{yes|noise-solid| }} ||  {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Sparkle || {{no}} || {{no}} ||
+
|Sparkle || {{wip|sparkle }} || {{wip}} || {{unknown|untested}}||{{wip}} ||{{unknown|untested}}||Is currently being ported by some students as an university project focused on OpenCL. Results can be expected in 2015.
 
|-
 
|-
|Sphere Designer || {{no}} || {{no}} ||
+
|Sphere Designer || {{unknown| }} ||  {{no}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Spread ||{{yes}} || {{no}} ||
+
|Stretch Contrast || {{yes|stretch-contrast}} || {{yes}} || {{yes}}||{{yes}} || {{yes}}||
 
|-
 
|-
|Stretch Contrast ||{{yes}} || {{no}} || Not sure we need that with GEGL being the core of GIMP
+
|Stretch HSV || {{yes|stretch-contrast-hsv}} ||  {{yes}} || {{yes}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Stretch HSV || {{no}} || {{no}} ||
+
|Supernova || {{yes|supernova}} ||  {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Supernova || {{no}} || {{no}} ||
+
|Tile || {{yes|tile}} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||Kept as a gimp plug-in to resize drawables or create new image ; use gegl:tile operation internally.
 
|-
 
|-
|Transform Tools (Rotate, Scale, Shear, Translate) ||{{yes}} || {{no}} ||
+
|Unoptimize || {{unknown| }} || {{no}} ||{{unknown|untested}}|| {{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Threshold Tool ||{{yes}} ||{{yes}} || The GEGL port misses setting the upper bound (=the right slider triangle in the GIMP tool).
+
|Unsharp Mask || {{wip|unsharp-mask}} || {{wip}} ||{{unknown|untested}}|| {{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Tile ||{{yes}} || {{no}} ||
+
|Value Invert || {{wip|value-invert}} || {{wip}} ||{{unknown|untested}}||{{yes}} ||{{unknown|untested}}||
 
|-
 
|-
|Unoptimize || {{no}} || {{no}} ||
+
|Value Propagate || {{yes|value-propagate }} ||  {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Unsharp Mask ||{{yes}} || {{no}} ||
+
|Van Gogh (LIC) || {{unknown| }} || {{no}} || {{unknown|untested}}||{{no}} || {{unknown|untested}}||The filter has nothing to do with van-Gogh-style art and has no obvious function. We should remove it.
 
|-
 
|-
|Value Invert ||{{yes}} ||{{yes}} ||
+
|Video || {{yes|video-degradation }} || {{yes}} || {{unknown|untested}}||{{yes}} ||{{unknown|untested}}||
 
|-
 
|-
|Value Propagate || {{no}} || {{no}} ||
+
|Waves || {{wip|waves }} || {{wip}} ||{{unknown|untested}}|| {{no}} || {{unknown|untested}}||Missing reflective option that produce strange result, I suggest dropping that.
 
|-
 
|-
|Van Gogh (LIC) || {{no}} || {{no}} || The filter has nothing to do with van-Gogh-style art and has no obvious function. We should remove it.
+
|Whirl and Pinch || {{wip|whirl-pinch}} || {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Video || {{no}} || {{no}} ||
+
|Wind || {{yes|wind }} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
|Warp || {{wip}} || {{no}} ||
+
|Zealous Crop || {{unknown|N/A}} || {{yes}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}|| Zealous Crop can't be performed as a GEGL operation because get_bounding_box depends on the image content. It was ported as a gimp plugin instead.
|-
+
|Waves ||{{yes}} || {{no}} || Missing reflective option that produce strange result, I suggest dropping that.
+
|-
+
|Whirl and Pinch || {{wip}} || {{no}} ||
+
|-
+
|Wind ||{{yes}} || {{no}} ||
+
|-
+
|Zealous Crop || {{unknown}} || {{no}} ||
+
 
|}
 
|}
  
== File loaders/savers ==
+
== Display filters ==
  
 
{| class="wikitable sortable" style="text-align: left;"
 
{| class="wikitable sortable" style="text-align: left;"
! '''GIMP filter'''  
+
!'''Display filter'''
! [https://git.gnome.org/browse/gimp/log/plug-ins '''GEGL version''']
+
!style="text-align: center;"|[https://git.gnome.org/browse/gimp/log/modules '''GEGL port''']
! '''Comment'''
+
! style="text-align: center;"| '''Test result'''
 +
!style="text-align: center;"|[https://git.gnome.org/browse/gegl/log/opencl '''OpenCL version''']
 +
! style="text-align: center;"| '''Test result'''
 +
!'''Comment'''
 
|-
 
|-
| file-aa || {{yes}} ||  
+
| Color deficient vision|| {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||  
 
|-
 
|-
| file-bmp || {{yes}} ||
+
| Color management || {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
| file-cel || {{yes}} ||
+
| Color proof|| {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
| file-csource || {{yes}} ||
+
| Contrast|| {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
 
|-
 
|-
| file-desktop-link || {{yes|doesn't need to be ported}} ||
+
| Gamma|| {{wip}} || {{unknown|untested}}||{{no}} ||{{unknown|untested}}||
|-
+
| file-dicom || {{yes}} ||
+
|-
+
| file-exr-load || {{yes}} ||
+
|-
+
| file-exr-save || {{yes}} || -
+
|-
+
| file-faxg3 || {{yes}} ||
+
|-
+
| file-fits || {{yes}} ||
+
|-
+
| file-fli || {{yes}} ||
+
|-
+
| file-gbr || {{yes}} ||
+
|-
+
| file-gif-load || {{yes}} ||
+
|-
+
| file-gif-save || {{yes}} ||
+
|-
+
| file-gih || {{yes}} ||
+
|-
+
| file-glob || {{no}} || for file globbing -> is GEGL-port necessary?
+
|-
+
| file-header || {{yes}} ||
+
|-
+
| file-html-table || {{yes}} ||
+
|-
+
| file-ico || {{yes}} ||
+
|-
+
| file-jp2-load || {{yes}} || -
+
|-
+
| file-jpeg || {{yes}} || -
+
|-
+
| file-mng || {{yes}} ||
+
|-
+
| file-pat || {{yes}} ||
+
|-
+
| file-pcx || {{yes}} ||
+
|-
+
| file-pdf-load || {{no}} || -
+
|-
+
| file-pdf-save || {{yes}} ||
+
|-
+
| file-pix || {{yes}} ||
+
|-
+
| file-png || {{yes}} || -
+
|-
+
| file-pnm || {{yes}} || -
+
|-
+
| file-ps || {{wip}} || -
+
|-
+
| file-psd || {{no}} || -
+
|-
+
| file-psp || {{yes}} ||
+
|-
+
| file-raw || {{no}} || see GEGL-op gegl:raw-load
+
|-
+
| file-sgi || {{yes}} ||
+
|-
+
| file-sunras || {{no}} || -
+
|-
+
| file-svg || {{no}} || extra GEGL-op gegl:svg-load exists for loading SVG and SVGZ format
+
|-
+
| file-tga || {{yes}} ||
+
|-
+
| file-tiff-load || {{yes}} ||
+
|-
+
| file-tiff-save || {{no}} ||
+
|-
+
| file-wmf || {{no}} || -
+
|-
+
| file-xbm || {{yes}} ||
+
|-
+
| file-xmc || {{no}} || -
+
|-
+
| file-xpm || {{yes}} ||
+
|-
+
| file-xwd || {{no}} || -
+
 
|}
 
|}
  
== New File loaders/savers ==
 
  
These file loaders/savers are implemented in GEGL, but not part of GIMP (yet).
+
= Port of new GEGL ops to OpenCL=
Currently they are listed here for completeness.
+
  
 
{| class="wikitable sortable" style="text-align: left;"
 
{| class="wikitable sortable" style="text-align: left;"
!'''GEGL filter'''  
+
!'''GEGL operation'''  
! [https://git.gnome.org/browse/gimp/log/plug-ins '''GIMP filter''' ]
+
! [https://git.gnome.org/browse/gegl/log/opencl '''OpenCL version''']  
! '''Comment'''
+
! style="text-align: center;"| '''Test result'''
 +
!'''Comment'''
 
|-
 
|-
|ff-load || {{no}} || FFmpeg video frame importer
+
|Bilateral filter ||{{yes}} || {{unknown|untested}}||
 
|-
 
|-
|ff-save || {{no}} || FFmpeg video frame output sink. GEGL op is work in progress.
+
|Box blur ||{{yes}} || {{unknown|untested}}||
 
|-
 
|-
|rawbayer-load || {{no}} ||  RAWBAYER and RAWBAYERS format. GEGL op is work in progress
+
|Box max || {{yes}} ||  {{unknown|untested}}||GEGL op is work in progress.
 
|-
 
|-
|rgbe-load || {{no}} || for Radiance HDR format with extensions HDR and PIC
+
|Box min || {{yes}} || {{unknown|untested}}||GEGL op is work in progress.
 
|-
 
|-
|rgbe-save || {{no}} || for Radiance HDR format with extensions HDR and PIC
+
|Box percentile || {{no}} || {{unknown|untested}}||GEGL op is work in progress.
 
|-
 
|-
|svg-load || {{no}} || for SVG and SVGZ format
+
|Brightness and Contrast ||{{yes}} || {{unknown|untested}}||
|}
+
 
+
= Port of new GEGL ops to OpenCL=
+
 
+
{| class="wikitable sortable" style="text-align: left;"
+
!'''GEGL operation'''
+
! [https://git.gnome.org/browse/gegl/log/opencl '''OpenCL version''']
+
!'''Comment'''
+
 
|-
 
|-
|Bilateral filter ||{{yes}} ||  
+
|Buffer cache  || {{no}} || {{unknown|untested}}||GEGL op is work in progress. Does this need an OpenCL port?
 
|-
 
|-
|Box blur ||{{yes}} ||  
+
|C2g ||{{yes}} || {{unknown|untested}}||HDR related
 
|-
 
|-
|Box max || {{no}} || GEGL op is work in progress.
+
|Cell Noise || {{yes}} || {{unknown|untested}}||
 
|-
 
|-
|Box min || {{no}} || GEGL op is work in progress.
+
|Checkerboard || {{yes}} || {{unknown|untested}}||
 
|-
 
|-
|Box percentile || {{no}} || GEGL op is work in progress.
+
|Cielch Noise || {{no}} || {{unknown|untested}}||
 
|-
 
|-
|Brightness and Contrast ||{{yes}} ||  
+
|Color || {{no}} || {{unknown|untested}}||
 
|-
 
|-
|Buffer cache  || {{no}} || GEGL op is work in progress. Does this need an OpenCL port?
+
|Color Reduction || {{no}} || {{unknown|untested}}||
 
|-
 
|-
|C2g ||{{yes}} || HDR related
+
|Color Temperature ||{{yes}} || {{unknown|untested}}||
 
|-
 
|-
|Cielch Noise || {{no}} ||  
+
|Contrast Curve || {{wip}} || {{unknown|untested}}||
 
|-
 
|-
|Color || {{no}} ||  
+
|Demosaic (bimedian) || {{no}} || {{unknown|untested}}|| GEGL op is work in progress.
 
|-
 
|-
|Color Reduction || {{no}} ||  
+
|Demosaic (simple) || {{no}} || {{unknown|untested}}||GEGL op is work in progress.
 
|-
 
|-
|Color Temperature ||{{yes}} ||  
+
|Disc percentile || {{no}} || {{unknown|untested}}||GEGL op is work in progress.
 
|-
 
|-
|Contrast Curve || {{no}} ||  
+
|Display || {{no}} || {{unknown|untested}}||Does this need an OpenCL port?
 
|-
 
|-
|Demosaic (bimedian) || {{no}} ||  GEGL op is work in progress.
+
|Ditto || {{no}} ||  {{unknown|untested}}||GEGL op is work in progress. Test op - does this need an OpenCL port?
 
|-
 
|-
|Demosaic (simple) || {{no}} ||  GEGL op is work in progress.
+
|Exp combine || {{no}} ||  {{unknown|untested}}||HDR related
 
|-
 
|-
|Disc percentile || {{no}} || GEGL op is work in progress.
+
|Exposure || {{no}} || {{unknown|untested}}|| HDR related
 
|-
 
|-
|Display || {{no}} ||  Does this need an OpenCL port?
+
|Fattal02 || {{no}} ||  {{unknown|untested}}||HDR related
 
|-
 
|-
|Ditto || {{no}} ||  GEGL op is work in progress. Test op - does this need an OpenCL port?
+
|gluas || {{no}} ||  {{unknown|untested}}||GEGL op is work in progress. Does this need an OpenCL port?
 
|-
 
|-
|Dot || {{no}} ||
+
|Gnomonic projection || {{no}} || {{unknown|untested}}
 
|-
 
|-
|Exp combine || {{no}} ||  HDR related
+
|HStack || {{no}} ||  {{unknown|untested}}||GEGL op is work in progress.
 
|-
 
|-
|Exposure || {{no}} ||  HDR related
+
|Hue-Chroma || {{yes}} ||  {{unknown|untested}}||
 
|-
 
|-
|Fattal02 || {{no}} || HDR related
+
|Image compare || {{no}} ||{{unknown|untested}}||
 
|-
 
|-
|gluas || {{no}} || GEGL op is work in progress. Does this need an OpenCL port?
+
|Ink simulator || {{no}} ||{{unknown|untested}}||
 
|-
 
|-
|HStack || {{no}} ||  GEGL op is work in progress.
+
|Introspect || {{no}} ||  {{unknown|untested}}||Does this need an OpenCL port?
 
|-
 
|-
|Image compare || {{no}} ||
+
|Kuwahara || {{no}} || {{unknown|untested}}||GEGL op is work in progress.
 
|-
 
|-
|Introspect || {{no}} ||  Does this need an OpenCL port?
+
|Lens correction || {{no}} ||  {{unknown|untested}}||GEGL op is work in progress.
 
|-
 
|-
|Kuwahara || {{no}} ||  GEGL op is work in progress.
+
|Line profile || {{no}} ||  {{unknown|untested}}||GEGL op is work in progress.
 
|-
 
|-
|Lens correction || {{no}} ||  GEGL op is work in progress.
+
|Linear gradient || {{no}} ||  {{unknown|untested}}||GEGL op is work in progress.
 
|-
 
|-
|Line profile || {{no}} ||  GEGL op is work in progress.
+
|Mandelbrot || {{no}} ||  {{unknown|untested}}||GEGL op is work in progress.
 
|-
 
|-
|Linear gradient || {{no}} ||  GEGL op is work in progress.
+
|Mantiuk06 || {{no}} ||  {{unknown|untested}}||HDR related
 
|-
 
|-
|Mandelbrot || {{no}} || GEGL op is work in progress.
+
|Mirrors || {{no}} || {{unknown|untested}}||
 
|-
 
|-
|Mantiuk06 || {{no}} || HDR related
+
|Mono mixer ||{{yes}} || {{unknown|untested}}||
 
|-
 
|-
|Mirrors || {{no}} ||  
+
|Noise || {{no}} || {{unknown|untested}}||Perlin noise generator
 
|-
 
|-
|Mono mixer ||{{yes}} ||  
+
|Noise Reduction ||{{yes}} || {{unknown|untested}}||
 
|-
 
|-
|Noise || {{no}} ||  Perlin noise generator
+
|Over || {{no}} ||  {{unknown|untested}}||Porter Duff operation over (d = cA + cB * (1 - aA))
 
|-
 
|-
|Noise Reduction ||{{yes}} ||  
+
|Radial gradient || {{no}} || {{unknown|untested}}||GEGL op is work in progress.
 
|-
 
|-
|Over || {{no}} ||  Porter Duff operation over (d = cA + cB * (1 - aA))
+
|Reinhard05 ||{{yes}} ||  {{unknown|untested}}||HDR related
 
|-
 
|-
|Radial gradient || {{no}} || GEGL op is work in progress.
+
|Remap || {{no}} || {{unknown|untested}}||
 
|-
 
|-
|Reinhard05 ||{{yes}} || HDR related
+
|Shadows-Highlights ||{{yes}} || {{unknown|untested}}||
 
|-
 
|-
|Remap || {{no}} ||  
+
|SNN (mean) ||{{yes}} || {{unknown|untested}}||
 
|-
 
|-
|SNN (mean) ||{{yes}} ||  
+
|SNN (percentile) || {{no}} || {{unknown|untested}}||GEGL op is work in progress.
 
|-
 
|-
|SNN (percentile) || {{no}} ||  GEGL op is work in progress.
+
|Stereographic projection || {{no}} ||  {{unknown|untested}}
 
|-
 
|-
|SVG Hue rotate|| {{no}} ||  
+
|SVG Hue rotate|| {{no}} || {{unknown|untested}}||
 
|-
 
|-
|SVG Luminance to Alpha || {{no}} ||  
+
|SVG Luminance to Alpha || {{no}} || {{unknown|untested}}||
 
|-
 
|-
|SVG Matrix || {{no}} ||  
+
|SVG Matrix || {{no}} || {{unknown|untested}}||
 
|-
 
|-
|SVG Saturate || {{no}} ||  
+
|SVG Saturate || {{no}} || {{unknown|untested}}||
 
|-
 
|-
|Unpremul || {{no}} ||  GEGL op is work in progress.  
+
|Unpremul || {{no}} ||  {{unknown|untested}}||GEGL op is work in progress.  
 
|-
 
|-
|Vignette ||{{yes}} ||  
+
|Vignette ||{{yes}} || {{unknown|untested}}||
 
|-
 
|-
|Weighted Blend || {{no}} ||  
+
|Weighted Blend || {{yes}} || {{unknown|untested}}||
 
|}
 
|}

Latest revision as of 11:17, 24 April 2018

Last updated: see tab 'history'

How to port

GEGL part

This is the general process for writing a new GEGL operation:

  1. Gather information:
    1. Go over the source code of the plugin you wish to port. Understand the algorithm it implements.
    2. Read the GEGL website carefully. There is lot of information there.
    3. Read the babl website. Understand the differences between color models.
    4. You may wish to find a similar existing operation and get inspiration from it.
  2. Choose a base class. This is the general structure of your operation, the number of inputs and outputs, and what kind of optimizations GEGL can do.
  3. Create a new file for your operation. The exact directory where you should put your file into is explained at GEGL's website.
  4. Register the operation in Makefile.am. Exactly how this is done depends on which directory you're placing your files into. For operations in operations/common/ (should be most operations), you need to add a single line mentioning your operation to the variable op_LTLIBRARIES. For example, if your c file is named edge.c, you would add a line that says "edge.la \". Please keep it in alphabetical order.
  5. Copy another operation with the same base class and clean it up to have your operation skeleton. GEGL uses a macro system called GEGL chant. It makes it unnecessary for you to write all the GObject boilerplate, and eases your work registering parameters for your operation. Look at other operations to see how it works.
  6. Use the prepare function to specify which color model your op will operate with for each input/output.
  7. Create your operation's parameters using the chant system. You can have integer, floats, string, color, curve, enum ... There are some predefined enums in the GEGL core, for instance GeglSamplerType. You can register your own like in the Ripple op.
  8. Write your operation in the process function. Here are some hints:
    1. GEGL stores data in tiles. This imposes some restrictions, especially for transform operations. You usually need to write your algorithm backwards, i.e. iterate over the output, compute where the data come from, and use a sampler to get it and affect the output.
    2. ROI means region of interest. It's the area you are currently working on.
    3. Sometimes you need to know the size of the full input, not just the ROI. You can have it using gegl_operation_source_get_bounding_box.
    4. Rather than carrying a lot of parameters in your various functions, you can register a custom aggregate structure in the chant system, like the WarpPrivate structure in the Warp operation.
    5. If you fetch data from outside of the input buffer (in its abyss), you get zeroed memory by default. The abyss policy allows you to chose what you want here. In particular you can choose to clamp to the border, loop in the buffer extent, or it allows you to implement a more intelligent algorithm. For instance see the Ripple operation. Setting the abyss policy to GEGL_ABYSS_LOOP adds the tileability to the operation for free.
  9. Test your operation. You can use the GEGL binary to run an XML file or use the GEGL tool in GIMP.

GIMP part

Alternative 1: Use a GeglBuffer to work on. For instance see /plug-ins/common/file-aa.c.

Alternative 2: In your program, create a GEGL graph and let it call gegl_node_process on it. See the column 'GEGL operation' below to see what has already been done in GEGL. For instance, see /plug-ins/common/file-gegl.c.

For more inspiration, see the other files that have already been ported.

Porting matrix

Legend

Columns 'GEGL port', 'OpenCL version':

completely unimplemented yet
implementation unfinished
implementation finished, no matter of the test results
doesn't need porting


Columns 'Test result':

tests failed (please also describe the failure shortly

in the comment field or link to a Bugzilla bug report)

tests unfinished
tests ok
not tested at all yet


You can sort the following tables by clicking the little arrow symbol in the column headers. If that doesn't work out of the box, please activate Javascript for this page.


GIMP core (Layer modes, Transformation and Color Adjustment Tools)

The GIMP core is already migrated to GEGL. See Michael Natterers blogposting and an article at libgregraphicsworld.org.

Processing, color grading and effects

GIMP filter GEGL operation GEGL port Test result OpenCL version Test result Comment
Alien Map alien-map Yes untested Yes untested
Align Visible Layers Doesn't need porting
Animation Playback Yes untested No untested
Antialias antialias Yes untested No untested
Apply Canvas texturize-canvas work in progress untested Yes untested texturize-canvas should be more generic and allow any input texture instead of the hard-coded one only.
Apply Lens apply-lens Yes untested No untested get_required_for_output and get_invalidated_by_change methods need a better implementation
Assign Color Profile No untested No untested
Autocrop Image Yes untested No untested Done in core
Autocrop Layer Yes untested No untested Done in core
Border Average Yes untested No untested
Bump Map bump-map Yes untested No untested
Cartoon cartoon work in progress untested No untested Result is a bit different compared to original plugin, because it uses another color format to proceed (Y'CbCr instead of HSL)
Channel Mixer channel-mixer Yes untested No untested
Checkerboard checkerboard work in progress untested No untested Missing Psychobilly Option
CML Explorer No untested No untested
Color Enhance color-enhance Yes untested No untested
Color Exchange color-exchange Yes untested Yes untested
Color to Alpha color-to-alpha work in progress untested Yes untested The pdb wrapper needs some more love (see comment in there)
Colorcube Analysis No untested No untested
Compose Yes untested No untested Compatibility with 2.8 is currently not maintained : An image decomposed in 2.8 won't be recomposed correctly in 2.10. Also it's inconsistent with gimp's gamma policy. Nobody know who is right currently.
Convert to Color Profile No untested No untested
Convolution Matrix convolution-matrix No untested No untested Not sure the wip GEGL operation is the right approach for that op. Shouldn't that matrix be given as an aux input, instead of the chant property ?
Cubism cubism work in progress untested No untested It doesn't honnor the GeglOperationAreaFilter class properly
Curve Bend No untested No untested
Decompose Yes untested No untested inconsistent with gimp's gamma policy currently. Nobody know who is right currently. See also Compose
Deinterlace deinterlace work in progress untested No untested The current GEGL implementation is wrong (just try it on a black/white 1px grid), and not sure what the parameter size is for...
Depth Merge No untested No untested
Despeckle No untested No untested
Destripe No untested No untested
Difference of Gaussians difference-of-gaussians work in progress untested No untested The port is missing Normalize and Invert options
Diffraction Patterns diffraction-patterns Yes untested Yes untested
Dilate Yes untested No untested Provided by the value-propagate operation
Displace displace Yes untested work in progress untested Is currently being ported by some students as an university project focused on OpenCL. Results can be expected in 2015.
Drop Shadow dropshadow work in progress untested No untested Shadow effect only seen in transparent areas inside the layer bounds.
Edge-Detect (Edge...) edge Yes untested No untested
Edge-Detect (Laplace) edge-laplace Yes untested Yes untested
Edge-Detect (Neon) No untested No untested
Edge-Detect (Sobel) edge-sobel work in progress untested Yes untested
Emboss emboss work in progress untested No untested
Engrave engrave Yes untested work in progress untested Is currently being ported by some students as an university project focused on OpenCL. Results can be expected in 2015.
Erode Yes untested No untested Provided by the value-propagate operation
Filmstrip No untested No untested
Filterpack No untested No untested
Flame No untested No untested
Fractal Explorer fractal-explorer work in progress untested No untested
Fractal Trace fractal-trace work in progress untested No untested
From Webpage untested Doesn't need porting
Gaussian blur gaussian-blur work in progress untested work in progress untested https://bugzilla.gnome.org/show_bug.cgi?id=721396
Gfig Doesn't need porting
GIMPressionist No untested No untested
Glass Tile tile-glass Yes untested No untested
Gradient Flare No untested No untested
Gradient Map Yes untested No untested Ported as a gimp plug-in
Grey grey No untested Yes untested Similar to the Desaturation tool, but without its options
Grid grid work in progress untested No untested Missing intersection option, is it needed ?
Hot No untested No untested
IFS Fractal work in progress untested No untested
Illusion illusion Yes Yes work in progress untested Is currently being ported by some students as an university project focused on OpenCL. Results can be expected in 2015.
Image Map No untested No untested Deprecated code has to be ported to gegl (GimpDrawable, GimpPixelRgn, ...)
Invert invert-gamma No untested Yes untested The pdb documentation needs to be updated. Apart from that it's done.
iWarp To be replaced with Warp Transform tool
Jigsaw No untested No untested
Lens Distortion lens-distortion Yes untested No untested
Lens Flare lens-flare Yes Yes No untested
Lighting Effects No untested No untested
Make Seamless tile-seamless Yes untested No untested
Maximum RGB Will be removed without replacement
Maze maze Yes untested No untested
Mosaic mosaic Yes untested No untested The GEGL op tries to allocate the whole input.
Motion Blur (circular) motion-blur-circular Yes untested No untested Is allocating the whole input
Motion Blur (linear) motion-blur-linear Yes untested Yes untested Is allocating the whole input
Motion Blur (zoom) motion-blur-zoom Yes untested No untested Is allocating the whole input
Newsprint newsprint Yes untested No untested Reimplementation of scratch of most of the functionality of GIMP's newsprint plug-in with additional color based modulation of halftoned results. More documentation/exampels of this op will appear at https://pippin.gimp.org/spachrotyzer/
NL Filter No untested No untested
Noise (HSV Noise) noise-hsv Yes untested Yes untested The GEGL implementation is not strictly identical to the legacy one, but similar enough...
Noise (Hurl) noise-hurl Yes Yes Yes Yes
Noise (Pick) noise-pick Yes untested No untested
Noise (RGB Noise) noise-rgb work in progress untested No untested
Noise (Slur) noise-slur Yes untested No untested
Noise (Spread) noise-spread work in progress untested No untested
Normalize Yes untested No untested Provided by the stretch-contrast operation when "keep colors" is checked
Oilify oilify work in progress untested Yes untested
Optimize (Difference) No untested No untested
Optimize (for GIF) No untested No untested
Pagecurl No untested No untested
Palette Map Yes untested No untested
Paper Tile tile-paper Yes untested No untested
Photocopy photocopy work in progress untested No untested
Pixelize pixelize Yes untested Yes untested
Plasma plasma Yes untested No untested
Polar Coordinates polar-coordinates work in progress untested No untested Currently renders partially garbage
Qbist No untested No untested
Rearrange Colormap Yes untested No untested Not to be confused with GEGL's 'remap' operation.
Recompose Yes untested No untested See compose
Red Eye Removal red-eye-removal work in progress untested Yes untested
Retinex No untested No untested
Ripple ripple Yes untested No untested
Rotate Colors color-rotate No untested No untested
Sample Colorize No untested No untested
Screenshot Yes untested No untested
Selection to Path Yes untested No untested
Selective Gaussian Blur gaussian-blur-selective Yes untested Yes untested
Set Colormap Yes untested No untested Not to be confused with GEGL's 'remap' operation.
Shift shift Yes Yes No untested
Sinus sinus Yes untested No untested
Smooth Palette work in progress untested Yes untested See https://bugzilla.gnome.org/show_bug.cgi?id=774807 and https://bugzilla.gnome.org/show_bug.cgi?id=749220
Softglow softglow Yes untested No untested Also it uses a different intensity function (Y' instead of (max(R', G', B') + min (R', G', B')) / 2). I suggest the new behaviour is better.
Solid Noise noise-solid Yes untested No untested
Sparkle sparkle work in progress untested work in progress untested Is currently being ported by some students as an university project focused on OpenCL. Results can be expected in 2015.
Sphere Designer No untested No untested
Stretch Contrast stretch-contrast Yes Yes Yes Yes
Stretch HSV stretch-contrast-hsv Yes Yes No untested
Supernova supernova Yes untested No untested
Tile tile Yes untested No untested Kept as a gimp plug-in to resize drawables or create new image ; use gegl:tile operation internally.
Unoptimize No untested No untested
Unsharp Mask unsharp-mask work in progress untested No untested
Value Invert value-invert work in progress untested Yes untested
Value Propagate value-propagate Yes untested No untested
Van Gogh (LIC) No untested No untested The filter has nothing to do with van-Gogh-style art and has no obvious function. We should remove it.
Video video-degradation Yes untested Yes untested
Waves waves work in progress untested No untested Missing reflective option that produce strange result, I suggest dropping that.
Whirl and Pinch whirl-pinch work in progress untested No untested
Wind wind Yes untested No untested
Zealous Crop N/A Yes untested No untested Zealous Crop can't be performed as a GEGL operation because get_bounding_box depends on the image content. It was ported as a gimp plugin instead.

Display filters

Display filter GEGL port Test result OpenCL version Test result Comment
Color deficient vision work in progress untested No untested
Color management work in progress untested No untested
Color proof work in progress untested No untested
Contrast work in progress untested No untested
Gamma work in progress untested No untested


Port of new GEGL ops to OpenCL

GEGL operation OpenCL version Test result Comment
Bilateral filter Yes untested
Box blur Yes untested
Box max Yes untested GEGL op is work in progress.
Box min Yes untested GEGL op is work in progress.
Box percentile No untested GEGL op is work in progress.
Brightness and Contrast Yes untested
Buffer cache No untested GEGL op is work in progress. Does this need an OpenCL port?
C2g Yes untested HDR related
Cell Noise Yes untested
Checkerboard Yes untested
Cielch Noise No untested
Color No untested
Color Reduction No untested
Color Temperature Yes untested
Contrast Curve work in progress untested
Demosaic (bimedian) No untested GEGL op is work in progress.
Demosaic (simple) No untested GEGL op is work in progress.
Disc percentile No untested GEGL op is work in progress.
Display No untested Does this need an OpenCL port?
Ditto No untested GEGL op is work in progress. Test op - does this need an OpenCL port?
Exp combine No untested HDR related
Exposure No untested HDR related
Fattal02 No untested HDR related
gluas No untested GEGL op is work in progress. Does this need an OpenCL port?
Gnomonic projection No untested
HStack No untested GEGL op is work in progress.
Hue-Chroma Yes untested
Image compare No untested
Ink simulator No untested
Introspect No untested Does this need an OpenCL port?
Kuwahara No untested GEGL op is work in progress.
Lens correction No untested GEGL op is work in progress.
Line profile No untested GEGL op is work in progress.
Linear gradient No untested GEGL op is work in progress.
Mandelbrot No untested GEGL op is work in progress.
Mantiuk06 No untested HDR related
Mirrors No untested
Mono mixer Yes untested
Noise No untested Perlin noise generator
Noise Reduction Yes untested
Over No untested Porter Duff operation over (d = cA + cB * (1 - aA))
Radial gradient No untested GEGL op is work in progress.
Reinhard05 Yes untested HDR related
Remap No untested
Shadows-Highlights Yes untested
SNN (mean) Yes untested
SNN (percentile) No untested GEGL op is work in progress.
Stereographic projection No untested
SVG Hue rotate No untested
SVG Luminance to Alpha No untested
SVG Matrix No untested
SVG Saturate No untested
Unpremul No untested GEGL op is work in progress.
Vignette Yes untested
Weighted Blend Yes untested