Skip to content

Commit

Permalink
better check for equivallent quality setting: allow 4 percentage poin…
Browse files Browse the repository at this point in the history
…ts difference before doing anything, unless we are switching to 100%

git-svn-id: https://xpra.org/svn/Xpra/trunk@5308 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jan 29, 2014
1 parent ddbf6f1 commit 8b9e499
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xpra/codecs/enc_x264/encoder.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ cdef class Encoder:
def set_encoding_quality(self, int pct):
assert pct>=0 and pct<=100, "invalid percentage: %s" % pct
assert self.context!=NULL, "context is closed!"
if int(self.quality/2) == int(pct/2):
if abs(self.quality - pct)<=4 and pct!=100:
#not enough of a change to bother
return
cdef x264_param_t param #@DuplicatedSignature
Expand Down

0 comments on commit 8b9e499

Please sign in to comment.