mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2026-07-17 16:36:49 +00:00
Updating weighting function and limits
Signed-off-by: Rodwin.Spruel <rodwin.spruel@kasmweb.com>
This commit is contained in:
parent
7353f38652
commit
3bc0403877
2 changed files with 3 additions and 2 deletions
|
|
@ -395,7 +395,8 @@ void EncodeManager::doUpdate(bool allowLossy, const Region& changed_,
|
|||
screenArea = pb->getRect().width() * pb->getRect().height();
|
||||
screenArea *= 1024;
|
||||
screenArea /= 256 * 256;
|
||||
screenArea *= screenArea *= Server::webpEncodingTime > 0 ? Server::webpEncodingTime : webpBenchResult;
|
||||
screenArea *= screenArea;
|
||||
screenArea /= Server::webpEncodingTime > 1 ? Server::webpEncodingTime : 1;
|
||||
// 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
|
||||
|
|
|
|||
|
|
@ -291,4 +291,4 @@ rfb::PresetParameter rfb::Server::preferBandwidth
|
|||
rfb::IntParameter rfb::Server::webpEncodingTime
|
||||
("webpEncodingTime",
|
||||
"Sets a weighted value that determines how much webp is used to balance bandwidth and CPU usage.",
|
||||
0, 0, 10000);
|
||||
1, 1, 1000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue