Skip to content

Commit

Permalink
2113: make the boost value configurable
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@21670 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 15, 2019
1 parent fbd9d1b commit 2ea3086
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/xpra/server/window/video_subregion.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
refreshlog = Logger("regionrefresh")

VIDEO_SUBREGION = envbool("XPRA_VIDEO_SUBREGION", True)
SUBWINDOW_REGION_BOOST = envint("XPRA_SUBWINDOW_REGION_BOOST", 20)

MAX_TIME = envint("XPRA_VIDEO_DETECT_MAX_TIME", 5)
MIN_EVENTS = envint("XPRA_VIDEO_DETECT_MIN_EVENTS", 20)
Expand Down Expand Up @@ -420,7 +421,7 @@ def score_region(info, region, ignore_size=0, d_ratio=0):
if d_ratio==0:
d_ratio = damaged_ratio(region)
score = int(score * math.sqrt(d_ratio))
children_boost = int(region in children_rects)*20
children_boost = int(region in children_rects)*SUBWINDOW_REGION_BOOST
sslog("testing %12s video region %34s: %3i%% in, %3i%% out, %3i%% of window, damaged ratio=%.2f, children_boost=%i, score=%2i",
info, region, 100*incount//total, 100*outcount//total, 100*region.width*region.height/ww/wh, d_ratio, children_boost, score)
scores[region] = score
Expand Down

0 comments on commit 2ea3086

Please sign in to comment.