diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-10-06 22:42:44 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-01-28 02:01:58 +0100 |
| commit | 1760066150070717bf8954313550afdd25a0f3fe (patch) | |
| tree | a87d8a8748ce494fb5a6d3f4e8845ba0e868d7b9 /src/lib/grok_j2k_encoder_thread.cc | |
| parent | 6ae94ebba5f714a697167066f69a8ce31f3db360 (diff) | |
Clean up grok's presence in the config file and make sure it's optional.
It should be allowed to not have any grok stuff in the config file,
and we should generally call it grok rather than GPU in case
other non-grok GPU stuff arrives in the future.
Diffstat (limited to 'src/lib/grok_j2k_encoder_thread.cc')
| -rw-r--r-- | src/lib/grok_j2k_encoder_thread.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/grok_j2k_encoder_thread.cc b/src/lib/grok_j2k_encoder_thread.cc index 9ed0913be..c3cd6f8dd 100644 --- a/src/lib/grok_j2k_encoder_thread.cc +++ b/src/lib/grok_j2k_encoder_thread.cc @@ -60,7 +60,9 @@ try LOG_TIMING("encoder-pop thread=%1 frame=%2 eyes=%3", thread_id(), frame.index(), static_cast<int>(frame.eyes())); - if (_context->launch(frame, Config::instance()->selected_gpu()) && _context->scheduleCompress(frame)) { + auto grok = Config::instance()->grok().get_value_or({}); + + if (_context->launch(frame, grok.selected) && _context->scheduleCompress(frame)) { frame_guard.cancel(); } } |
