mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-06-26 20:51:49 +02:00
Fixing webp usage calculation and updating default value
This commit is contained in:
parent
f674e2c58d
commit
02852185a8
@ -395,8 +395,8 @@ void EncodeManager::doUpdate(bool allowLossy, const Region& changed_,
|
||||
screenArea = pb->getRect().width() * pb->getRect().height();
|
||||
screenArea *= 1024;
|
||||
screenArea /= 256 * 256;
|
||||
screenArea *= screenArea;
|
||||
screenArea /= Server::webpEncodingTime > 1 ? Server::webpEncodingTime : 1;
|
||||
screenArea *= webpBenchResult;
|
||||
screenArea /= Server::webpEncodingTime;
|
||||
// Encoding the entire screen would take this many 1024*msecs, worst case
|
||||
|
||||
// Calculate how many us we can send webp for, before switching to jpeg
|
||||
|
@ -129,7 +129,7 @@ encoding:
|
||||
logging:
|
||||
level: off
|
||||
scaling_algorithm: progressive_bilinear
|
||||
webp_encoding_time: 1
|
||||
webp_encoding_time: auto
|
||||
|
||||
compare_framebuffer: auto
|
||||
zrle_zlib_level: auto
|
||||
|
@ -2069,13 +2069,25 @@ sub DefineConfigToCLIConversion {
|
||||
}
|
||||
}),
|
||||
KasmVNC::CliOption->new({
|
||||
name => 'webpEncodingTime',
|
||||
name => 'WebpEncodingTime',
|
||||
configKeys => [
|
||||
KasmVNC::ConfigKey->new({
|
||||
name => "encoding.video_encoding_mode.webp_encoding_time",
|
||||
type => KasmVNC::ConfigKey::INT
|
||||
validator => KasmVNC::PatternValidator->new({
|
||||
pattern => qr/^(auto|[1-9][0-9]{0,2}|1000)$/,
|
||||
errorMessage => "must be 'auto' or a number in 1..1000"
|
||||
}),
|
||||
})
|
||||
]
|
||||
],
|
||||
deriveValueSub => sub {
|
||||
my $self = shift;
|
||||
my $value = $self->configValue();
|
||||
|
||||
if ($value eq "auto") {
|
||||
$value = 1;
|
||||
}
|
||||
$value;
|
||||
}
|
||||
}),
|
||||
KasmVNC::CliOption->new({
|
||||
name => 'CompareFB',
|
||||
|
Loading…
x
Reference in New Issue
Block a user