Skip to content

Commit

Permalink
#1135 lower the lossless threshold when no video is present on screen…
Browse files Browse the repository at this point in the history
…, even if we refresh the whole page

git-svn-id: https://xpra.org/svn/Xpra/trunk@12029 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 24, 2016
1 parent ec59ffe commit 1e04f3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/xpra/server/window/window_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,8 @@ def update_encoding_selection(self, encoding=None, exclude=[]):

def update_encoding_options(self, force_reload=False):
self._want_alpha = self.is_tray or (self.has_alpha and self.supports_transparency)
self._lossless_threshold_base = min(95, 75+self._current_speed/5)
self._lossless_threshold_pixel_boost = 20
self._lossless_threshold_base = min(90, 60+self._current_speed//5)
self._lossless_threshold_pixel_boost = max(5, 20-self._current_speed//5)
#calculate the threshold for using rgb
#if speed is high, assume we have bandwidth to spare
smult = max(0.25, (self._current_speed-50)/5.0)
Expand Down
4 changes: 2 additions & 2 deletions src/xpra/server/window/window_video_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,8 @@ def update_encoding_options(self, force_reload=False):
if self.video_subregion.rectangle:
#when we have a video region, lower the lossless threshold
#especially for small regions
self._lossless_threshold_base = min(80, 10+self._current_speed/5)
self._lossless_threshold_pixel_boost = 90
self._lossless_threshold_base = min(80, 10+self._current_speed//5)
self._lossless_threshold_pixel_boost = 90-self._current_speed//5

if force_reload:
self.cleanup_codecs()
Expand Down

0 comments on commit 1e04f3c

Please sign in to comment.