Skip to content

Commit

Permalink
try to reduce how often quality swings cause scaling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jul 15, 2024
1 parent 7a16475 commit 7951a69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xpra/server/window/video_scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def get_speed_score(csc_format, csc_spec, encoder_spec, scaling,
#the encoder speed matters less
#when the target speed is low:
ts = min(100, max(1, target_speed))
sscore = (50-ts//2) + speed*100//(100+ts)
sscore = (50-ts//2) + speed*100//(200 + ts)
if csc_spec:
#if there is a csc step,
#then we lose some performance,
Expand Down
2 changes: 1 addition & 1 deletion xpra/server/window/window_video_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,7 @@ def mrs(v=(1, 1), info="using minimum required scaling"):
#high bit depth is normally used for high quality
target *= 10
#high quality means less scaling:
target = target * (10+max(0, q-video*30))**2 // 50**2
target = target * (100+max(0, q-video*30))**2 // 200**2
#high speed means more scaling:
target = target * 60**2 // (s+20)**2
sscaling = {}
Expand Down

0 comments on commit 7951a69

Please sign in to comment.