|
Packit |
bc1512 |
/* This file is part of GEGL
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* GEGL is free software; you can redistribute it and/or
|
|
Packit |
bc1512 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
bc1512 |
* License as published by the Free Software Foundation; either
|
|
Packit |
bc1512 |
* version 3 of the License, or (at your option) any later version.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* GEGL is distributed in the hope that it will be useful,
|
|
Packit |
bc1512 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
bc1512 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
bc1512 |
* Lesser General Public License for more details.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
bc1512 |
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Copyright 2006 Øyvind Kolås
|
|
Packit |
bc1512 |
*/
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
/* GeglOperationPointFilter
|
|
Packit |
bc1512 |
* The point-filter base class is for filters where an output pixel only depends on the color and alpha values
|
|
Packit |
bc1512 |
* of the corresponding input pixel. This allows you to do the processing on linear buffers, in the future
|
|
Packit |
bc1512 |
* versions of GEGL operations implemented using the point-filter will get speed increases due to more
|
|
Packit |
bc1512 |
* intelligent processing possible in the point filter class
|
|
Packit |
bc1512 |
*/
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#ifndef __GEGL_OPERATION_POINT_FILTER_H__
|
|
Packit |
bc1512 |
#define __GEGL_OPERATION_POINT_FILTER_H__
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#include "gegl-operation-filter.h"
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#include "opencl/gegl-cl.h"
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
G_BEGIN_DECLS
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#define GEGL_TYPE_OPERATION_POINT_FILTER (gegl_operation_point_filter_get_type ())
|
|
Packit |
bc1512 |
#define GEGL_OPERATION_POINT_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_POINT_FILTER, GeglOperationPointFilter))
|
|
Packit |
bc1512 |
#define GEGL_OPERATION_POINT_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_POINT_FILTER, GeglOperationPointFilterClass))
|
|
Packit |
bc1512 |
#define GEGL_IS_OPERATION_POINT_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_POINT_FILTER))
|
|
Packit |
bc1512 |
#define GEGL_IS_OPERATION_POINT_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_POINT_FILTER))
|
|
Packit |
bc1512 |
#define GEGL_OPERATION_POINT_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_POINT_FILTER, GeglOperationPointFilterClass))
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
typedef struct _GeglOperationPointFilter GeglOperationPointFilter;
|
|
Packit |
bc1512 |
struct _GeglOperationPointFilter
|
|
Packit |
bc1512 |
{
|
|
Packit |
bc1512 |
GeglOperationFilter parent_instance;
|
|
Packit |
bc1512 |
};
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
typedef struct _GeglOperationPointFilterClass GeglOperationPointFilterClass;
|
|
Packit |
bc1512 |
struct _GeglOperationPointFilterClass
|
|
Packit |
bc1512 |
{
|
|
Packit |
bc1512 |
GeglOperationFilterClass parent_class;
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
gboolean (* process) (GeglOperation *self, /* for parameters */
|
|
Packit |
bc1512 |
void *in_buf, /* input buffer */
|
|
Packit |
bc1512 |
void *out_buf, /* output buffer */
|
|
Packit |
bc1512 |
glong samples, /* number of samples */
|
|
Packit |
bc1512 |
const GeglRectangle *roi, /* rectangle out_buf spans
|
|
Packit |
bc1512 |
in in buffer, see the
|
|
Packit |
bc1512 |
checkerboard op for
|
|
Packit |
bc1512 |
semantics */
|
|
Packit |
bc1512 |
gint level);
|
|
Packit |
bc1512 |
cl_int (* cl_process) (GeglOperation *self,
|
|
Packit |
bc1512 |
cl_mem in_tex,
|
|
Packit |
bc1512 |
cl_mem out_tex,
|
|
Packit |
bc1512 |
size_t global_worksize,
|
|
Packit |
bc1512 |
const GeglRectangle *roi,
|
|
Packit |
bc1512 |
gint level);
|
|
Packit |
bc1512 |
gpointer pad[4];
|
|
Packit |
bc1512 |
};
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
GType gegl_operation_point_filter_get_type (void) G_GNUC_CONST;
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
G_END_DECLS
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#endif
|