From 4f4eaf01b709b4fb67b02cb0db5b144645ac3e4b Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Fri, 20 Nov 2020 12:52:03 +0000 Subject: [PATCH] Add comment to thread_level in wp2 --- codecs/wp2/enc/wp2_enc.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/codecs/wp2/enc/wp2_enc.cpp b/codecs/wp2/enc/wp2_enc.cpp index 9b1ac2b7..2d8b1fef 100644 --- a/codecs/wp2/enc/wp2_enc.cpp +++ b/codecs/wp2/enc/wp2_enc.cpp @@ -43,6 +43,7 @@ val encode(std::string image_in, int image_width, int image_height, WP2Options o } WP2::MemoryWriter memory_writer; + // In WebP2, thread_level is number of *extra* threads to use (0 for no multithreading). config.thread_level = emscripten_num_logical_cores() - 1; status = WP2::Encode(src, &memory_writer, config); if (status != WP2_STATUS_OK) {