[Debian-astro-commits] [cpl] 01/04: Fix angle tolerance in i386

Ole Streicher olebole at moszumanska.debian.org
Fri Oct 21 15:10:54 UTC 2016


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to annotated tag debian/7.0-3
in repository cpl.

commit 58b63a737df37d461cc77dea839c75831818f428
Author: Ole Streicher <olebole at debian.org>
Date:   Fri Oct 21 16:53:18 2016 +0200

    Fix angle tolerance in i386
    
    Reason is (IMO) that in `cpl_ppm_match_points()`, outliers are detected with
    (`cpl_ppm.c`. line 1757):
    ```
    difference_of_angles(angle[i], median_angle) > angle_tolerance
    ```
    with `angle_tolerance = tolerance * median_angle`. `median_angle` may here be
    close to zero, and is actually equal zero in some (i586) cases -- atan2 seems
    to return 0.0 for small angles there. The input angle for the median may be
    even "wrapped around" to 2*Pi...
---
 debian/patches/fix_i386_failure.patch | 24 ++++++++++++++++++++++++
 debian/patches/series                 |  1 +
 2 files changed, 25 insertions(+)

diff --git a/debian/patches/fix_i386_failure.patch b/debian/patches/fix_i386_failure.patch
new file mode 100644
index 0000000..b645e04
--- /dev/null
+++ b/debian/patches/fix_i386_failure.patch
@@ -0,0 +1,24 @@
+Author: Ole Streicher <olebole at debian.org>
+Description: Fix angle tolerance in i386
+
+Reason is (IMO) that in `cpl_ppm_match_points()`, outliers are detected with
+(`cpl_ppm.c`. line 1757):
+```
+difference_of_angles(angle[i], median_angle) > angle_tolerance
+```
+with `angle_tolerance = tolerance * median_angle`. `median_angle` may here be
+close to zero, and is actually equal zero in some (i586) cases -- atan2 seems
+to return 0.0 for small angles there. The input angle for the median may be
+even "wrapped around" to 2*Pi... 
+
+--- a/cpldrs/cpl_ppm.c
++++ b/cpldrs/cpl_ppm.c
+@@ -1754,7 +1754,7 @@
+      */
+ 
+     scale_tolerance = tolerance * median_scale;
+-    angle_tolerance = tolerance * fabs(median_angle);
++    angle_tolerance = 1e-10;
+ 
+     for (i = 0; i < p_triangle->n; i++) {
+         if (n_triangle->t[i]) {
diff --git a/debian/patches/series b/debian/patches/series
index 71bac4b..41137ef 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ fix_required_versions.patch
 serial-tests
 reproducible_build.patch
 workaround_mips_ftbfs.patch
+fix_i386_failure.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/cpl.git



More information about the Debian-astro-commits mailing list