[gegl] buffer: do sampler interpolation in buffers space
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: do sampler interpolation in buffers space
- Date: Fri, 6 Jul 2018 15:00:02 +0000 (UTC)
commit 4882c453bc4ed6351a714b2f199e54ca7d305641
Author: Øyvind Kolås <pippin gimp org>
Date: Fri Jul 6 16:59:22 2018 +0200
buffer: do sampler interpolation in buffers space
gegl/buffer/gegl-sampler-cubic.c | 1 -
gegl/buffer/gegl-sampler-linear.c | 1 -
gegl/buffer/gegl-sampler-lohalo.c | 2 --
gegl/buffer/gegl-sampler-nearest.c | 1 -
gegl/buffer/gegl-sampler-nohalo.c | 2 --
gegl/buffer/gegl-sampler.c | 4 +++-
6 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler-cubic.c b/gegl/buffer/gegl-sampler-cubic.c
index 78ab93d90..7764c66cd 100644
--- a/gegl/buffer/gegl-sampler-cubic.c
+++ b/gegl/buffer/gegl-sampler-cubic.c
@@ -117,7 +117,6 @@ gegl_sampler_cubic_init (GeglSamplerCubic *self)
GEGL_SAMPLER (self)->level[0].context_rect.y = -2;
GEGL_SAMPLER (self)->level[0].context_rect.width = 5;
GEGL_SAMPLER (self)->level[0].context_rect.height = 5;
- GEGL_SAMPLER (self)->interpolate_format = gegl_babl_rgbA_linear_float ();
self->b=1.0;
self->c=0.0;
diff --git a/gegl/buffer/gegl-sampler-linear.c b/gegl/buffer/gegl-sampler-linear.c
index b4310fd2c..a70159234 100644
--- a/gegl/buffer/gegl-sampler-linear.c
+++ b/gegl/buffer/gegl-sampler-linear.c
@@ -70,7 +70,6 @@ gegl_sampler_linear_init (GeglSamplerLinear *self)
GEGL_SAMPLER (self)->level[0].context_rect.y = -1 - LINEAR_EXTRA_ELBOW_ROOM;
GEGL_SAMPLER (self)->level[0].context_rect.width = 3 + 2*LINEAR_EXTRA_ELBOW_ROOM;
GEGL_SAMPLER (self)->level[0].context_rect.height = 3 + 2*LINEAR_EXTRA_ELBOW_ROOM;
- GEGL_SAMPLER (self)->interpolate_format = gegl_babl_rgbA_linear_float ();
}
void
diff --git a/gegl/buffer/gegl-sampler-lohalo.c b/gegl/buffer/gegl-sampler-lohalo.c
index c6c39a893..53d811916 100644
--- a/gegl/buffer/gegl-sampler-lohalo.c
+++ b/gegl/buffer/gegl-sampler-lohalo.c
@@ -186,8 +186,6 @@ gegl_sampler_lohalo_init (GeglSamplerLohalo *self)
level->context_rect.y = -LOHALO_OFFSET_0;
level->context_rect.width = LOHALO_SIZE_0;
level->context_rect.height = LOHALO_SIZE_0;
-
- GEGL_SAMPLER (self)->interpolate_format = gegl_babl_rgbA_linear_float ();
}
/*
diff --git a/gegl/buffer/gegl-sampler-nearest.c b/gegl/buffer/gegl-sampler-nearest.c
index 5565bfb4a..3c8ed1cc9 100644
--- a/gegl/buffer/gegl-sampler-nearest.c
+++ b/gegl/buffer/gegl-sampler-nearest.c
@@ -75,7 +75,6 @@ gegl_sampler_nearest_init (GeglSamplerNearest *self)
GEGL_SAMPLER (self)->level[0].context_rect.y = 0;
GEGL_SAMPLER (self)->level[0].context_rect.width = 1;
GEGL_SAMPLER (self)->level[0].context_rect.height = 1;
- GEGL_SAMPLER (self)->interpolate_format = gegl_babl_rgbA_linear_float ();
}
static void
diff --git a/gegl/buffer/gegl-sampler-nohalo.c b/gegl/buffer/gegl-sampler-nohalo.c
index 858dc3284..e989be912 100644
--- a/gegl/buffer/gegl-sampler-nohalo.c
+++ b/gegl/buffer/gegl-sampler-nohalo.c
@@ -294,8 +294,6 @@ gegl_sampler_nohalo_init (GeglSamplerNohalo *self)
level->context_rect.y = -NOHALO_OFFSET_0;
level->context_rect.width = NOHALO_SIZE_0;
level->context_rect.height = NOHALO_SIZE_0;
-
- GEGL_SAMPLER (self)->interpolate_format = gegl_babl_rgbA_linear_float ();
}
static void inline
diff --git a/gegl/buffer/gegl-sampler.c b/gegl/buffer/gegl-sampler.c
index b63dbeca7..17f9deb1c 100644
--- a/gegl/buffer/gegl-sampler.c
+++ b/gegl/buffer/gegl-sampler.c
@@ -193,7 +193,9 @@ gegl_sampler_prepare (GeglSampler *self)
if (klass->prepare)
klass->prepare (self);
-
+
+ self->interpolate_format = babl_format_with_space ("RaGaBaA float",
+ gegl_buffer_get_format(self->buffer));
if (!self->fish)
self->fish = babl_fish (self->interpolate_format, self->format);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]