Skip to content

Commit

Permalink
#4397 really avoid scaled and subsampled video when quality=100
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jan 12, 2025
1 parent d6de44e commit f20feb9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions xpra/server/window/video_compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -1539,9 +1539,13 @@ def add_scores(info, csc_spec: CSCSpec | None, enc_in_format) -> None:
scaling = (1, 1)
score_delta = encoding_score_delta
lossy_csc = enc_in_format in ("NV12", "YUV420P", "YUV422P")
if text_hint and (scaling != (1, 1) or lossy_csc):
# we should not be using scaling or csc with text!
score_delta -= 500
if scaling != (1, 1) or lossy_csc:
if text_hint:
# we should not be using scaling or csc with text!
score_delta -= 500
elif target_q >= 100:
# we want lossless, this would be far from it!
score_delta -= 250
if self.is_shadow and lossy_csc and scaling == (1, 1):
# avoid subsampling with shadow servers:
score_delta -= 40
Expand Down

0 comments on commit f20feb9

Please sign in to comment.