After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790860 - Garbage values when converting a format to its reference model, if the format has a subset of the model's components
Garbage values when converting a format to its reference model, if the format...
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: babl
git master
Other All
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks: 788201 790438
 
 
Reported: 2017-11-26 21:03 UTC by Debarshi Ray
Modified: 2017-12-11 16:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Reproducer (1.50 KB, text/plain)
2017-11-26 21:06 UTC, Debarshi Ray
  Details
babl: make conversion to model double more generic (3.16 KB, patch)
2017-11-26 21:10 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2017-11-26 21:03:32 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.
Comment 1 Debarshi Ray 2017-11-26 21:06:02 UTC
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.
Comment 2 Debarshi Ray 2017-11-26 21:10:44 UTC
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.
Comment 3 Debarshi Ray 2017-11-26 21:12:42 UTC
babl:wip/rishi/fish-reference-to-double shows my changes as a separate commit on top of pippin's.
Comment 4 Debarshi Ray 2017-12-01 11:29:56 UTC
(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.
Comment 5 Debarshi Ray 2017-12-11 15:36:29 UTC
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 :)