[gegl/branch2_zhangjb] frequency-ops: use babl_format_n ("double", 8)
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/branch2_zhangjb] frequency-ops: use babl_format_n ("double", 8)
- Date: Mon, 28 Jun 2010 16:43:35 +0000 (UTC)
commit 4116a922bae79e8b0b25aa4638f7d13a67f0295d
Author: �yvind Kolås <pippin gimp org>
Date: Mon Jun 28 17:40:55 2010 +0100
frequency-ops: use babl_format_n ("double", 8)
The custom frequency babl format is deprecated in favour of generic
support for n-channels.
operations/frequency/dft-backward.c | 4 ++--
operations/frequency/dft-forward.c | 4 ++--
operations/frequency/freq-general-filter.c | 6 +++---
operations/frequency/gaussian-bandpass-filter.c | 6 +++---
operations/frequency/gaussian-highpass-filter.c | 6 +++---
operations/frequency/gaussian-lowpass-filter.c | 6 +++---
operations/frequency/homo-dft.c | 4 ++--
operations/frequency/homo-idft.c | 4 ++--
operations/frequency/preview-frequency.c | 4 ++--
9 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/operations/frequency/dft-backward.c b/operations/frequency/dft-backward.c
index 6344520..e14e23c 100644
--- a/operations/frequency/dft-backward.c
+++ b/operations/frequency/dft-backward.c
@@ -54,7 +54,7 @@ static void
prepare(GeglOperation *operation)
{
gegl_operation_set_format(operation, "input",
- babl_format("frequency double"));
+ babl_format_n ("double", 8));
gegl_operation_set_format(operation, "output", babl_format("RGBA double"));
}
@@ -77,7 +77,7 @@ process(GeglOperation *operation,
tmp_src_buf = g_new0(gdouble, 2*height*FFT_HALF(width));
tmp_dst_buf = g_new0(gdouble, width*height);
- gegl_buffer_get(input, 1.0, NULL, babl_format("frequency double"),
+ gegl_buffer_get(input, 1.0, NULL, babl_format_n ("double", 8),
(gdouble *)src_buf, GEGL_AUTO_ROWSTRIDE);
for (i=0; i<4; i++)
{
diff --git a/operations/frequency/dft-forward.c b/operations/frequency/dft-forward.c
index 64cbecc..98a0899 100644
--- a/operations/frequency/dft-forward.c
+++ b/operations/frequency/dft-forward.c
@@ -55,7 +55,7 @@ prepare(GeglOperation *operation)
{
gegl_operation_set_format(operation, "input", babl_format ("RGBA double"));
gegl_operation_set_format(operation, "output",
- babl_format ("frequency double"));
+ babl_format_n ("double", 8));
}
static gboolean
@@ -87,7 +87,7 @@ process(GeglOperation *operation,
set_complex_component(tmp_dst_buf, dst_buf, i, FFT_HALF(width)*height);
}
- gegl_buffer_set(output, NULL, babl_format ("frequency double"), dst_buf,
+ gegl_buffer_set(output, NULL, babl_format_n ("double", 8), dst_buf,
GEGL_AUTO_ROWSTRIDE);
g_free(src_buf);
diff --git a/operations/frequency/freq-general-filter.c b/operations/frequency/freq-general-filter.c
index 48d2fae..ac276cf 100644
--- a/operations/frequency/freq-general-filter.c
+++ b/operations/frequency/freq-general-filter.c
@@ -36,7 +36,7 @@ gegl_chant_int(flag, "Flag", 0, 15, 14,
static void
prepare(GeglOperation *operation)
{
- Babl *format = babl_format ("frequency double");
+ Babl *format = babl_format_n ("double", 8);
gegl_operation_set_format(operation, "input", format);
gegl_operation_set_format(operation, "output", format);
}
@@ -63,7 +63,7 @@ process(GeglOperation *operation,
dst_buf = g_new0(gdouble, 8*width*height);
comp_real = g_new0(gdouble, FFT_HALF(width)*height);
comp_imag = g_new0(gdouble,FFT_HALF(width)*height);
- gegl_buffer_get(input, 1.0, NULL, babl_format ("frequency double"), src_buf,
+ gegl_buffer_get(input, 1.0, NULL, babl_format_n ("double", 8), src_buf,
GEGL_AUTO_ROWSTRIDE);
for (i=0; i<4; i++)
{
@@ -78,7 +78,7 @@ process(GeglOperation *operation,
set_freq_component(comp_real, dst_buf, i, FFT_HALF(width)*height);
set_freq_component(comp_imag, dst_buf, 4+i, FFT_HALF(width)*height);
}
- gegl_buffer_set(output, NULL, babl_format ("frequency double"), dst_buf,
+ gegl_buffer_set(output, NULL, babl_format_n ("double", 8), dst_buf,
GEGL_AUTO_ROWSTRIDE);
g_free(src_buf);
diff --git a/operations/frequency/gaussian-bandpass-filter.c b/operations/frequency/gaussian-bandpass-filter.c
index 1e29c2f..a9747e8 100644
--- a/operations/frequency/gaussian-bandpass-filter.c
+++ b/operations/frequency/gaussian-bandpass-filter.c
@@ -37,7 +37,7 @@ gegl_chant_double(bandwidth, "Bandwidth", 0, G_MAXDOUBLE, 1.0,
static void
prepare(GeglOperation *operation)
{
- Babl *format = babl_format ("frequency double");
+ Babl *format = babl_format_n ("double", 8);
gegl_operation_set_format(operation, "input", format);
gegl_operation_set_format(operation, "output", format);
}
@@ -70,7 +70,7 @@ process(GeglOperation *operation,
dst_buf = g_new0(gdouble, 8*width*height);
comp_real = g_new0(gdouble, FFT_HALF(width)*height);
comp_imag = g_new0(gdouble,FFT_HALF(width)*height);
- gegl_buffer_get(input, 1.0, NULL, babl_format ("frequency double"), src_buf,
+ gegl_buffer_get(input, 1.0, NULL, babl_format_n ("double", 8), src_buf,
GEGL_AUTO_ROWSTRIDE);
for (i=0; i<4; i++)
{
@@ -85,7 +85,7 @@ process(GeglOperation *operation,
set_freq_component(comp_real, dst_buf, i, FFT_HALF(width)*height);
set_freq_component(comp_imag, dst_buf, 4+i, FFT_HALF(width)*height);
}
- gegl_buffer_set(output, NULL, babl_format ("frequency double"), dst_buf,
+ gegl_buffer_set(output, NULL, babl_format_n ("double", 8), dst_buf,
GEGL_AUTO_ROWSTRIDE);
g_free(src_buf);
diff --git a/operations/frequency/gaussian-highpass-filter.c b/operations/frequency/gaussian-highpass-filter.c
index a987928..61cb145 100644
--- a/operations/frequency/gaussian-highpass-filter.c
+++ b/operations/frequency/gaussian-highpass-filter.c
@@ -35,7 +35,7 @@ gegl_chant_int(flag, "Flag", 0, 15, 14,
static void
prepare(GeglOperation *operation)
{
- Babl *format = babl_format ("frequency double");
+ Babl *format = babl_format_n ("double", 8);
gegl_operation_set_format(operation, "input", format);
gegl_operation_set_format(operation, "output", format);
}
@@ -67,7 +67,7 @@ process(GeglOperation *operation,
dst_buf = g_new0(gdouble, 8*width*height);
comp_real = g_new0(gdouble, FFT_HALF(width)*height);
comp_imag = g_new0(gdouble,FFT_HALF(width)*height);
- gegl_buffer_get(input, 1.0, NULL, babl_format ("frequency double"), src_buf,
+ gegl_buffer_get(input, 1.0, NULL, babl_format_n ("double", 8), src_buf,
GEGL_AUTO_ROWSTRIDE);
for (i=0; i<4; i++)
{
@@ -82,7 +82,7 @@ process(GeglOperation *operation,
set_freq_component(comp_real, dst_buf, i, FFT_HALF(width)*height);
set_freq_component(comp_imag, dst_buf, 4+i, FFT_HALF(width)*height);
}
- gegl_buffer_set(output, NULL, babl_format ("frequency double"), dst_buf,
+ gegl_buffer_set(output, NULL, babl_format_n ("double", 8), dst_buf,
GEGL_AUTO_ROWSTRIDE);
g_free(src_buf);
diff --git a/operations/frequency/gaussian-lowpass-filter.c b/operations/frequency/gaussian-lowpass-filter.c
index 4ee79c0..941060b 100644
--- a/operations/frequency/gaussian-lowpass-filter.c
+++ b/operations/frequency/gaussian-lowpass-filter.c
@@ -35,7 +35,7 @@ gegl_chant_int(flag, "Flag", 0, 15, 14,
static void
prepare(GeglOperation *operation)
{
- Babl *format = babl_format ("frequency double");
+ Babl *format = babl_format_n ("double", 8);
gegl_operation_set_format(operation, "input", format);
gegl_operation_set_format(operation, "output", format);
}
@@ -67,7 +67,7 @@ process(GeglOperation *operation,
dst_buf = g_new0(gdouble, 8*width*height);
comp_real = g_new0(gdouble, FFT_HALF(width)*height);
comp_imag = g_new0(gdouble,FFT_HALF(width)*height);
- gegl_buffer_get(input, 1.0, NULL, babl_format ("frequency double"), src_buf,
+ gegl_buffer_get(input, 1.0, NULL, babl_format_n ("double", 8), src_buf,
GEGL_AUTO_ROWSTRIDE);
for (i=0; i<4; i++)
{
@@ -82,7 +82,7 @@ process(GeglOperation *operation,
set_freq_component(comp_real, dst_buf, i, FFT_HALF(width)*height);
set_freq_component(comp_imag, dst_buf, 4+i, FFT_HALF(width)*height);
}
- gegl_buffer_set(output, NULL, babl_format ("frequency double"), dst_buf,
+ gegl_buffer_set(output, NULL, babl_format_n ("double", 8), dst_buf,
GEGL_AUTO_ROWSTRIDE);
g_free(src_buf);
diff --git a/operations/frequency/homo-dft.c b/operations/frequency/homo-dft.c
index b198325..e0f4f69 100644
--- a/operations/frequency/homo-dft.c
+++ b/operations/frequency/homo-dft.c
@@ -55,7 +55,7 @@ prepare(GeglOperation *operation)
{
gegl_operation_set_format(operation, "input", babl_format ("RGBA double"));
gegl_operation_set_format(operation, "output",
- babl_format ("frequency double"));
+ babl_format_n ("double", 8));
}
static gboolean
@@ -87,7 +87,7 @@ process(GeglOperation *operation,
set_complex_component(tmp_dst_buf, dst_buf, i, FFT_HALF(width)*height);
}
- gegl_buffer_set(output, NULL, babl_format ("frequency double"), dst_buf,
+ gegl_buffer_set(output, NULL, babl_format_n ("double", 8), dst_buf,
GEGL_AUTO_ROWSTRIDE);
g_free(src_buf);
diff --git a/operations/frequency/homo-idft.c b/operations/frequency/homo-idft.c
index cb76dbe..1b450de 100644
--- a/operations/frequency/homo-idft.c
+++ b/operations/frequency/homo-idft.c
@@ -54,7 +54,7 @@ static void
prepare(GeglOperation *operation)
{
gegl_operation_set_format(operation, "input",
- babl_format("frequency double"));
+ babl_format_n ("double", 8));
gegl_operation_set_format(operation, "output", babl_format("RGBA double"));
}
@@ -77,7 +77,7 @@ process(GeglOperation *operation,
tmp_src_buf = g_new0(gdouble, 2*height*FFT_HALF(width));
tmp_dst_buf = g_new0(gdouble, width*height);
- gegl_buffer_get(input, 1.0, NULL, babl_format("frequency double"),
+ gegl_buffer_get(input, 1.0, NULL, babl_format_n ("double", 8),
(gdouble *)src_buf, GEGL_AUTO_ROWSTRIDE);
for (i=0; i<4; i++)
{
diff --git a/operations/frequency/preview-frequency.c b/operations/frequency/preview-frequency.c
index 3984208..49bb4e8 100644
--- a/operations/frequency/preview-frequency.c
+++ b/operations/frequency/preview-frequency.c
@@ -55,7 +55,7 @@ static void
prepare(GeglOperation *operation)
{
gegl_operation_set_format(operation, "input",
- babl_format("frequency double"));
+ babl_format_n ("double", 8));
gegl_operation_set_format(operation, "output", babl_format("RGBA double"));
}
@@ -78,7 +78,7 @@ process(GeglOperation *operation,
tmp_src_buf = g_new0(gdouble, 2*height*FFT_HALF(width));
tmp_dst_buf = g_new0(gdouble, width*height);
- gegl_buffer_get(input, 1.0, NULL, babl_format("frequency double"),
+ gegl_buffer_get(input, 1.0, NULL, babl_format_n ("double", 8),
(gdouble *)src_buf, GEGL_AUTO_ROWSTRIDE);
for (i=0; i<3; i++)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]