summaryrefslogtreecommitdiff
path: root/src/lib/grok_j2k_encoder_thread.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-10-06 22:42:44 +0200
committerCarl Hetherington <cth@carlh.net>2023-11-29 21:20:30 +0100
commit0dc71b05952a258e5deb9fcc9b099357caa928f1 (patch)
treefae9b8274d9df412476dbae57c2d77aadf813596 /src/lib/grok_j2k_encoder_thread.cc
parent92b3adeec044da0811a618e1b6ac519fd7bd1e51 (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.cc4
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 79b80f694..79fb1bbae 100644
--- a/src/lib/grok_j2k_encoder_thread.cc
+++ b/src/lib/grok_j2k_encoder_thread.cc
@@ -39,7 +39,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();
}
}