darktable-org / darktable-org/darktable

Tone Equalizer does not utilize GPU

Open
#4,805 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
13.1k
Forks
1.4k
Avg merge
22h 14m
Merged PRs (30d)
198

Description

Describe the bug
I just noticed that the Tone Equalizer module does not utilize the capability of the GPU if OpenCL is activated. Instead of using the GPU it is using the CPU and, thus, slowing down the pixelpipe. I am not sure if this by intention or a limitation of this module. Below you can see which module took the longest for rendering.

To Reproduce
run darktable with darktable -d perf
edit any image and note the output in the terminal

Expected behavior

Screenshots
163,913255 [dev_process_preview] pixel pipeline processing took 0,112 secs (0,135 CPU)
164,266260 [dev_pixelpipe] took 0,351 secs (1,786 CPU) initing base buffer [full]
164,366978 [dev_pixelpipe] took 0,101 secs (0,185 CPU) processed lens correction' on GPU, blended on GPU [full] 164,369589 [dev_pixelpipe] took 0,003 secs (0,000 CPU) processed crop and rotate' on GPU, blended on GPU [full]
164,628985 [dev_pixelpipe] took 0,259 secs (1,248 CPU) processed tone equalizer' on CPU, blended on CPU [full] 164,642569 [dev_pixelpipe] took 0,014 secs (0,009 CPU) processed input color profile' on GPU, blended on GPU [full]
164,783572 [dev_pixelpipe] took 0,141 secs (0,126 CPU) processed contrast equalizer' on GPU, blended on GPU [full] 164,800374 [dev_pixelpipe] took 0,017 secs (0,008 CPU) processed sharpen' on GPU, blended on GPU [full]
164,937148 [dev_pixelpipe] took 0,137 secs (0,116 CPU) processed local contrast' on GPU, blended on GPU [full] 164,940186 [dev_pixelpipe] took 0,003 secs (0,000 CPU) processed output color profile' on GPU, blended on GPU [full]
164,958459 [dev_pixelpipe] took 0,018 secs (0,054 CPU) processed `display encoding' on CPU, blended on CPU [full]
164,960713 [dev_process_image] pixel pipeline processing took 1,159 secs (3,669 CPU)

Platform (please complete the following information):
Ubuntu 20.04
darktable 3.1.0-git1300.75abcb81c

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running darktable with darktable -d perf, edit an image, and inspect the pixel-pipeline timing for the tone equalizer. Trace the tone equalizer processing path and its OpenCL handling to determine whether GPU processing is supported; done means the module uses the GPU when OpenCL is enabled, with performance output confirming GPU processing.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
computer-graphics, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.