* fabien/mln/upsampling/hq2x.hh,
* fabien/mln/upsampling/hq3x.hh,
* fabien/mln/upsampling/hq4x.hh: Fix invalid output domain.
---
milena/sandbox/ChangeLog | 18 +++++++++++++-----
milena/sandbox/fabien/mln/upsampling/hq2x.hh | 5 +++--
milena/sandbox/fabien/mln/upsampling/hq3x.hh | 4 +++-
milena/sandbox/fabien/mln/upsampling/hq4x.hh | 4 +++-
4 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog
index 16bbebb..cc14c70 100644
--- a/milena/sandbox/ChangeLog
+++ b/milena/sandbox/ChangeLog
@@ -1,3 +1,11 @@
+2009-09-22 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Fix invalid output domain in hq*x algorithms.
+
+ * fabien/mln/upsampling/hq2x.hh,
+ * fabien/mln/upsampling/hq3x.hh,
+ * fabien/mln/upsampling/hq4x.hh: Fix invalid output domain.
+
2009-09-22 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
Adapt styles. Need some 2d code.
@@ -139,12 +147,12 @@
* green/doc/examples : New directory.
Move hello_world directory in doc/examples.
-
+
* green/doc/examples/hello_world : New directory.
* green/doc/examples/hello_world/Makefile.am : Copy makefile.
* green/doc/examples/hello_world/hellow_world.cc : Copy source file.
* green/doc/examples/hello_world/print.cc : Copy source file.
-
+
* green/hello_world/hello_world.cc : Remove source file.
* green/hello_world/print.cc : Remove source file.
* green/hello_world/Makefile.am : Remove makefile.
@@ -155,7 +163,7 @@
* green/doc/exampleshello_milena : New directory.
* green/doc/exampleshello_milena/Makefile.am : Copy makefile.
* green/doc/examples/hello_milena/hello_milena.cc : Copy source file.
-
+
* green/hello_milena/hello_milena.cc : Remove source file.
* green/hello_milena/Makefile.am : Remove makefile.
* green/hello_milena : Remove directory.
@@ -165,7 +173,7 @@
* green/doc/examples/learn_milena : New directory.
* green/doc/examples/learn_milena/Makefile.am : Copy makefile.
* green/doc/examples/learn_milena/learn_milena.cc : Copy source file.
-
+
* green/learn_milena/learn_milena.cc : Remove source file.
* green/learn_milena/Makefile.am : Remove makefile.
* green/learn_milena : Remove directory.
@@ -175,7 +183,7 @@
* green/doc/examples/otsu : New directory.
* green/doc/examples/otsu/Makefile.am : Copy makefile.
* green/doc/examples/otsu/otsu.cc : Copy source file.
-
+
* green/otsu/otsu.cc : Remove source file.
* green/otsu/Makefile.am : Remove makefile.
* green/otsu : Remove directory.
diff --git a/milena/sandbox/fabien/mln/upsampling/hq2x.hh
b/milena/sandbox/fabien/mln/upsampling/hq2x.hh
index 78ed271..4368212 100644
--- a/milena/sandbox/fabien/mln/upsampling/hq2x.hh
+++ b/milena/sandbox/fabien/mln/upsampling/hq2x.hh
@@ -24,6 +24,7 @@
/// Reference can be found at:
///
http://web.archive.org/web/20070624082212/www.hiend3d.com/hq2x.html
+# include <mln/core/alias/dpoint2d.hh>
# include <mln/extension/adjust_duplicate.hh>
# include <mln/geom/max_col.hh>
# include <mln/geom/max_row.hh>
@@ -237,8 +238,8 @@ namespace mln
{
trace::entering("upsampling::impl::hq2x_");
- mln_domain(image2d<T>) bbox(input.domain().pmin() * 4,
- input.domain().pmax() * 4);
+ mln_domain(image2d<T>) bbox(input.domain().pmin() * 2,
+ input.domain().pmax() * 2 + mln::down_right);
mln_concrete(image2d<T>) output(bbox);
int LUT16to32[65536];
diff --git a/milena/sandbox/fabien/mln/upsampling/hq3x.hh
b/milena/sandbox/fabien/mln/upsampling/hq3x.hh
index 15c1e65..940fe61 100644
--- a/milena/sandbox/fabien/mln/upsampling/hq3x.hh
+++ b/milena/sandbox/fabien/mln/upsampling/hq3x.hh
@@ -24,6 +24,7 @@
/// Reference can be found at:
///
http://web.archive.org/web/20070624082212/www.hiend3d.com/hq3x.html
+# include <mln/core/alias/dpoint2d.hh>
# include <mln/extension/adjust_duplicate.hh>
# include <mln/geom/max_col.hh>
# include <mln/geom/max_row.hh>
@@ -224,7 +225,8 @@ namespace mln
trace::entering("upsampling::impl::hq3x_");
mln_domain(image2d<T>) bbox(input.domain().pmin() * 3,
- input.domain().pmax() * 3);
+ input.domain().pmax() * 3
+ + 2 * mln::down_right);
mln_concrete(image2d<T>) output(bbox);
int LUT16to32[65536];
diff --git a/milena/sandbox/fabien/mln/upsampling/hq4x.hh
b/milena/sandbox/fabien/mln/upsampling/hq4x.hh
index c77ef6a..1d091dc 100644
--- a/milena/sandbox/fabien/mln/upsampling/hq4x.hh
+++ b/milena/sandbox/fabien/mln/upsampling/hq4x.hh
@@ -24,6 +24,7 @@
/// Reference can be found at:
///
http://web.archive.org/web/20070624082212/www.hiend3d.com/hq4x.html
+# include <mln/core/alias/dpoint2d.hh>
# include <mln/extension/adjust_duplicate.hh>
# include <mln/geom/max_col.hh>
# include <mln/geom/max_row.hh>
@@ -344,7 +345,8 @@ namespace mln
trace::entering("upsampling::impl::hq4x_");
mln_domain(image2d<T>) bbox(input.domain().pmin() * 4,
- input.domain().pmax() * 4);
+ input.domain().pmax() * 4
+ + 3 * mln::down_right);
mln_concrete(image2d<T>) output(bbox);
int LUT16to32[65536];
--
1.5.6.5