Skip to content

Commit

Permalink
fix quantizer calculations
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@10818 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 12, 2015
1 parent e1216f3 commit 92c19b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xpra/codecs/vpx/encoder.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,8 @@ cdef class Encoder:
self.cfg.rc_overshoot_pct = 100
self.cfg.rc_target_bitrate = int(self.width * self.height * self.initial_bitrate_per_pixel)
self.cfg.g_threads = self.max_threads
self.cfg.rc_max_quantizer = int(max(0, min(63, self.quality * 0.63)))
self.cfg.rc_min_quantizer = int(max(0, min(self.cfg.rc_max_quantizer, (self.quality-20)*0.63/1.5)))
self.cfg.rc_min_quantizer = int(max(0, min(63, (80-self.quality) * 0.63)))
self.cfg.rc_max_quantizer = int(max(0, self.cfg.rc_min_quantizer, min(63, (100-self.quality) * 0.63)))


def __repr__(self):
Expand Down

0 comments on commit 92c19b3

Please sign in to comment.