GNU bug report logs - #41544
26.3; Possible incorrect results from color-distance

Previous Next

Package: emacs;

Reported by: Simon Pugnet <simon <at> polaris64.net>

Date: Tue, 26 May 2020 16:34:01 UTC

Severity: normal

Tags: patch

Found in version 26.3

Full log


View this message in rfc822 format

From: Mattias EngdegÄrd <mattiase <at> acm.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tom <at> tromey.com, simon <at> polaris64.net, 41544 <at> debbugs.gnu.org
Subject: bug#41544: 26.3; Possible incorrect results from color-distance
Date: Tue, 2 Jun 2020 22:41:03 +0200
[Message part 1 (text/plain, inline)]
2 juni 2020 kl. 18.14 skrev Eli Zaretskii <eliz <at> gnu.org>:

> I'd prefer to fix only the symmetry bug (which AFAIU happens because
> we use bit shifts on signed integers), without introducing any other
> effects on the function's behavior and return values.  AFAIU, such a
> fix should not require any changes outside of the function itself.

Very well, it is obviously an improvement. The reason for the current asymmetry was actually that the algorithm discarded the low bits; what about fixing that as well? The improved accuracy amounts to less than 1 % of difference in the return value; no other code needs changing, and we get the symmetry for free. Proposed patch attached.

[0001-Make-color-distance-symmetric-and-more-accurate.patch (application/octet-stream, attachment)]

This bug report was last modified 4 years and 304 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.