diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-06-03 14:30:42 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-06-03 14:30:42 +0100 |
| commit | c5b3d91fab31fde4c21e1cc5bb5adb1d6d26fcca (patch) | |
| tree | a88349c4c4e6e8304d92161529a5ca3dc5271a7b /src/lib/colour_conversion.cc | |
| parent | fd26b3243015824bebe8ec41c6b4a0d81748e81a (diff) | |
Include audio mapping in the digest used to distinguish different
audio analyses so that the analyses are re-computed when the mapping
changes.
Reported-by: Matthias Damm
Diffstat (limited to 'src/lib/colour_conversion.cc')
| -rw-r--r-- | src/lib/colour_conversion.cc | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/lib/colour_conversion.cc b/src/lib/colour_conversion.cc index 5f17f9184..f8675900e 100644 --- a/src/lib/colour_conversion.cc +++ b/src/lib/colour_conversion.cc @@ -24,6 +24,7 @@ #include "config.h" #include "colour_conversion.h" #include "util.h" +#include "md5_digester.h" #include "i18n.h" @@ -121,21 +122,18 @@ ColourConversion::preset () const string ColourConversion::identifier () const { - double numbers[12]; - - int n = 0; - numbers[n++] = input_gamma; - numbers[n++] = input_gamma_linearised; + MD5Digester digester; + + digester.add (input_gamma); + digester.add (input_gamma_linearised); for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { - numbers[n++] = matrix (i, j); + digester.add (matrix (i, j)); } } - numbers[n++] = output_gamma; - - assert (n == 12); - - return md5_digest (numbers, 12 * sizeof (double)); + digester.add (output_gamma); + + return digester.get (); } PresetColourConversion::PresetColourConversion () |
