GNOME Bugzilla – Bug 789807
exposure: Avoid using unused channels
Last modified: 2017-11-12 12:43:24 UTC
Same as bug 789704 While the speed-up is not as impressive as it was for gegl:grey, it is still measurable. On an Intel i7 Haswell system, with 15 megapixel "R'G'B'A u8" and "R'G'B' u8" buffers as inputs and GEGL_THREADS=2, it goes from: CPU: 0.3 to 0.24 GPU: 0.52 to 0.46 It can potentially add up to something more significant in bigger graphs with a series of optimized operations. The alpha channel amounts to 60 MB in this case, which is not a lot in terms of a process' address space, but still a lot in terms of useless memory access.
Created attachment 362796 [details] [review] operations/common/exposure: Use alpha only if the source has it
It can be pushed a bit further by adding native support for monochrome buffers. On an Intel i7 Haswell system, with 15 megapixel "R'G'B'A u8" and "R'G'B' u8" buffers as inputs and GEGL_THREADS=2, the attached test case goes from: CPU: 0.38 to 0.08 (no alpha), 0.17 (alpha) GPU: 0.62 to 0.36 (no alpha), 0.52 (alpha)
Created attachment 362853 [details] Test case
Created attachment 362855 [details] [review] operations/common/exposure: Add native support for monochrome buffers
Created attachment 363396 [details] [review] operations/common/exposure: Fix unpacking of floats into float3 I might have made the same mistake that Massimo caught in https://bugzilla.gnome.org/show_bug.cgi?id=789554#c9 Completely untested. I don't understand OpenCL well enough and I might not have time to test it before the release.
Created attachment 363411 [details] [review] operations/common/exposure: Fix unpacking of floats into float3 Tested. This should be fine.
Created attachment 363412 [details] [review] operations/common/exposure: Fix unpacking of floats into float3 I just can't seem to get this right. I had deleted the actual arithmetic before creating the commit. :/
commit 813162c8768b2aca1490cabdcc2f59005a4d94ed Author: Debarshi Ray <debarshir@gnome.org> Date: Sat Nov 11 18:30:04 2017 +0100 operations/common/exposure: Fix unpacking of floats into float3 Fallout from 55cf906717510a56a65daff01919fc11a255ad45 https://bugzilla.gnome.org/show_bug.cgi?id=789807