vcomp,vdec/gpujpeg: toggle on profiling in debug

If log_level >= LOG_LEVEL_DEBUG, set the perf_stats option, which with
current GPUJPEG prints the performance stats to stdout.
This commit is contained in:
Martin Pulec
2024-10-08 12:25:15 +02:00
parent 22e9b7cfee
commit 3aa91f67ad
2 changed files with 2 additions and 0 deletions

View File

@@ -278,6 +278,7 @@ bool encoder_state::configure_with(struct video_desc desc)
}
m_encoder_param.verbose = max<int>(0, log_level - LOG_LEVEL_INFO);
m_encoder_param.perf_stats = log_level >= LOG_LEVEL_DEBUG ? 1 : 0;
m_encoder_param.segment_info = 1;
gpujpeg_sampling_factor_t subsampling = m_parent_state->m_subsampling;
#if !defined NEW_PARAM_IMG_NO_COMP_COUNT

View File

@@ -86,6 +86,7 @@ static int configure_with(struct state_decompress_gpujpeg *s, struct video_desc
gpujpeg_set_default_parameters(&param);
param.color_space_internal = GPUJPEG_YCBCR_BT709; // see comment bellow
param.verbose = MAX(0, log_level - LOG_LEVEL_INFO);
param.perf_stats = log_level >= LOG_LEVEL_DEBUG ? 1 : 0;
struct gpujpeg_image_parameters param_image;
gpujpeg_image_set_default_parameters(&param_image);
param_image.width = desc.width; // size must be non-zero in order the init to succeed