GNOME Bugzilla – Bug 790860
Garbage values when converting a format to its reference model, if the format has a subset of the model's components
Last modified: 2017-12-11 16:53:58 UTC
Converting formats like the CIE monochrome formats, whose models have more components than them, to their reference model produces garbage values. This is because the convert_to_double function doesn't provide any filler values for the missing components. These garbage values can evaluate to +/e inf during the ensuing conversion, which in turn result in nan errors, and prevent valid and existing fast paths from being taken.
Created attachment 364450 [details] Reproducer Note that the garbage values are not reliably observed. Like many memory errors, it may or may not be observed during a specific invocation of the reproducer.
Created attachment 364451 [details] [review] babl: make conversion to model double more generic I took babl:wip/pippin/fish-reference-to-double and fixed it up a bit.
babl:wip/rishi/fish-reference-to-double shows my changes as a separate commit on top of pippin's.
(In reply to Debarshi Ray from comment #1) > Created attachment 364450 [details] > Reproducer > > Note that the garbage values are not reliably observed. Like many memory > errors, it may or may not be observed during a specific invocation of the > reproducer. The garbage values showed up again, and this patch fixed them for me. Conversions to monochrome CIE Lab formats are roughly 15 times faster, and Babl doesn't log the "Missing fast-path babl conversion detected" message.
From #gegl on GIMPNet: <rishi> pippin: Would be slightly convenient to have https://bugzilla.gnome.org/show_bug.cgi?id=790860 in git. Might help with testing too. <pippin> rishi: please push both my and your commits to get testing of that :)