Skip to content

Commit

Permalink
#1135: allow the quality to go higher based on the batch delay: a 20m…
Browse files Browse the repository at this point in the history
…s delay is still very good (that's 50fps)

git-svn-id: https://xpra.org/svn/Xpra/trunk@13590 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Sep 6, 2016
1 parent 4808023 commit 84e2415
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/xpra/server/window/batch_delay_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ def get_target_quality(wid, window_dimensions, batch, global_statistics, statist
#so when we start and we don't have any records, we don't lower quality
#just because the start delay is higher than min_delay
ref_delay = (batch.START_DELAY*10.0/recs + batch.min_delay*recs) / (recs+10.0/recs)
#anything less than twice the minimum is good enough:
batch_q = ref_delay / max(1, batch.min_delay, batch.delay/2.0)
#anything less than N times the reference delay is good enough:
N = 4
batch_q = N * ref_delay / max(1, batch.min_delay, batch.delay)
target = min(1.0, target, batch_q)
cratio_factor = None
#from here on, the compression ratio integer value is in per-1000:
Expand Down

0 comments on commit 84e2415

Please sign in to comment.