Skip to content

Commit

Permalink
Boost jxl decoding parallel processing
Browse files Browse the repository at this point in the history
Summary: We can speed up jxl decoding with more threads. Not sure why I limited that number.

Reviewed By: kiminoue7

Differential Revision: D51650359

fbshipit-source-id: e50cac0f9be9555adda9029b605ce264ecbcde49
  • Loading branch information
Georges Berenger authored and facebook-github-bot committed Nov 29, 2023
1 parent 9e1be7d commit 16744f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vrs/utils/PixelFrameJxl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ bool PixelFrame::readJxlFrame(const vector<uint8_t>& jxlBuf, bool decodePixels)

size_t hw_threads = JxlThreadParallelRunnerDefaultNumWorkerThreads();
JxlThreadParallelRunnerPtr runner_fixed =
JxlThreadParallelRunnerMake(nullptr, std::min<size_t>(hw_threads, 4));
JxlThreadParallelRunnerMake(nullptr, std::min<size_t>(hw_threads, 16));
DEC_CHECK(JxlDecoderSetParallelRunner(dec, JxlThreadParallelRunner, runner_fixed.get()));

DEC_CHECK(JxlDecoderSubscribeEvents(
Expand Down

0 comments on commit 16744f5

Please sign in to comment.