From 5b2882d89da9e7b5086ec6169a2d9eb8013d032c Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 23 May 2025 15:16:07 +0200 Subject: [PATCH] vdec/cmpto_j2k: fix limit=# (->4) + print in with single command --- src/video_decompress/cmpto_j2k.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/video_decompress/cmpto_j2k.cpp b/src/video_decompress/cmpto_j2k.cpp index 993378358..efd81ef2c 100644 --- a/src/video_decompress/cmpto_j2k.cpp +++ b/src/video_decompress/cmpto_j2k.cpp @@ -219,18 +219,13 @@ static void rg48_to_r12l(unsigned char *dst_buffer, static void print_dropped(unsigned long long int dropped, const j2k_decompress_platform& platform) { if (dropped % 10 == 1) { MSG(WARNING, "Some frames (%llu) dropped.\n", dropped); - - if (j2k_decompress_platform::CPU == platform) { - log_msg_once(LOG_LEVEL_INFO, to_fourcc('J', '2', 'D', 'W'), "%s You may try to increase " - "image limit to increase the number of images decoded at one moment by adding parameter: --param j2k-dec-img-limit=#\n", - MOD_NAME); - } - - if (j2k_decompress_platform::CUDA == platform) { - log_msg_once(LOG_LEVEL_INFO, to_fourcc('J', '2', 'D', 'W'), "%s You may try to increase " - "tile limit to increase the throughput by adding parameter: --param j2k-dec-tile-limit=#\n", - MOD_NAME); - } + MSG_ONCE( + INFO, "You may try to increase %s.\n", + platform == j2k_decompress_platform::CPU + ? "the number of images decoded at one moment by " + "adding parameter: --param j2k-dec-img-limit=4" + : "tile limit to increase the throughput by adding " + "parameter: --param j2k-dec-tile-limit=4"); } }