Compressions: warn for 8-bit compressions

Warn if the user can better capture 8 bits.
This commit is contained in:
Martin Pulec
2020-07-28 14:19:51 +02:00
parent b291aae745
commit 4e4dd83696
3 changed files with 15 additions and 0 deletions

View File

@@ -139,6 +139,11 @@ static bool configure_with(struct state_video_compress_cuda_dxt *s, struct video
{
cleanup(s);
if (get_bits_per_component(desc.color_spec) > 8) {
LOG(LOG_LEVEL_NOTICE) << "[CUDA DXT] Converting from " << get_bits_per_component(desc.color_spec) <<
" to 8 bits. You may directly capture 8-bit signal to improve performance.\n";
}
if (desc.color_spec == RGB || desc.color_spec == UYVY) {
s->in_codec = desc.color_spec;
} else if ((s->decoder = get_decoder_from_to(desc.color_spec, RGB, false))) {

View File

@@ -100,6 +100,11 @@ static int configure_with(struct state_video_compress_rtdxt *s, struct video_fra
}
}
if (get_bits_per_component(frame->color_spec) > 8) {
LOG(LOG_LEVEL_NOTICE) << "[RTDXT] Converting from " << get_bits_per_component(frame->color_spec) <<
" to 8 bits. You may directly capture 8-bit signal to improve performance.\n";
}
switch (frame->color_spec) {
case RGB:
s->decoder = vc_memcpy;

View File

@@ -276,6 +276,11 @@ bool encoder_state::configure_with(struct video_desc desc)
}
}
if (get_bits_per_component(desc.color_spec) > 8) {
LOG(LOG_LEVEL_NOTICE) << MOD_NAME << "Converting from " << get_bits_per_component(desc.color_spec) <<
" to 8 bits. You may directly capture 8-bit signal to improve performance.\n";
}
gpujpeg_set_default_parameters(&m_encoder_param);
if (m_parent_state->m_quality != -1) {
m_encoder_param.quality = m_parent_state->m_quality;