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 789704 - grey: Use alpha only if the source has it
grey: Use alpha only if the source has it
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: operations
git master
Other All
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2017-10-31 12:25 UTC by Debarshi Ray
Modified: 2017-10-31 12:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
operations/common/grey: Use alpha only if the source has it (2.85 KB, patch)
2017-10-31 12:28 UTC, Debarshi Ray
committed Details | Review
Test case (2.08 KB, text/plain)
2017-10-31 12:31 UTC, Debarshi Ray
  Details

Description Debarshi Ray 2017-10-31 12:25:34 UTC
Avoiding a needless alpha channel when the source doesn't have alpha gives a significant performance boost. On an Intel i7 Haswell system, with 15 megapixel "R'G'B'A u8" and "R'G'B' u8" buffers as inputs, the speed drops from ~0.16s to ~0.08s when using the CPU, and drops from ~0.32s to ~0.22s when using OpenCL.

See the attached test case.
Comment 1 Debarshi Ray 2017-10-31 12:28:53 UTC
Created attachment 362619 [details] [review]
operations/common/grey: Use alpha only if the source has it
Comment 2 Debarshi Ray 2017-10-31 12:31:13 UTC
Created attachment 362620 [details]
Test case

This was run with GEGL_THREADS=2, where 2 is the number of physical cores.
Comment 3 Debarshi Ray 2017-10-31 12:33:10 UTC
From #gegl on GIMPNet:
<pippin> rishi: feel free to push and close 789704 yourself :)